Beruflich Dokumente
Kultur Dokumente
CONTENTS
Lab 1: Introduction to Combinational Design
10
1.1 Introduction
1.2 Hardware Requirement
1.3 Background
1.3.1 Logic Gates and their Properties
1.3.2 Pin Diagram of 3-Input Gates
1.4 Prelab
1.5 Lab Procedure
1.5.1 Experiment 1
1.5.2 Experiment 2
1.5.3 Experiment 3
1.6 Postlab
1.7 Inference
2.1 Introduction
2.2 Equipment
2.3 Background
2.4 Prelab
2.5 Lab Procedure
2.5.1 Experiment 1
2.5.2 Experiment 2
2.6 Postlab
2.7 Inference
3.1 Introduction
3.2 Hardware Requirement
3.3 Background
3.3.1 1-Bit Comparator
3.3.2 2-Bit Comparator
3.3.3 Magnitude Comparator for n-bit
3.4 Prelab
3.5 Lab Procedure
3.5.1 Experiment 1
3.6 Postlab
3.7 Inference
15
19
23
4.1 Introduction
4.2 Hardware Requirement
4.3 Background
4.3.1 Encoder
4.3.2 8-to-3 Bit Priority Encoder
3.3.3 Binary Decoder
4.4 Prelab
4.5 Lab Procedure
4.5.1 Experiment 1
4.5.2 Experiment 2
4.6 Postlab
4.7 Inference
5.1 Introduction
5.2 Hardware Requirement
5.3 Background
5.3.1 Multiplexer
5.3.2 Implementation of a function using MUX
5.3.3 DeMultiplexer
5.4 Prelab
5.5 Lab Procedure
5.5.1 Experiment 1
5.5.2 Experiment 2
5.6 Postlab
6.1 Introduction
6.2 Hardware Requirement
6.3 Background
6.3.1 Flip-flop and their properties
6.4 Prelab
6.5 Lab Procedure
6.5.1 Experiment 1
6.5.2 Experiment 2
6.5.3 Experiment 3
6.5.4 Experiment 4
6.5.5 Experiment 5
6.6 Postlab
29
32
35
7.1 Introduction
7.2 Hardware Requirement
7.3 Background
7.4 Prelab
7.5 Lab Procedure
7.5.1 Experiment 1
7.6 Postlab
8.1 Introduction
8.2 Hardware Requirement
8.3 Background
8.4 Prelab
8.5 Lab Procedure
8.5.1 Experiment 1
8.5.2 Experiment 2
8.6 Postlab
9.1 Introduction
9.2 Hardware Requirement
9.3 Background
9.3.1 Serial In Serial Out Shift Register
9.3.2 Parallel In Parallel Out Shift Register
9.4 Prelab
9.5 Lab Procedure
9.5.1 Experiment 1
9.5.2 Experiment 2
9.6 Postlab
To construct circuits with ICs, a circuit board that allows easy connections to IC pins should be
used. The circuit board contains rows of solder less tie points, a 5-volt power supply, a common
circuit point (ground), toggle switches for input, and LEDs (light emitting diodes) for output.
1.3.1 Logic Gates and their Properties
Gate
Description
Truth Table
Logic Symbol Pin Diagram
The output is active
A B Output
high if any one of the
0 0 Q
input is in active high
0 1 0
state, Mathematically,
1 0 1
OR
1 1 1
Q = A+B
1
AND
NOT
A
0
0
1
1
A
0
1
B
0
1
0
1
Output
Q
0
0
0
1
Output
Q
1
0
NOR
A
0
0
1
1
B
0
1
0
1
Output
Q
1
0
0
0
NAND
A
0
0
1
1
B
0
1
0
1
Output
Q
1
1
1
0
A
0
0
1
1
B
0
1
0
1
Output
Q
0
1
1
0
EXOR
7486
2. A basic 2-input logic circuit has a HIGH on one input and a LOW on the other input, and
the output is HIGH. What type of logic circuit is it?
3. A logic circuit requires HIGH on all its inputs to make the output HIGH. What type of
logic circuit is it?
4. Develop the truth table for a 3-input AND gate and also determine the total number of
possible combinations for a 4-input AND gate.
5. Which logic gate is used as a two-bit adder?
6. Which logic gate acts as an Enable/Inhibit Device?
Figure 1.1
Prepare a truth table, build the circuit and identify the IC pin connection and also give its
Boolean equation.
1.5.2 Experiment #2 Refer to the textbook and data sheet to determine the following:
a. Draw the logic symbol for a 3-input OR gate using 2-input OR gate. Label the inputs A, B, & C and the
output X.
b. Write the Boolean expression for the 3-input OR gate.
c. Complete the truth table for a 3-input OR gate.
1.5.3 Experiment #3 Using TTL logic, design a circuit using individual logic gates to implement
the
following function. Prepare a truth table, build the circuit, and identify all IC pin connections
and verify the circuit operation.
f(x, y,z) = (x.y) + (x.y.z)
Truth Table
Input
Output
X
Y
z
f
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
1.6 Post-lab Questions
1. If the two waveforms A and B shown in figure are applied to the circuit, draw the timing
diagram for the circuit, showing the outputs of G1, G2 and G3 with the inputs A and B.
Figure 1.2
2. Implement the basic gates using Universal gates.
3. Implement NOR using NAND gates and NAND gate using NOR gates.
4. As part of an aircrafts functional monitoring system, a circuit is required to indicate the
status of the landing gears prior to landing. A green LED display turns on if all three gears
are properly extended when the gear down switch has been activated in preparation for
landing. A red LED display turns on if any of the gears fail to extend properly prior to
landing. When a landing gear is extended, its sensor produces a LOW voltage. When a
landing gear is retracted, its sensor produces a HIGH voltage. Implement a circuit to meet
this requirement and give its boolean equation.
5. What type of logic gate does this logic circuit configuration represent
NAND Gate
EXOR Gate
NOR Gate
EXNOR Gate
1.7 Inference
Fig. 2.3
2-bit addition
X0 + Y0 = C1S0
5. Design a circuit that is use to subtract two 2-bit numbers. Draw the logic diagram using
the truth table and Boolean equation(from K-Map) and design the full adder using two
Half subtractor
6. Give the block diagram of 5-bit Parallel Binary Adder.
2.7 Inference
Input
A
0
0
1
1
B
0
1
0
1
Output
A>B
0
0
1
0
A=B
1
0
0
1
A<B
0
1
0
0
Digital comparators actually use Exclusive-NOR gates within their design for comparing the
respective pairs of bits in each of the two words with single bit comparators cascaded together to
produce Multi-bit comparators so that larger words can be compared.
3.3.2 2-bit Comparator:
Bi
0
1
0
1
Xi
1
0
0
1
B1
0
1
0
1
X1
0
0
1
0
A0
0
0
1
1
B0
0
1
0
1
X0
1
0
1
0
Z = A1B1 + X1A0B0
The procedure for binary numbers with more than 2 bits can also be found in the similar way.
For example the 4-bit magnitude comparator, in which
X = x3x2x1x0 (A_EQ_B)
Y = A3B3 + x3A2B2 + x3x2A1B1+ x3x2x1A0B0
(A_GT_B)
Z = A3B3 + x3A2B2 + x3x2A1B1+ x3x2x1A0B0
(A_LT_B)
3.4 Pre-lab Questions
1. Apply each of the following sets of binary numbers to the comparator inputs in Figure 3.3, and
determine the output by following the logic levels through the circuit.
(a) 10 and 10
(b) 11 and 10
Figure 3.3
2. Determine the A = B, A > B, and A<B output for the input numbers shown on the comparator
in figure 3.4.
Figure 3.4
3. Use 74HC85 comparators to compare the magnitude of two 8-bit numbers. Show the
comparators with proper interconnections.
3.5 Lab Procedure
3.6 3.5.1 Experiment #1 Using TTL logic, design a circuit using individual logic gates to
implement the 2-Bit Comparator. Your circuit should be capable comparing the magnitude of
A and B and displaying the result for A = B, A > B and A < B.
Draw the logic diagram and prepare separate truth tables for all the combination.
Build the circuit using the general equation and verify the result.
3.6 PostLab questions
1. For each set of binary numbers, determine the output states for the comparator and also
draw its logic diagram along with the general equation.
(a) A3A2A1A0 = 1100
B3B2B1B0 = 1001
(b) A3A2A1A0 = 1000
B3B2B1B0 = 1001
(c) A3A2A1A0 = 0100
B3B2B1B0 = 1001
2. Expand the circuit in figure 3.4 to 16-bit comparator.
3. Show the logic required to convert a 5-bit binary number to Gray code, and use that logic
to convert the following binary numbers to Gray code.
(a) 10101 (b) 11101
(c) 100101
3.7 Inference
Introduction
The purpose of this experiment is to introduce you to the basics of Encoders and Decoders.
In this lab, you have to implement Priority Encoder and the Boolean function using Decoders.
4.2
Hardware Requirement
a. Equipments
- Digital IC Trainer Kit
b. Discrete Components - 74LS00 Quad 2-Input NAND gate
74LS04 Quad 2-Input NOT gate
74LS08 Quad 2-Input AND gate
74LS11 Triple 3-Input AND gate
74LS32 Quad 2-Input OR gate
4.3
Background
4.3.1 Encoder
Encoder takes all the data inputs one at a time and converts them to a single encoded output.
Then, it is a multi-input data line, combinational logic circuit that converts the logic level "1"
data at its inputs to an equivalent binary code at its output. Generally encoders produce outputs
of 2-bit, 3-bit or 4-bit codes depending upon the number of data input lines and a "n-bit" encoder
has 2n input lines with common types that include 4-to-2, 8-to-3 and 16-to-4 line configurations.
Encoders are available to encode either a decimal or hexadecimal input pattern to typically a
binary or B.C.D. output code.
Priority encoders are available in standard IC form and the TTL 74LS148 is an 8 to 3 bit priority
encoder which has eight active LOW (logic "0") inputs and provides a 3-bit code of the highest ranked
input at its output. Priority encoders output the highest order input first for example, if input lines "D2",
"D3" and "D5" are applied simultaneously the output code would be for input "D5" ("101") as this has the
highest order out of the 3 inputs. Once input "D5" had been removed the next highest output code would be
for input "D3" ("011"), and so on.
Figure 4.2
4.3.3Binary Decoders
A Decoder is the exact opposite to that of an "Encoder" we looked at in the last tutorial. It is
basically, a combinational type logic circuit that converts the binary code data at its input into one of a
number of different output lines, one at a time producing an equivalent decimal code at its output. Binary
Decoders have inputs of 2-bit, 3-bit or 4-bit codes depending upon the number of data input lines, and a
"n-bit" decoder has 2n output lines. Typical combinations of decoders include, 2-to-4, 3-to-8 and 4-to-16
line configurations. Binary Decoders are available to "decode" either a Binary or BCD input pattern to
typically a Decimal output code.
Figure 4.3
In this simple example of a 2-to-4 line binary decoder, the binary inputs A and B determine which output
line from D0 to D3 is "HIGH" at logic level "1" while the remaining outputs are held "LOW" at logic "0".
Therefore, whichever output line is "HIGH" identifies the binary code present at the input, in other words
it "de-codes" the binary input and these types of binary decoders are commonly used as Address
Decoders in microprocessor memory applications.
Figure 4.4
4.4
Pre-lab Questions
1. Determine the logic require to decode the binary number 1011 by producing a HIGH
level on the output.
2. A 3-line-to-8 decoder can be used for octal-to-decimal decoding. When a binary 101 is
on the inputs, which output line is activated?
3. How many 74HC154 1-0f-16 decoders are necessary to decode a 6-bit binary number?
4. Explain the role of Encoder in code converters?
5. What is the use of Priority Encoder?
6. State the significant application of Encoder and Decoder.
7. Differentiate between Decoder and Demultiplexer.
4.5
Lab Procedure
4.5.1 Experiment #1
Priority Encoder
A priority encoder is an encoder circuit with priority. If two or more inputs are equal to 1, the
input wit the highest priority will take precedence. The truth table of a 4-input priority encoder is
shown below. An output V is added which is set to 1 when one or more inputs are equal to 1, or
0 otherwise. The other two outputs are not inspected when V equals 0 and are specified as dontcare conditions. Note that whereas Xs in output columns represent dont-care conditions, the
Xs in the input columns are useful for representing a truth table in compact form. For example,
input X100 represents the two input combination 0100 and 1100.
D0
0
1
X
X
X
Inputs
D1 D2
0
0
0
0
1
0
X 1
X X
D3
0
0
0
0
0
Outputs
x y V
0 0 0
0 0 0
0 1 1
1 0 1
1 1 1
4.5.2 Experiment #2 Implement the Half Adder using 4 x 2 decoder. Use AND and NOT
gates to construct the decoder to produce active high output and verify the truth table of Full
Adder.
a. Draw the block diagram to implement Half Adder using 4x2 Decoder.
b. Draw the Truth Table of 4x2 Decoder and Half Adder
c. Draw the logic diagram using gates and verify the truth table of Half Adder using the 4x2
Decoder.
4. 6 PostLab questions
1. Given the following two functions:
(a) f(x, y, z) = m(1, 3, 5)
(b) g(x, y, z) = m(0, 1, 4, 5, 6)
How do you implement each of them using a single 3x8 decoder with active-low(negated)
outputs as shown in Figure 4.6. Assume that fan-in of each gate is limited to 3.
Figure 4.6
2. Implement Full Adder using 3x8 Decoder for active low output and draw its truth table.
3. Draw the logic symbol, Truth Table and Logic Diagram of
(a) Decimal to BCD Encoder
(b) Octal to Binary Encoder
4. Draw the logic symbol of 4x16 Decoder using 3x8 Decoder.
5. Construct the truth table to decode Binary to 7-Segment
Draw the logic diagram for the above using the Boolean equation.
4.7 Inference
5.3.3 De-multiplexers
= (0, 3, 6, 7)
De-multiplexers or "De-muxes", are the exact opposite of the Multiplexers we saw in the
previous tutorial in that they have one single input data line and then switch it to any one of their
individual multiple output lines one at a time. The De-multiplexer converts the serial data signal
at the input to a parallel data at its output lines.
They are digital switches which connect data from one input source to one of n outputs. Usually
implemented by using n-to-2n binary decoders where the decoder enable line is used for data
input of the de-multiplexer.The figure below shows a de-multiplexer block diagram which has
got s-bits-wide select input, one b-bits-wide data input and n b-bits-wide outputs.
Figure 5.9
5.7 Inference
FlipFlop
Name
SR
Flip-Flop
Symbol
Characteristic Table
R Q(next)
Characteristic
Equation
Excitation Table
Q Q(next) S R
Q(next) = S + RQ
SR = 0
0 X
1 0
0 1
X 0
JK
K Q(next)
Q Q(next) J K
Q
Q(next) = JQ +
KQ
0 X
1 X
X 1
X 0
Q Q(next) D
D
Q(next)
Q(next) = D
Q Q(next) T
T
T
Q(next)
Q(next) = TQ +
TQ
The characteristic table is useful during the analysis of sequential circuits when the value of flip-flop
inputs are known and we want to find the value of the flip-flop output Q after the rising edge of the clock
signal. As with any other truth table, we can use the map method to derive the characteristic equation for
each flip-flop, which are shown in the third column of Table 7.1.
During the design process we usually know the transition from present state to the next state and wish to
find the flip-flop input conditions that will cause the required transition. For this reason we will need a
table that lists the required inputs for a given change of state. Such a list is called the excitation table,
which is shown in the fourth column of Table 7.1. There are four possible transitions from present state to
the next state. The required input conditions are derived from the information available in the
characteristic table. The symbol X in the table represents a "don't care" condition, that is, it does not
matter whether the input is 1 or 0.
6. 4 Pre-lab Questions
1 Describe the main difference between a gated S-R latch and an edge-triggered S-R flip-flop.
2 How does a JK flip-flop differ from an SR flip-flop in its basic operation?
3 Describe the basic difference between pulse-triggered and edge-triggered flip-flops.
4 What is use of characteristic and excitation table?
5 What are synchronous and asynchronous circuits?
6 How many flip flops due you require storing the data 1101?
7 What is propagation delays set up time and hold time?
6.5 Lab Procedure
6.5.1 Experiment #1 Study the characteristic of RS Flip-flop constructed using TTL logic gates
6.5.3 Experiment #3 Study the characteristic of JK Flip-flop constructed using TTL logic gates
(b) Verify the Characteristic Table of T Flip-flop and draw its timing diagram
6.5.4 Experiment #5 Verify the function table of IC7474 and IC7473
After the 3rd clock pulse both outputs of FF0 and FF1 are HIGH. The positive edge of the 4th clock
pulse will cause FF2 to change its state due to the AND gate.
Note that for simplicity, the transitions of Q0, Q1 and CLK in the timing diagram above are
shown as simultaneous even though this is an asynchronous counter. Actually, there is some
small delay between the CLK, Q0 and Q1 transitions.
Usually, all the CLEAR inputs are connected together, so that a single pulse can clear all
the flip-flops before counting starts. The clock pulse fed into FF0 is rippled through the other
counters after propagation delays, like a ripple on water, hence the name Ripple Counter.
The 2-bit ripple counter circuit above has four different states, each one corresponding to a count
value. Similarly, a counter with n flip-flops can have 2 to the power n states. The number of
states in a counter is known as its mod (modulo) number. Thus a 2-bit counter is a mod-4
counter.
A mod-n counter may also described as a divide-by-n counter. This is because the most
significant flip-flop (the furthest flip-flop from the original clock pulse) produces one pulse for
every n pulses at the clock input of the least significant flip-flop (the one triggers by the clock
pulse). Thus, the above counter is an example of a divide-by-4 counter.
Two of the most common types of shift register counters are: the Ring counter and the Johnson
counter. They are basically shift registers with the serial outputs connected back to the serial
inputs in order to produce particular sequences. These registers are classified as counters
because they exhibit a specified sequence of states. The Ring and the Johnson counter must
initially be forced into a valid state in the count sequence because they operate on a subset of the
available number of states. Otherwise, the ideal sequence will not be followed.
8.4Prelab questions
1. What do you mean by Glitch?
2. How many flip-flops are required to produce a divide-by-64 device?
3. Why Asynchronous counter is called as Ripple Counter.
4. What do you mean by synchronous reset and asynchronous reset.
5. What is the use of Preset input?
6. What is use of Ring and Johnsons Counter?
8.5 Lab Procedure
8.5.1 Experiment#1 Design a Decade Asynchronous Counter/Divide-by-Ten Asynchronous
Counter.
a. Draw the State table and Logic Diagram.
b. Draw the timing diagram and verify its output.
8.5.2 Experiment #2 Design a Sequential Circuit that is used to generate the output pattern 110.
Connect the Preset input of D flip-flop to Logic0/Logic 1 to produce the required pattern.
a. Draw the State table and Logic Diagram.
b. Draw the timing diagram and verify its output.
8.6 Postlab questions
a.
Draw the logic diagram of Mod 12 Asynchronous Counter and its timing diagram.
b.
f.
Figure 8.3 Logic Diagram
8.7 Inference
Figure 9.2 Logic Diagram The D's are the parallel inputs and the Q's are the PIPO
parallel outputs. Once the register is clocked, all the
data at the D inputs appear at the corresponding Q outputs simultaneously.
a. Draw the logic diagram using IC7474 and enter the data for the given function table.
b. Draw its Timing Diagram
9.6 PostLab questions
1.Draw the diagram of 4-Bit Bidirectional shift register.
2. What is PISO shift register and draw its logic diagram.
3. What is Universal Shift Register and what is its IC number.
4. Construct a 4-bit SISO and PIPO shift register. To register the input data 1101
97. Inference
Appendix
Data Sheet of TTL logic family IC