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.
Вопрос
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.