# Assignment 5: Counting circuit

Due at:5:00pm, Tuesday, March 5
Point value:30 pts
Groupwork: You must work in pairs as assigned below.
 A. Britton, Clary B. Bucuti C. Inema, John D. Kimenyi, McNew E. Laborde, Yociss

The purpose of this assignment is to become acquainted with the digital trainer before we build a more serious circuit. Below are some useful references.

Training for the Digital Laptop Trainer
IC diagrams (alternative reference)

In this assignment, you will build a circuit on the trainer's breadboard so that the hexadecimal display shows how many of the switches at the lower left corner are in the up position. This is a matter of determining some combination of NAND (74LS00), NOR (74LS02), NOT (74LS04), AND (74LS08), OR (74LS32), and XOR gates (74LS86) that accomplishes the task. You should not use any other chips — and indeed, since the trainer's breadboard is so small, you should use at most three of the above-listed chips.

## Part 1: Handling two switches

Begin by making a circuit to count how many of the first two switches are up, yielding a number between 0 and 2. This is simply a matter of creating a half adder.

Test this circuit before going on to the next part. The instructor does not need to see your solution before you proceed.

## Part 2: Handling three switches

Now add the third switch into this, so that the result is a number between 0 and 3. This is a matter of extending the half adder into a full adder. My solution uses five 2-input gates, though it uses three types of gates and thus three different chips.

Test this circuit before going on to the next part.

## Part 3: Handling four switches

Finally add the fourth switch into the number between 0 and 3, to arrive at a number between 0 and 4. I ended up with a total of nine gates, of three diferent types.

To submit your solution, simply show it to your instructor. After confirmation that you have passed the assignment, you can then take the circuit apart. Remember that when you remove ICs, you should always pull the ICs off the board gently.