Thread: simple question

  1. #1
    Registered User Sekti's Avatar
    Join Date
    Feb 2002
    Posts
    163

    simple question

    what is an unsigned integer?
    +++
    ++
    + Sekti
    ++
    +++

  2. #2
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200


    umm.. its an unsigned integer....

    meaning... un-negative, positive only...

    so if you call a unsigned int and its value is less than 0 it will say 0 instead of -(number here)
    What is C++?

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >what is an unsigned integer?
    An integer that cannot hold negative values, so instead of spanning a certain length into the negative field and a certain length into the positive field, an unsigned integer uses all of its bits for positive values. For example:

    On my system, the max and min values of a signed integer are 2147483647 and -2147483648, respectively. The max and min values of an unsigned integer are 4294967295 and 0. In the unsigned version, all of the bits are used for a positive value and thus can have a higher value than a signed int.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple question regarding variables
    By Flakster in forum C++ Programming
    Replies: 10
    Last Post: 05-18-2005, 08:10 PM
  2. Simple class question
    By 99atlantic in forum C++ Programming
    Replies: 6
    Last Post: 04-20-2005, 11:41 PM
  3. Simple question about pausing program
    By Noid in forum C Programming
    Replies: 14
    Last Post: 04-02-2005, 09:46 AM
  4. simple question.
    By InvariantLoop in forum Windows Programming
    Replies: 4
    Last Post: 01-31-2005, 12:15 PM
  5. simple fgets question
    By theweirdo in forum C Programming
    Replies: 7
    Last Post: 01-27-2002, 06:58 PM