CSCI 210: Lab 6
Adder/Subtracter
Due:
10:00
PM
on
Monday,
April 8th
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.
a | b | s | c |
00001100 | 00001000 | 0 | 00010100 |
00001100 | 00001000 | 1 | 00000100 |
01101000 | 01010000 | 0 | 10111000 |
01101000 | 01010000 | 1 | 00011000 |
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, multiplexor or decoder. You should take the following steps:
- Build a one-bit half-adder as a subcircuit.
- Build a one-bit full-adder out of half-adders, also as a subcircuit.
- 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 17 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.