Lab 10: Digital Logic
1. Objectives
By the end of this laboratory session students should be able to:
 Interpret a truth table
 Understand a diagram for a chip containing logic gates
 Wire a combinational circuit on a breadboard
 Wire a sequential logic circuit on a breadboard
2. Background
Digital logic is the basis for all modern computing.
The smallest unit of digital information is a binary digit, or bit. A bit can be either true or false.
Bit Logic State  Voltage State  Binary Value  Voltage 

True  High  1  +5 V 
False  Low  0  0 V 
In this lab, we will introduce both combinational and sequential logic.
Combinational digital logic functions include AND, OR, NOT, NAND. The output of a combinational logic circuit evaluates almost immediately with a change in input.
Sequential or clocked logic functions include FLIPFLOPs and other types of memory. The output of a sequential logic circuit updates in response to a clock edge.
The logic values of an operator can be represented in a truth table. See Table 2 and Table 3 below for a summary of the digital logic functions used in this exercise.
A couple of notes:
 For this lab, all the chips use TTL, (transistor transistor logic).
 TTL circuits are powered by +5 V. Don’t forget to hook up the power. In this procedure, active low signals are indicated by a “*” (e.g. Q* is an active low signal)
Operator  Logic Symbol  Chip Number  Truth Table 

NOT (Inverter) 
7404  IN OUT 1 0 0 1 

OR  7432  A B OUT  0 0 0 0 1 1 1 0 1 1 1 1 

AND  7408  A B OUT  0 0 0 0 1 0 1 0 0 1 1 1 

NAND  7400  A B OUT  0 0 1 0 1 1 1 0 1 1 1 0 
Operator  Logic Symbol  Chip Number  Truth Table 

D FLIP FLOP 
7474  D CLK Q Q'  X 0 u u X 1 u u 0 ↑ 0 1 1 ↑ 1 0 0 ↓ u u 1 ↓ u u 
Note: X = “Don’t care”, u = unchanged and not Q = Q'
.
3. Laboratory Equipment
 Powered breadboard with logic indicators and logic switches. (e.g. Global Specialties PB503)
 Combinational logic IC’s
 7402 – hex inverter
 7408  quad 2 input and gate
 7432 – quad 2 input or gate
 Sequential logic IC’s
 7474 – Dual D Type flip flop
 1 k$\Omega$ resistors
4. Procedure
4.1. Breadboard Setup
Power switch
a. It’s good practice to turn the power
OFF
when building or changing a circuit.b. Be sure your powered breadboard is turned
ON
when you are testing your circuits. When the power isON
, the switch in the upper left will glow red.Logic Switches
a. On the lower left of the powered breadboard is an area marked
logic switches
.b. There are 8 switches S1–S8 that can put out a logic low or a logic high. For this lab set the switch labeled
+5, +V
to+5
.Logic indicators
a. On the righthand side of the powered breadboard is an area marked
logic indicators
and there are 8 red LEDs and 8 green LEDs. The logic indicators will indicate the logic state on a wire as follows: RED LED ON → a logic HIGH
 GREEN LED ON → a logic LOW
b. For this lab:
 Set the upper switch (labeled
+5, +V
) to+5
 Set the lower switch (labeled
TTL, CMOS
) toTTL
c. Test the operation of the logic switches & logic indicators by running a wire from the output of one of the logic switches, to the input of one of the logic indicators, as shown below in Figure 2. As you flip the switch, the logic indicator should change state.
 RED LED ON → a logic HIGH
Debounced Pushbuttons
a. On the lefthand side of the powered breadboard is an area marked
Debounced Pushbuttons
. We will use these buttons to create “clean” pulses for the digital clock inputs.b. Test the operation of the debounced pushbuttons & logic indicators by building and testing the circuit shown below in Figure 3.
4.2. Combinational Logic
 Construct the circuit shown below in Figure 4.
Use the logic switch and the logic indicators to construct a truth table. Confirm that the truth table is correct for an inverter. Include the table in your lab report.
Construct the circuit shown below in Figure 5.
Use the logic switches and the logic indicator to construct a truth table. Confirm that the truth table is correct for a two input AND gate.
Construct the circuit shown below in Figure 6 using OR gates found in the 7432 chip. Refer to the datasheet for chippin diagrams.
Use the logic switches and the logic indicators to construct a truth table for this circuit. Include this truth table in your results.
Design and build a combinational logic circuit with three inputs, A, B, C and one output, OUT, that has the behavior described below. Include a truth table, and a sketch of the logic circuit in your lab report. Be sure to demonstrate your circuit’s operation to your TA.
If input A is high:
* the output will be high
* inputs B & C are ignored
If input A is low:
* and BOTH inputs B and C are high, then the output is high
* for all other combinations of B and C the output is low.
4.3. Sequential Logic
 Construct the circuit shown below in Figure 7. This is a single Dtype flipflop circuit.
 Use the logic switches and the logic indicators to construct a truth table. Confirm that the truth table is correct for a D type Flipflop. Include the table in your results.
What is the relation between the Q and the Q* outputs?
Starting from the circuit above, Construct the circuit shown below in Figure 8.
What happens each time you press the button?
Construct the circuit shown below in Figure 9 using both halves of the DFlipFlop Chip. Refer to the datasheet for chippin diagrams.
Record the sequence of the two indicators. Include the table in your results.
What is this circuit doing?
5. Results
 Include the Truth Table from your circuit in step 2, Section 4.2.
 Include the Truth Table from your circuit in step 4, Section 4.2. Does the circuit work as expected?
 Include the Truth Table from your circuit in step 6, Section 4.2.
 Include a truth table, and a sketch of the combinational logic circuit you designed in step 7, Section 4.2. Does the circuit work as expected?
 Include the Truth Table from your circuit in step 2, Section 4.3. Does the circuit work as expected?
 What happens when the CLK input changes from low to high?
 What happens when the CLK input changes from high to low?
 What is the relation between the Q and the Q* outputs?
 From step 5, Section 4.3., describe what happens each time you press the button.
 From steps 6, 7, and 8 in Section 4.3., describe what happens each time you press the button, and record the sequence in a table.
 What is the circuit in Figure 8 doing? (Hint, read about binary numbers on Wikipedia.)