1. Not finding help here? Sign up for a free 30min 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!

Tens complement subtraction in binary

  1. Oct 10, 2011 #1
    1. The problem statement, all variables and given/known data
    I want to do 8 + (-2) in binary


    2. Relevant equations

    8= 1 0 0 0
    2= 0 0 1 0

    3. The attempt at a solution

    To find the negative of 2 I find the tens complement of it by finding nines complement and +1

    7 is the nines complement = 0 1 1 1 and adding 0 0 0 1 = 1 0 0 0

    1 0 0 0
    +1 0 0 0
    ----------
    1 0 0 0 0

    Knocking off the carry I get all zeros. The answer should be six. What am I doing wrong?
     
  2. jcsd
  3. Oct 10, 2011 #2

    Mark44

    Staff: Mentor

    Don't you mean "twos complement"? I've never heard of 10's complement. See http://en.wikipedia.org/wiki/Two's_complement.

    The twos-complement form for -2 is the ones-complement for 2, plus 1, or
    1101 + 1 = 1110

    8 + (-2) = 1000 + 1101 = (1)0110 = ?
     
  4. Oct 10, 2011 #3
    No, it's ten's complement. I can do it in two's complement.

    I figured it though. For binary after adding the ten's complement to the other number, you have to add 6 to it if the sum is greater than nine.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Tens complement subtraction in binary
  1. Rs complement (Replies: 1)

  2. Two's complement (Replies: 3)

Loading...