Subtraction using 8-bit binary 1's complement

  • Thread starter Thread starter Duderonimous
  • Start date Start date
  • Tags Tags
    Binary
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
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:
on Phys.org