Subtracting unsigned binary numbers using two methods

Click For Summary

Discussion Overview

The discussion revolves around the subtraction of unsigned binary numbers using two methods: binary subtraction and two's complement. Participants are attempting to solve a homework problem involving 8-bit representation of binary numbers.

Discussion Character

  • Homework-related
  • Mathematical reasoning

Main Points Raised

  • One participant presents a binary subtraction problem and attempts to solve it using both binary subtraction and two's complement methods, but finds discrepancies in the results.
  • Another participant points out that the 8-bit two's complement representation of -0000 1011 should consist of 8 bits, indicating that the initial representation provided is incorrect.
  • A subsequent reply clarifies the correct 1's complement and 2's complement representations for the number in question, stating that 0000 1011 converts to 1111 0100 in 1's complement and 1111 0101 in 2's complement.
  • Further discussion involves adding the corrected two's complement representation to the original binary number, with a participant asking what the result would be in 8-bit arithmetic.
  • Another participant provides the addition of the two numbers, showing the result in binary form, but does not clarify whether this resolves the initial discrepancy.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the correct representations and results, as there are multiple corrections and clarifications regarding the two's complement method and the arithmetic involved.

Contextual Notes

There are unresolved issues regarding the correct representation of numbers in two's complement form and the implications of 8-bit arithmetic on the results of the subtraction.

Fatima Hasan
Messages
315
Reaction score
14

Homework Statement


Using 8 bit representation , subtract the unsigned binary numbers shown by each of the following methods ;
101012 - 10112
1) Binary subtraction
2) 2's complement

Homework Equations


-

The Attempt at a Solution


Using binary subtraction :
101012 - 10112 = 0000 10102
Using 2's complement :
101012 + ( - 10112 )
10112 → 1's complement = 01002
01002 +1 = 01012
101012 + 1012 = 0001 10102

I didn't get the same answer , can anyone tell me where is my mistake ?
 
Physics news on Phys.org
Fatima Hasan said:
Using 8 bit representation...

Your 8-bit 2's complement representation of -0000 1011 should have 8 bits. That representation is NOT 0000 0101.
 
RPinPA said:
Your 8-bit 2's complement representation of -0000 1011 should have 8 bits. That representation is NOT 0000 0101.
0000 1011 → 1's complement = 1111 0100
2's complement = 1111 0100 + 1 = 1111 01012
 
So this is what you had:
Fatima Hasan said:
##10101_2 + 0101_2##

OK, so now you know that second number should be 1111 0101. And your first number is 0001 0101.

What happens when you add 1111 0101 and 0001 0101 in 8-bit arithmetic?
 
RPinPA said:
OK, so now you know that second number should be 1111 0101. And your first number is 0001 0101.

What happens when you add 1111 0101 and 0001 0101 in 8-bit arithmetic?
11111 0101 + 0001 0101 = 1 0000 1010 = 0000 10102
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
11K