Subtraction using 8-bit binary 1's complement

  • Thread starter Thread starter Duderonimous
  • Start date Start date
  • Tags Tags
    Binary
AI Thread Summary
The discussion focuses on performing subtraction using 8-bit binary in 1's complement. The first example involves converting 22 and -59 to binary, taking the 1's complement of -59, and adding them to arrive at the answer (1101 1010)2. The second example involves -11 and -64, where the 1's complement is taken for both numbers, resulting in (1011 0100). The poster seeks confirmation on the correctness of their calculations and notes that they can derive the positive value from the 1's complement of their final answer. Overall, the calculations appear accurate based on the outlined steps.
Duderonimous
Messages
63
Reaction score
1

Homework Statement


Perform the indicated subtraction using 8-bit binary in 1's complement:

(22-59)10

(-11-64)10

Homework Equations


i. Convert the numbers from decimal to binary
ii. Take the ones complement of binary representation of any negative numbers
iii. Add the two numbers together add 1 if there is a carryout. Leave as is if no carry out.

The Attempt at a Solution


(+22)10 →→ (0001 0110)2 →→ (0001 0110)2
+(-59)10 → +1'sC(0011 1011)2 → +(1100 0100)2
Answer: (1101 1010)2

(-11) →→1'sC(0000 1011)→1111 0100
+(-64) →+1'sC(0100 0000) →+1011 1111
Answer: 1011 0100

Is this correct? Thanks. I just get the positive value by taking the 1's Comp of my answer right? I kind of figured it out as I wrote this. But if someone can confirm that would be nice thanks.
 
Last edited:
Physics news on Phys.org
I only checked the first one and it looks fine.
 
  • Like
Likes Duderonimous
Thanks
 

Similar threads

Back
Top