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!

Binary subtraction question using 2's complement method and an 8 BIT

  1. Oct 2, 2012 #1
    1. The problem statement, all variables and given/known data

    00001101 bin
    * 00001000 bin
    -----------------------------------


    2. Relevant equations

    It's a binary subtraction question using 2's complement method and an 8 BIT register.There's no equation than,I guess.

    3. The attempt at a solution

    11111111 <--1's "carried over"
    00001101 bin
    * 00001000 bin
    -----------------------------------
    11111111
    1111101
    + 1
    --------------------------------------
    110
    000000000 +
    ------------------------------------
    11111111
    00000110
    + 00001101
    --------------------------------------
    11111001

    00000110 <----inversion of previous number


    I did all this but on my answer sheet it says that the answer is 00000101.Why is this?.
     
  2. jcsd
  3. Oct 2, 2012 #2

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    It's not clear to me what you're doing here. When you want to calculate A-B, you find the two's complement of B and then add it to A. In this problem, that means you want to find the two's complement of 00001000, and then add that to 00001101.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Binary subtraction question using 2's complement method and an 8 BIT
Loading...