Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Project1 CSC110 PVCC, Assignments of Computer Science

Project Description: In this project, students will design and simulate a 4-bit binary adder using Logisim, a digital circuit design tool. The project builds on concepts from Chapter 1 and Appendix B of the Brookshear textbook and integrates prior learning from the Logisim tutorial. Objectives: Construct an SR Flip Flop sub-circuit using NAND gates. Design a Full Adder sub-circuit capable of computing binary sums with carry input. Combine the above components to build a complete 4-bit binary adder circuit. Implement logic for input and output using a total of 13 flip flops and 4 Full Adder units. Test the adder for correct behavior using standard binary addition examples. Skills Applied: Digital logic circuit design Sub-circuit creation and hierarchical design in Logisim Binary arithmetic and truth tables Simulation and testing using the poke tool in Logisim

Typology: Assignments

2022/2023

Uploaded on 03/27/2025

unknown user
unknown user 🇺🇸

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Project Overview
For this project, you will use Logisim to create a 4 bit adder. The reading material from Chapter
1 and Appendix B of the Brookshear text along with the Logisim tutorial you completed last
week should provide you with sufficient background to successfully complete the project.
Instructions
1. Open Logisim.
2. First, create a sub-circuit. To add a sub-circuit, right-click on the project name (default is
Untitled) and select "Add Circuit..." and name the circuit SR "Flip Flop". Build the
circuit (based on the redrawn NAND gate flip flop from the Chapter 1 Exercise
Solutions) as follows (Make sure to set the "Label" property of each pin to its given
name, rather than adding text comments directly to the diagram. This way, the labels will
still be visible from outside the sub-circuit):
Create two input pins named S and R.
Create one output pins named X.
Add two NAND gates.
Configure the wiring as required.
You will use this SR Flip Flop circuit to provide inputs to, and receive outputs from, your
Adder.
3. Save your project and use the poke tool (the finger button on the toolbar) to verify your
circuit is performing correctly. When both inputs to the flip flop are on, the output of the
flip flop should remain stable. Dropping the S input low temporarily should set the
output value to 1. Dropping the R input low temporarily should set the output value to 0.
4. Now, create a new sub-circuit called Full Adder. You can easily find images of Full
Adder circuits on the internet, but one such circuit can be found at
http://www.theorycircuit.com/full-adder-circuit-diagram/ . This circuit will require the
following aspects:
Create three input pins named A, B and Cin.
Create two output pins named Sum and Cout.
Add the necessary gates and wiring to match the Full Adder Logic Gate diagram
referenced above.
5. Save you work and use the poke tool to verify this sub-circuit is performing correctly. By
working through the input combinations listed in the truth table of the above referenced
website.
6. Using the SR Flip Flops and Full Adders circuits, build the 4-bit adder described in
Appendix B of the text. This will be your main circuit (double click "main" to design this
last circuit.)
a. You can use your sub-circuits while designing the main circuit by clicking on the
sub-circuit name and dragging it into the main circuit window.
1
pf2

Partial preview of the text

Download Project1 CSC110 PVCC and more Assignments Computer Science in PDF only on Docsity!

Project Overview

For this project, you will use Logisim to create a 4 bit adder. The reading material from Chapter 1 and Appendix B of the Brookshear text along with the Logisim tutorial you completed last week should provide you with sufficient background to successfully complete the project.

Instructions

  1. Open Logisim.
  2. First, create a sub-circuit. To add a sub-circuit, right-click on the project name (default is Untitled) and select "Add Circuit..." and name the circuit SR "Flip Flop". Build the circuit (based on the redrawn NAND gate flip flop from the Chapter 1 Exercise Solutions) as follows (Make sure to set the "Label" property of each pin to its given name, rather than adding text comments directly to the diagram. This way, the labels will still be visible from outside the sub-circuit): Create two input pins named S and R. Create one output pins named X. Add two NAND gates. Configure the wiring as required. You will use this SR Flip Flop circuit to provide inputs to, and receive outputs from, your Adder.
  3. Save your project and use the poke tool (the finger button on the toolbar) to verify your circuit is performing correctly. When both inputs to the flip flop are on, the output of the flip flop should remain stable. Dropping the S input low temporarily should set the output value to 1. Dropping the R input low temporarily should set the output value to 0.
  4. Now, create a new sub-circuit called Full Adder. You can easily find images of Full Adder circuits on the internet, but one such circuit can be found at http://www.theorycircuit.com/full-adder-circuit-diagram/. This circuit will require the following aspects: Create three input pins named A, B and Cin. Create two output pins named Sum and Cout. Add the necessary gates and wiring to match the Full Adder Logic Gate diagram referenced above.
  5. Save you work and use the poke tool to verify this sub-circuit is performing correctly. By working through the input combinations listed in the truth table of the above referenced website.
  6. Using the SR Flip Flops and Full Adders circuits, build the 4-bit adder described in Appendix B of the text. This will be your main circuit (double click "main" to design this last circuit.) a. You can use your sub-circuits while designing the main circuit by clicking on the sub-circuit name and dragging it into the main circuit window. 1
  1. You will need to use 8 flip flops for the inputs and 5 flip flops for the outputs.
  2. You will need to use 4 full adders. b. You will need 2 input pins for each of the input flip flops (one for S and one for R for each flip flop) for a total of 16 input pins. c. You will need 1 output pin for each for each of the output flip flops (a total of 4 output pins) d. The input for the Cin pin for the first full adder should be Ground (see the Wiring components). e. Connect the carry out pin of one full adder to the carry in pin of the next. f. Connect the output pins from each input flip flop to the full adder circuits. g. Connect the output pins from the full adders to a NOT gate and then to the S pin on the output flip flops. Also connect the same output pin from the full adder to the R pin no the same flip flop. h. Create one additional output pin called Carry, and connect the carry out of the last (most significant) full adder to it (through the fifth output flip flop).
  3. At this point, you should feel pretty amazed at what you've done! Make sure your circuit works correctly by testing the following examples (i.e., using the poke tool). 0001 + 0001 = 0010, carry=0 (i.e., 1 + 1 = 2) 0101 + 1010 = 1111, carry=0 (i.e., 5 + 10 = 15) 1000 + 1000 = 0000, carry=1 (i.e., 8 + 8 = 0)
  4. Submit your completed Logisim file through the Canvas Assignment link prior to the due date. Note that you may find it much easier to create a one bit adder using 2 flip flops and a single full adder first. Extending this configuration to a 4 bit adder is mostly just duplicating the one bit adder circuit. 2