CS 354 | Computer Organization and Systems | Fall 2019 | |
Project 1 - LogicOverviewLogic is at the heart of computer hardware and architecture. We will build some basic logic circuits for several fundamental computer operations In this lab you will develop your logic skills using the freely available and very cool software program Logisim. Learning Goals and Objectives
Common Logic OperationsThere are two distinct logical states, typically True and False. True is often represented by a 1 or a T and on a computer as a high voltage signal. False is often represented by a 0 or a F and on a computer as a low voltage signal. However, these representations are completely arbitrary. There are several logical operations commonly used in defining logical circuits. These were originally defined by George Boole about 150 years ago. These can be thought of as functions that have a finite number of inputs and outputs, therefore they can be defined in a table. See section B-1 for more details.
And
Or
Exclusive Or
Not
Not And
Not Or
Combinational Logic CircuitsLogical operations can be combined to form boolean expressions or functions. The conventions for order of operations in boolean expressions is to perform inversion, then And, then or. Parentheses can be used to group and specify operations in a clear manner. In turn, these logical expressions can be transformed into a visual representation called a combinational logic circuit. There is an exact corresondance between every boolean expression and a combinational logic circuit and the output values can be obtained directly from a truth table. Logical circuits can then be used to perform computations as we will see during the semester. LogisimLogisim is a java-based program that allows one to design, test, and simulate logic circuits. Logisim uses a fairly intuitive GUI to place logic gates, draw connecting wires, set input values, and observe output values. You can download it and run it on your own computer (you will also need a java runtime environment). It is available in the Sleight lab and you can access it by simply running it from a terminal window:
Get acquainted with Logisim by going through the beginner's tutorial. The tutorial guides you through the contruction and testing of a simpe circuit to implement an exclusive-or function using the fundamental AND, OR, and NOT gates. In addition to being able to print your circuit, you can also save your work and reload it later. Print a copy of your annotated XOR circuit to turn in with this lab. DeMorgan's LawsHere are DeMorgan's laws expressed as they would be in a Java program. The first of DeMorgan's laws shows how not distributes with or. ! (A || B) = (!A) && (!B)The second of DeMorgan's laws shows how not distributes with and. ! (A && B) = (!A) || (!B)You can easily prove these by constructing a truth table for each side of the equality and observing that the outputs match. For each of these two laws, create a circuit for the the left-hand side and for the right-hand side, then demonstrate the equivalence of each side to prove these laws. Print a copy of these four circuits to turn in with this lab. MultiplexorsA multiplexor (sometimes called a MUX for short) is a circuit that allows one to select from a set of inputs based on the values of selection inputs. Print a copy of this circuit to turn in with this lab. See page C-10 (in Appendix C) from your text CD and associated discussion for more details. We will see the important role multiplexors play later in the semester. Create a the circuit in figure C.3.2 for the the two-input MUX. Print a copy of the circuits to turn in with this lab. Half AdderThe half adder circuit, as the name implies, is about half of the circuitry required for adding numbers expressed in binary notation. We will see more of this when we get to Chapter 3.
Create a the half-adder circuit using an AND gate and an XOR gate as shown above. Print a copy of the circuit to turn in with this lab. Full AddersThe full adder circuit, as the name implies, is the circuitry required for adding numbers expressed in binary notation. We will see more of this when we get to Chapter 3.
Create a the full adder circuit using two half-adder circuits from your previous step as shown above. Note the two highlighted blocks are simply half-adders. Print a copy of the circuit to turn in with this lab. NAND and NOR are Universal GatesOne interesting observation is that the AND, OR, and NOT gates can be implemented using only NAND gates. That is each of the basic logic functions AND, OR, and NOT can be expressed using only NAND gates. This is also true of the NOR gate! Using only NAND gates, determine logical epressions, truth tables, and build circuits in Logisim to implement the NOT gate, the AND gate, and the OR gate. Print a copy of these three circuits to turn in with this lab. A Footbal Logic Problem
During the last week of the NFL season, there are often several teams competing for playoff spots.
Near the end of the 2004 season, the NFL reported:
if (DEN_win || DEN_tie && (BUF_loss || BUF_tie) || BUF_loss && (JAX_loss || JAX_tie) && (BAL_loss || BAL_tie)) System.out.println("Denver Broncos clinch a playoff berth");Construct a circuit that performs the equivalent logic. Annotate your circuit to make the meanings of the inputs and outputs clear. Print a copy of your circuit to turn in with this lab. DeliverablesThis lab is worth 20 points:
Further Explorations for Fun
ReferencesCopyright © 2019, David A. Reimann. All rights reserved. |