CSCI 210: Lab 6

Adder/Subtracter
Due: 9:59 PM on Monday, November 7th

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

Preliminaries

We will be using circuitverse.org for 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

In this lab, you will build an eight-bit adder/subtracter that takes in two 8 bit numbers, a and b, and one select value, s and has 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.
  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.

Hint: Both lecture 18 and Zybooks section 3.4 should be very useful.

Submission

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

C. Taylor, S. Checkoway