Section 2: Negative Numbers Flashcards
1
Q
Q: What is two’s complement representation?
A
A: A method to represent signed integers, where negative numbers are formed by inverting all bits of the positive number and adding 1.
2
Q
Q: Why is two’s complement useful?
A
A: It simplifies arithmetic operations, as the same hardware can handle both addition and subtraction.
3
Q
Q: How do you convert 5^10 to −5^10 using two’s complement (8-bit)?
A
A:
Represent 55: 00000101
Invert: 11111010
Add 1: 11111011