Two's Complement Binary Multiplication: Understanding Why it Works

Click For Summary
SUMMARY

The discussion focuses on the multiplication of two's complement binary numbers, specifically addressing the incorrect application of a straightforward multiplication method. The user initially multiplies 1001 (9 in decimal) by 0101 (5 in decimal) resulting in 0101101 (45), which is incorrect for two's complement representation. The correct approach involves extending the bit length of each number, resulting in 11111001 (representing -35) multiplied by 00000101, yielding the correct result of 11011101, which is -35 in two's complement.

PREREQUISITES
  • Understanding of two's complement representation
  • Binary arithmetic operations
  • Knowledge of bit extension techniques
  • Familiarity with signed number representation in computing
NEXT STEPS
  • Study the principles of two's complement binary arithmetic
  • Learn about bit extension methods for negative numbers
  • Explore the implications of overflow in binary multiplication
  • Investigate the differences between signed and unsigned binary operations
USEFUL FOR

Students studying computer science, software engineers working with low-level programming, and anyone interested in understanding binary arithmetic and two's complement operations.

naspek
Messages
176
Reaction score
0

Homework Statement

hey guys...
i try to do multiplication of two's complement number. I'm using straightforward method, which
give me wrong answer..

i know i can't use this method.. but.. i just want to know why..
why i can't use this method?

The Attempt at a Solution


1001 x 0101 = 0101101 which is 45.. it should be -35..
 
Physics news on Phys.org
When you do multiplication you have to extend each number to double the number of bits by adding extra 1s in the start for negative numbers, or extra 0s for positive numbers. So the above multiplication should be 11111001x00000101 and at the result you consider only the first 8 bits. So in this case would be 11011101 which is -35.

For more info check http://en.wikipedia.org/wiki/Two's_complement , towards the end of page the section for multiplication.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
3K