Skip to main content
Logo image

Section C.3 R2: Computer Arithmetic

Synopsis.

  • Introduce the binary adder, make clear that it is just a combinational circuit and prove the addition of individual bits by a value table and prove that addition on bit strings it is sound with respect to the unsigned interpretation.
  • Make clear that the exact result needs one bit more than the operands are long and show how to use it to detect overflows.
  • Show how we can use modulo arithmetic to implement subtraction using addition.
  • Introduce signed numbers and show that addition and subtraction as we defined it is also sound on them.
  • Make clear that overflows have to be determined differently on signed numbers.
  • Explain sign and zero extension (will be of some importance later on when talking about load instructions in the machine code section.)
  • Bonus: Shifts

Sections Covered.