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

1. Oct 2, 2012

### xod_s

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. Oct 2, 2012

### vela

Staff Emeritus
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