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

Click For Summary
SUMMARY

This discussion focuses on performing binary subtraction using the 2's complement method with an 8-bit register. The user attempts to subtract the binary number 00001000 from 00001101 but arrives at an incorrect result of 00000110. The correct approach involves calculating the 2's complement of 00001000, which is 11111000, and then adding it to 00001101, yielding the correct result of 00000101. The confusion arises from misunderstanding the 2's complement process.

PREREQUISITES
  • Understanding of binary number representation
  • Knowledge of 2's complement method for subtraction
  • Familiarity with 8-bit binary arithmetic
  • Basic skills in binary addition and carry operations
NEXT STEPS
  • Study the process of calculating 2's complement in detail
  • Practice binary addition and subtraction with various examples
  • Explore the implications of overflow in binary arithmetic
  • Learn about binary arithmetic operations in digital systems
USEFUL FOR

This discussion is beneficial for students studying computer science, particularly those learning about binary arithmetic and digital logic design. It is also useful for educators teaching foundational concepts in binary operations.

xod_s
Messages
8
Reaction score
0

Homework Statement



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

Homework Equations



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

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 numberI did all this but on my answer sheet it says that the answer is 00000101.Why is this?.
 
Physics news on Phys.org
xod_s said:

Homework Statement



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


Homework Equations



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

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?.
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.
 

Similar threads

Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
5
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K