Systems Architecture

Table of Contents

Addition/subtraction logic unit

Adders

A half adder takes two inputs, produces sum and carry-out.

A full adder also takes a carry-in.

You can easily get this from a truth table:

screenshot.png

You can make a circuit out of this. Inputs are x, y, and carry. Carry out is $c_{i+1}$:

SumCarry
screenshot.pngscreenshot.png

That’s represented by the symbol:

Screen Shot

If you want to add n bits, you stick a bunch of them together and make an n-bit ripple-carry adder. $x_{n-1}$ and $y_{n-1}$ are the sign bits:

screenshot.png

Detecting overflow

Remember that the final carry out is not a part of the result. It’s an overflow when:

Two logical expressions for detecting overflow (either works):

screenshot.png