DIfference between signed and unsigned integers ?

This is a discussion on DIfference between signed and unsigned integers ? within the C Programming forums, part of the General Programming Boards category; Hi, Actually, my question is, what's the differenct between signed and unsigned? thnx...

  1. #1
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020

    DIfference between signed and unsigned integers ?

    Hi,

    Actually, my question is, what's the differenct between signed and unsigned?

    thnx

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Unsigned numbers are always positive, and can be twice as large as signed numbers. Signed numbers can be positive or negative

    Ex:
    16-bit ints

    Signed:
    -32768 to 32767
    Unsigned:
    0 to 65535

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    unsigned cant hold negative values

  4. #4
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    k thnx

  5. #5
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    No, you don't get it yet. It has to do with the range of numbers that a data type can represent! You don't get it yet! LOL.

  6. #6
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    wat the hell ar u talkin about

  7. #7
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    He's just joking, Nutshell...

  8. #8
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    i know
    nevermind...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 06-04-2009, 02:03 PM
  2. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM
  3. Please STICKY this- vital to MSVC 6 dev - BASETSD.h
    By VirtualAce in forum Game Programming
    Replies: 11
    Last Post: 03-15-2005, 08:22 AM
  4. build errors migrated from dx9b to dx9c sdk
    By reanimated in forum Game Programming
    Replies: 4
    Last Post: 12-17-2004, 06:35 AM
  5. Difference between unsigned and signed numbers...
    By Nutshell in forum C Programming
    Replies: 8
    Last Post: 01-26-2002, 08:48 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21