Lab attendance is your responsibility. Before you leave this and all future labs you must ensure that your name is on one of the check-in sheets. You will no longer be given credit if your name can not be found on one of those sheets.


One bit adder

The Wikipedia Adder page details how to construct an Adder. lab06.zip contains all of the starter template code for constructing your adder programs. The one-bit directory contains the starter code and Makefile for a one-bit adder. Using the Wikipedia link above, use those formulae for your implementation.

Draw a two-bit adder

Sketch out a two-bit adder with proper carry in and carry out lines connected up correctly.

Create a four bit adder by stringing them together

Using both of the above and the starter code from the rca directory, construct a four-bit adder. You can use for loops or whatever method you like but you must be able to add two four-bit values. Note: pay attention to your loop ordering. If you ask for values starting from zero, you probably want to start your computation with index 3 and propagate it forward.