1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Two's complement: Am I on the right track here?

  1. Aug 21, 2014 #1
    What is the the 2's complement representation of -14 using 5 bits?

    1. (11110)2
    2. (10100)2
    3. (11001)2
    4. (10010)2

    I've changed to binary: 01110
    Flipped over as in two's complement: 10010

    So the likely answer seems to be option 4

    Am I missing something?

  2. jcsd
  3. Aug 21, 2014 #2


    User Avatar
    Homework Helper

    To take the negative of a number in two's complement, you can take the one's complement (invert all the bits), then increment by 1. In this case ~01110 = 10001, then increment by 1 = 10010. Negating again, ~10010 = 01101, then increment by 1 = 01110.
  4. Aug 22, 2014 #3


    Staff: Mentor

    As a check, if you add the binary representation of 14 to its two's complement representation, you should get 5 bits of 0.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted