Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

2's complement

  1. Dec 8, 2007 #1


    User Avatar

    Why in 2's complement the range of numbers that can be represented with 4 bits are from -8 to +7? Wouldn't the numbers with 4 bits be till 15? I am confused.Please help me out.

    Last edited: Dec 8, 2007
  2. jcsd
  3. Dec 8, 2007 #2
  4. Dec 8, 2007 #3


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    With four bits, you can store 16 different values. You make them represent 0 through 15, which is called unsigned magnitude, or you can make them represent -8 through +7, which is called 2's complement. You cannot represent all the numbers from, say, -8 to +15, because you do not have enough bits.

    - Warren
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook