Please help me with the following two's complement multiplication logic.

                     Actual      cropped

Unsigned 5 [101] 3 [011] 15 [001111] 7 [111]

Two’s comp. −3 [101] 3 [011] −9 [110111] −1 [111]

I cant understand how actual multiplication is different for unsigned and two's complement multiplication when bit for both are same.

有帮助吗?

解决方案

Multiplication for signed and unsigned integers is performed by different rules (unlike addition and subtraction, for example).

The same bits can represent different data, actual interpretation depends on type.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top