Practice question · True or false
Two's complement is used because it lets one adder circuit perform both addition and subtraction.
Hints
- How is a − b computed?
- Adding the negative gives the right answer with the same hardware.
Show the answer
True
Why
True. Negating in two's complement is invert-and-add-one, after which is just through the same adder, with the carry out of the top bit discarded. Sign-magnitude would need separate subtract logic and has two zeroes; two's complement has one and wraps cleanly.
Practise Arithmetic at Machine Level
The app has 7 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.