Lab 6: Adder/Subtracter

Due: Sunday, November 3 at 23:59

In this lab, you will build an eight-bit adder/subtracter.

Preliminaries

We will be using the CircuitVerse website to complete this assignment. To start the assignment, click on your name on the upper righthand side of the website. Go to “My Groups” and then select the group for this class and you should see “Lab 6” under assignments. Click the “Start Working” button to start the assignment. After you click “Start Working” you can click “Launch Simulator” to start creating the assignment.

You can find more details on how to use the CircuitVerse website here.

Adder/Subtracter

Your adder/subtractor must take in two 8 bit numbers, a and b, and one select value, s, and have an 8 bit output, c. If s is zero, your adder should output a + b. If s is one, your adder should output a - b. For some examples, look at the table below.

absc
0000110000001000000010100
0000110000001000100000100
0110100001010000010111000
0110100001010000100011000

Note that in the third example, we get the wrong answer because of overflow—just like many modern programming languages, we are going to ignore this.

Implementation plan

You are required to build this adder/subtracter using only with basic logic gates (i.e., AND, OR, NOT, NOR, NAND and XOR). You are not allowed to use the CircuitVerse adder. You should take the following steps.

  1. Build a one-bit half-adder as a subcircuit;
  2. Build a one-bit full-adder out of half-adders, also as a subcircuit; and
  3. Build an eight-bit adder/subtracter out of eight one-bit full-adders.

You are required to have a separate half-adder and full-adder subcircuit to get full credit for the lab.

Submission

Make sure to select the “save online” button to save your project. This will make your project available to us for grading.