Computer Science › Section B · Data storage › Topic B.6
Storing integers: two's complement and excess notation
A computer stores each integer in a fixed number of bits, so it needs a rule for which patterns mean negative numbers. Two's complement makes one adding circuit serve for subtraction too, and excess notation keeps patterns in numerical order.
In this topic
- Fixed-width patterns
- Two's complement: a negative leftmost weight
- Negating a number
- Worked example: encoding and decoding
- Addition, and subtraction for free
- Worked example: 50 − 75 in 8 bits
- Overflow
- A real limit: the year 2038
- Excess notation
- Common mistakes to avoid
- Key takeaways
This topic is part of Wuanberri Pro. Checking your access…
