- #1
- 2,076
- 140
Homework Statement
I'm a little confused by the wiki article, and I can't seem to get the correct answer.
Suppose ##A = 01100101 = +101## is an 8-bit two's complement number.
I'm trying to multiply ##A \times 101 = 01100101 \times 101 = (+101) \times (-3) = -303##.
Homework Equations
The Attempt at a Solution
I needed to sign extend the ##101## term so I would be computing:##A \times 11111101 = 01100101 \times 11111101 = (+101) \times (-3) = -303##.
When I multiply ##01100101 \times 11111101## using ordinary multiplication, I get something completely incorrect. Sign extending to 16-bits to fit the answer also seems impractical.
How would I perform a computation such as this one?