Variable types

This is a discussion on Variable types within the C++ Programming forums, part of the General Programming Boards category; What's the scoop with signed and unsigned variables? What does that mean?...

  1. #1
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    891

    Variable types

    What's the scoop with signed and unsigned variables? What does that mean?
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  2. #2
    zen
    zen is offline
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    They don't have the most significant bit indicating their sign (negative or positive), and are assumed to be positive. Therefore they can represent a greater range of positive numbers.
    zen

  3. #3
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    891
    er.. ok... so in what occurence would they be used?
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  4. #4
    zen
    zen is offline
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    You'd use unsigned where you're only need a positive number and you need the extra range.
    zen

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting number
    By Leslie in forum C Programming
    Replies: 8
    Last Post: 05-20-2009, 04:23 AM
  2. Use of variable
    By alice in forum C Programming
    Replies: 8
    Last Post: 06-05-2004, 07:32 AM
  3. newb question~
    By Anima in forum C++ Programming
    Replies: 10
    Last Post: 08-24-2003, 05:54 PM
  4. storing different variable types in arrays.........
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 06-28-2002, 11:45 AM
  5. Variable Allocation in a simple operating system
    By awkeller in forum C Programming
    Replies: 1
    Last Post: 12-08-2001, 01:26 PM

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