Digital Techniques Complete Manual
Digital Techniques Complete Manual
Digital Techniques Complete Manual
Lab Manual
Digital Techniques
AT-2226
Digital Techniques
AT-2226
Experiment No.1
Introduction to Digital Logic Trainer
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 1
Objective:
To familiarize our self with the use of trainer and to explore the different components of
Digital Trainer.
Equipment:
Theory:
All experiments included in this manual have been performed on the EES-2001 logic trainer.
Before starting actual experiments; let us first familiarize our self with the use of EES-2001
trainer.
Measure the Logic Level Coming from One of the Logic Switch (S2 to S9):
Connect the outputs S2 AND S2’ of switch (S2) to L0 and L1 respectively. The LED’s should
indicate the logic levels originating from the S2 switch.
4
BCD logic input:
Connect switches S2, S3, S4 and S5 to the four input marked as 8 4 2 1 on the SBB-63 board.
Apply BCD input using switches, it would be decoded and displayed on the seven- segment
display.
1. Set switch S2 at logic ‘1’ and rest of the switches at ‘0’, BCD digit ‘8’ will be
displayed.
2. Set switch S3 at logic ‘1’ and rest of the switches at ‘0’, BCD digit ‘4’ will be
displayed.
3. Set switch S4 at logic ‘1’ and rest of the switches at ‘0’, BCD digit ‘2’ will be
displayed.
4. Set switch S5 at logic ‘1’ and rest of the switches at ‘0’, BCD digit ‘1’ will be
displayed.
5. Set switches at the appropriate positions to display BCD numbers (0-9)
Conclusion:
_______________________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________________________
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.2
Verification of Truth Tables of Basic Logic Gates
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 2
Verification of Truth Tables of Basic Logic Gates
Objective:
To check the operation of Basic logic gates according to their truth tables, using proper IC
chips.
Equipment:
1. Logic Trainer
2. Components (IC’s):
74LS08, 74LS04, 74LS32
3. Connecting/Jumper Wires
Theory:
In logic operations two possible conditions exist for any input or output: true or false. The
binary number system uses only two digits, 1 and 0, so it is perfect for representing these
states. Digital logic gates provide the basic building blocks these gates perform different
operations on the binary information. These logic gates are used in different combinations to
implement large complex systems. Digital logic gates are represented and identified by
unique symbols. These symbols are used in circuit diagrams to describe the function of a
digital circuit.
Digital Logic Gates function is represented by a function table or a truth table that describes
all the Logic gate outputs for every possible combination of inputs. As the logic gates operate
on binary values therefore these function tables describe the relationship between the input
and output in terms of binary values. The function of a logic gate is also described in terms
of an expression.
Logic gates are practically used in circuits where the inputs to the logic gates vary in time.
Timing diagrams are used to describe the response of the logic gates in a certain period of
time with respect to changing input. Timing diagrams graphically show the actual
performance of the logic gate to changing inputs for a predetermined period of time or
sequence of input signals.
The three fundamental gates are the AND, OR and NOT gates.
Logic gates are electronic circuits which perform logical functions on one or more inputs to
produce one output. There are seven logic gates. When all the input combinations of a logic
gate are written in a series and their corresponding outputs written along them, then this
input/ output combination is called Truth Table. OR, AND, NOT are basic gates. Various
gates and their working are explained here.
7
AND Gate:
The AND gate performs a logical multiplication commonly known as AND function. The
output is high when both the inputs are high. The output is low level when any one of the
inputs is low.
Logic Symbol
A
Y
B
Pin Configuration:
7408
A
1 VCC 14
B
2 B 13
3 Y 12
4 Y 11
A
B B
5 10
6 Y A 9
7 GND Y 8
OR Gate:
The OR gate performs a logical addition commonly known as OR function. The output is high
when any one of the inputs is high. The output is low level when both the inputs are low.
Logic Symbol
A
Y
B
1 A 14
VCC
2 B B 13
3 Y 12
A
4 A Y 11
B
B
5 10
Y A
6 9
7 Y 8
GND
NOT Gate:
The NOT gate is called an inverter. The output is high when the input is low. The output is low
when the input is high.
Logic Symbol:
A Y
Pin Configuration:
7404
1 A 14
VCC
A
2 Y 13
A Y
3 12
4 Y A 11
A Y
5 10
6 Y A 9
7 GND 8
Y
Truth Table:
The AND operation produces an output of 1 (or high) when all of the inputs are 1 (or high). It
produces an output of 0 (or low) when any or all of the inputs are 0 (or low). “Truth Table”
for AND operation is as given below:
Inputs Outputs
A B Desired Y=A.B A.B Observed
0 0 0
0 1 0
1 0 0
1 1 1
Task # 2
Truth Table:
The OR operation produces an output of 1 (or high) when any one input is at logic level 1 (or
high). It produces an output of 0 (or low) when all of the inputs are 0 (or low). “Truth Table”
for OR operation is as given below:
Table 2. 2: Truth Table of OR Gate
Inputs Outputs
Desired
A B Observed
Y=A+B
0 0 0
0 1 1
1 0 1
1 1 1
Task # 3
Logical “not” operation:
NOT gate is also known as an inverter. The name indicates that the NOT gate should be
performing an inversion function. The NOT gate has a single input and a single output.
Truth Table:
The input signal applied across the single input of the NOT gate is inverted and is available at
the output. The function of the NOT gates is described by the function table or truth table
represented
Table 2. 3: Truth table of NOT Gate
Input Output
Desired
A Observed
Y
0 1
1 0
Procedure:
______________________________________________________________________________________________________________________________________________
______________________________________________________________________________________________________________________________________________
______________________________________________________________________________________________________________________________________________
______________________________________________________________________________________________________________________________________________
______________________________________________________________________________________________________________________________________________
______________________________________________________________________________________________________________________________________________
______________________________________________________________________________________________________________________________________________
______________________________________________________________________________________________________________________________________________
______________________________________________________________________________________________________________________________________________
______________________________________________________________________________________________________________________________________________
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.3
Realization of Gates using Universal Gate (NAND Gate)
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 3
Realization of Gates using Universal Gate (NAND Gate)
Objective:
To check the operation of NAND Gate according to their truth tables, using proper IC chips.
Equipment:
1. Digital Logic Trainer
2. IC 7400
3. Connecting wires
Theory:
Digital circuits are more frequently constructed with NAND or NOR gates than with
AND and OR gates. NAND and NOR gates are easier to fabricate with electronic
components and are the basic gates used in all IC digital logic families.
NAND GATE:
The NAND gate is a contraction of AND-NOT. The output is high when both inputs
are low and any one of the input is low. The output is low level when both inputs are
high.
Logic eqn. Y = (A.B)’
Logic Symbol
A
Y
B
B B
Inputs Outputs
2 13
Y
A
A B Y = (A+B)’
3 12
4
A Y
11
0 0 1
B
5
B
10 0 1 0
Y A
6 9 1 0 0
Y
7 GND 8
1 1 0
14
EX-OR GATE:
The output is high when any one of the inputs is high. The output is low when both the inputs are
low and both the inputs are high.
Logic Symbol:
A
Y
B
B B
2 13
A
3 Y 12
Y
4 A 11
5 B B 10
6 Y A 9
Y
7 GND 8
Inputs Outputs
A B Y = A’B+AB’
0 0 0
0 1 1
1 0 1
1 1 0
Task 1:
NAND Gate as AND Gate:
A NAND produces complement of AND gate. So, if the output of a NAND gate is inverted, overall
output will be that of an AND gate.
Y = ((A.B)’)’= (A.B)
A (A.B) A.B
B
Inputs Output
Desired
A B Observed
x=A.B
0 0 0
0 1 0
1 0 0
1 1 1
Task 2:
NAND gates as OR gate:
From De Morgan’s theorems:
(A.B)’ = A’ + B’
Similarly,
So, give the inverted inputs to a NAND gate, obtain OR operation at output
A A
(A B ) = A+B
B
B
Inputs Output
Desired
A B Observed
x=A+B
0 0 0
0 1 1
1 0 1
1 1 1
Task 3:
NAND gates as NOT gate:
A NOT produces complement of the input. It can have only one input, tie the inputs of a NAND gate
together. Now it will work as a NOT gate. Its output is
Y = (A.A)’ = (A)’
A A
Verify NOT gate operation using NAND gates (See Figure 3.7)
Show your results to the lab instructor.
1 0
Task 4:
NAND gates as EX-OR gate:
The output of a two input EX-OR gate is given by:
Y = A’B + AB’
EX-OR gate can be implemented using four NAND gates as follows.
Now the output from gate no. 4 is the overall output of the configuration.
Q = [(A (AB)’)’ (B (AB)’)’]’
= (A (AB)’)’’ + (B (AB)’)’’
= (A (AB)’) + (B (AB)’)
= (A (A’ + B)’) + (B (A’ + B’))
= (AA’ + AB’) + (BA’ + BB’)
= (0 + AB’ + BA’ + 0)
= AB’ + BA’
So Q = AB’ + A’B = (A+B). (A’+B’)
A
Inputs Output
Desired
A B Observed
Q = AB’ + A’B
0 0 0
0 1 1
1 0 1
1 1 0
Procedure:
1. Insert the IC 74xx on the trainer’s breadboard.
2. Use any two Logic Switches (S2 to S9) of the trainer for Input and any one of the LEDs (L0 to
L15) of the trainer for Output indication.
3. Connect +5V to pin 14 (Vcc) and Ground to pin 7 (GND) of the IC.
4. By setting various combinations of the two switches verify that the output of the gate is in
accordance with the Truth Table shown above.
5. Record your observation.
Conclusion:
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.4
Realization of Gates using Universal Gate (NOR Gate)
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 4
Realization of Gates using Universal Gate (NOR Gate)
Objective:
To check the operation of Universal NOR gate according to their truth tables, using proper IC chips.
Equipment:
1. Digital Logic Trainer
2. IC 7402
3. Connecting wires
Theory:
Digital circuits are more frequently constructed with NAND or NOR gates than with
AND and OR gates. NAND and NOR gates are easier to fabricate with electronic
components and are the basic gates used in all IC digital logic families.
NOR GATE:
The NOR gate is a contraction of OR-NOT. The output is high when both inputs are low. The output
is low when one or both inputs are high.
Logic Symbol:
A
Y
B
1 Y 14
VCC
A Y
2 13
B B 12
3
4 Y A 11
A
5 Y 10
B B
6 9
7 GND 8
A
21
Digital Techniques Lab 4
Inputs Outputs
A B Y = (A.B)’
0 0 1
0 1 1
1 0 1
1 1 0
22
NOR Gate Implementation
Task 1:
NOR Gate as AND Gate:
From De Morgan’s theorems:
(A+B)’ = A’. B’
Similarly,
(A’+B’)’ = A’’. B’’ = A.B
So, give the inverted inputs to a NOR gate, obtain AND operation at output.
A
Verify AND gate operation using NOR gates (See Figure 4.3)
Show your results to the lab instructor.
Inputs Output
Desired
A B Observed
Q=A.B
0 0 0
0 1 0
1 0 0
1 1 1
Task 2:
NOR gates as OR gate:
A NOR produces complement of OR gate. So, if the output of a NOR gate is inverted, overall output
will be that of an OR gate.
Q = ((A+B)’)’= (A+B)
A
Q
Inputs Output
Desired
A B Observed
Q=A+B
0 0 0
0 1 1
1 0 1
1 1 1
Task 3:
NOR gates as NOT gate:
A NOT produces complement of the input. It can have only one input, tie the inputs of a NOR gate
together. Now it will work as a NOT gate. Its output is
Q = (A+A)’ = (A)’
A Q
Verify NOT gate operation using NOR gates (See Figure 3.13)
Show your results to the lab instructor.
Table 4.4: Truth table of NOR Gate as NOT Gate
Inputs Output
A Desired Observed
Q=A'
0 1
1 0
Task 4:
NOR gates as EX-NOR gate:
The output of two input EX-NOR gate is given by: Y = AB + A’B’. EX-NOR gate can be
implemented using four NOR gates as follows.
Now the output from gate no. 4 is the overall output of the configuration.
So Y = AB + A’B’
Verify EX-NOR gate operation using NOR gates (See Figure 3.14)
Show your results to the lab instructor.
Table 4.5: NOR Gate as Ex-NOR
Inputs Output
Desired
A B Observed
Q = AB + A’B’
0 0 1
0 1 0
1 0 0
1 1 1
Procedure:
1. Insert the IC 74xx on the trainer’s breadboard.
2. Use any two Logic Switches (S2 to S9) of the trainer for Input and any one of the LEDs (L0 to
L15) of the trainer for Output indication.
3. Connect +5V to pin 14 (Vcc) and Ground to pin 7 (GND) of the IC.
4. By setting various combinations of the two switches verify that the output of the gate is in
accordance with the Truth Table shown above.
5. Record your observation.
Conclusion:
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.5
Verification of theorems of Boolean Algebra
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 5
Verification of theorems of Boolean Algebra
Objective:
Equipment:
1. Digital Logic Trainer
2. IC 7408, IC 7432, IC 7404
3. Connecting wires
Theory:
Digital Logic Gates function is represented by a function table or a truth table that Digital Logic
describes all the Logic gate outputs for every possible combination of inputs. As the logic gates
operate on binary values therefore these function tables describe the relationship between the input
and output in terms of binary values. The function of a logic gate is also described in terms of an
expression.
The basic Laws of Boolean Algebra that relate to the Commutative Law allowing a change in
position for addition and multiplication, the Associative Law allowing the removal of brackets for
addition and multiplication, as well as the distributive Law allowing the factoring of an expression,
are the same as in ordinary algebra.
Each of the Boolean Laws above are given with just a single or two variables, but the number of
variables defined by a single law is not limited to this as there can be an infinite number of variables
as inputs too the expression. These Boolean laws detailed above can be used to prove any given
Boolean expression as well as for simplifying complicated digital circuits.
27
Task # 1
De morgan’s Law:
Expression 1:
(X+Y)’=X’. Y’
L.H.S
Circuit Diagram:
x
(X + Y) (X + Y)
Inputs Outputs
X Y X+Y (X+Y)’
0 0
0 1
1 0
1 1
R.H.S
Circuit Diagram:
x X
X .Y
y Y
Inputs Outputs
X Y X’ Y’ X’.Y’
0 0
0 1
1 0
1 1
Expression 2 :
(X.Y)’=X’+Y’
L.H.S
Circuit Diagram:
X
(X.Y) (X.Y)
Y
Figure 5.3: Logic circuit
Truth table:
Inputs Outputs
X Y X.Y (X.Y)’
0 0
0 1
1 0
1 1
R.H.S
Circuit Diagram:
x X
X +Y
y Y
Inputs Outputs
X Y X’ Y’ X’+Y’
0 0
0 1
1 0
1 1
Task # 2
Absorption theorem:
Expression 1:
X + (X.Y) = X
X
X + (X.Y)
X.Y
Y
Truth table:
Inputs Outputs
X Y Observed
0 0
0 1
1 0
1 1
Expression 2:
X . (X +Y) = X
X X . (X+Y)
X+Y
Y
Truth table:
Inputs Outputs
X Y Observed
0 0
0 1
1 0
1 1
Procedure:
1. Insert the IC 74xx on the trainer’s breadboard.
2. Use any two Logic Switches (S2 to S9) of the trainer for Input and any one of the LEDs (L0 to
L15) of the trainer for Output indication.
3. Connect +5V to pin 14 (Vcc) and Ground to pin 7 (GND) of the IC.
4. By setting various combinations of the two switches verify that the output of the gate is in
accordance with the Truth Table shown above.
5. Record your observation.
Conclusion:
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________________________
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.6
Usage of K-map to simplify Boolean function
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 6
Usage of K-map to simplify Boolean function
Objective:
Equipment:
1. Digital Logic Trainer
2. IC 7408, IC 7432, IC 7404
3. Connecting wires
Theory:
Karnaugh maps:
Karnaugh maps or K-maps for short provide another means of simplifying and optimizing logical
expressions. This is a graphical technique that utilizes a sum of product (SOP) form. SOP forms
combine terms that have been AND together that then get OR together. This format lends itself to the
use of De Morgan's law which allows the final result to be built with only NAND gates. The K-map
is best used with logical functions with four or less input variables.
One of the advantages of using K-maps for reduction is that it is easier to see when a circuit has been
fully simplified. Another advantage is that using K-maps leads to a more structured process for
minimization.
In order to use a K-map, the truth table for a logical expression is transferred to a K-map grid. The
grid for two, three, and four input expressions are provided in the tables below. Each cell corresponds
to one row in a truth table or one given state in the logical expression. The order of the items in the
grid is not random at all; they are set so that any adjacent cell differs in value by the change in only
one variable. Because of this, items can be grouped together easily in rectangular blocks of two, four,
and eight to find the minimal number of groupings that can cover the entire expression. Note that
diagonal cells require that the value of more than two inputs change, and that they also do not form
rectangles.
Table 6.1: Four-Variable Map Table 6.2: Two-Variable Map Table 6.3: Three-Variable Map
35
Digital Techniques Lab 6
B’C’ B’C BC BC’
00 01 11 10
A’
0
A
1
36
Task
Circuit Diagram:
Truth Table:
A B C Observed
We get the above truth table and want to simplify it by using Karnaugh Map.
K-MAP:
By using K-map simplify the Boolean expression.
00 01 11 10
0
1
Circuit Diagram:
Truth Table:
A B C Observed
Simplification of Boolean expressions using algebraic manipulation is tedious and time consuming,
and lacks specific rules to predict each succeeding step in the manipulative process. The map method
is an efficient and straightforward procedure for minimizing Boolean functions of up to 4 variables.
Maps for more than 4 variables are not easy to use. However, we will be working only with functions
of up to 4 variables.
Procedure:
1. Insert the IC 74xx on the trainer’s breadboard.
2. Use any two Logic Switches (S2 to S9) of the trainer for Input and any one of the LEDs (L0
to L15) of the trainer for Output indication.
3. Connect +5V to pin 14 (Vcc) and Ground to pin 7 (GND) of the IC.
4. By setting various combinations of the two switches verify that the output of the gate is in
accordance with the Truth Table shown above.
5. Record your observation.
Conclusion:
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.7
Implementation of Full Adder and 4-Bit Parallel Adder using IC 7483
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 7
Objective:
Equipment:
1. Digital Logic Trainer
2. IC 7408, 7404, 7483 & IC 7486
3. Connecting wires
Theory:
Digital computers perform a variety of information-processing tasks. Among the basic functions
encountered are various arithmetic operations. The most basic arithmetic operations are, no doubt,
the addition and subtraction of binary digits (bit).
HALF ADDER:
The possible operations, when we want to add only two bits, would be the followings:
0+0=0
0+1=1
1+0=1
1 + 1 = 0 & Carry 1
FULL ADDER:
We know that in practice, all addition operations must take into account the Carry bit (or digit) from
the previous operation. Adders in digital computers also take into account the Carry bit from last
operation and add it with the Augend and Addend bits of the present operation to complete the
addition operation. The possible operations are:
0 + 0 + 0 (carry) = 0
0 + 0 + 1 (carry) = 1
0 + 1 + 0 (carry) = 1
41
1 + 1 + 0 (carry) = 0 & carry 1 (to be added to next higher digit)
The adder that performs the addition of three bits (two significant bits and a previous carry) is called
a Full Adder.
We arbitrarily assign symbols A and B to the two inputs and S (for sum) and Cout (for Carry) to the
two outputs. Truth table for Half Adder as shown below
Table 7. 1: Truth Table of Half Adder
Output
Input Observed
Desired
A B S Cout S Cout
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
The simplified Boolean function for the two outputs can be written from this truth table as:
S = A'.B +A.B'
or
Cout = A.B
The circuit diagram for the Half Adder to implement above mentioned Boolean function could
be quite a few. We will however verify only one.
A
S
B
A
Cout
B
As mentioned in the beginning, a full-adder is a combinational circuit that forms the arithmetic
sum of three input bits (two significant bits and a previous carry bit) and two output bits. We
arbitrarily assign symbols A and B to the two significant bit inputs and Cin for the Carry from the
previous lower significant position, and S (for sum) and Cout (for Carry) to the two outputs. Truth
table for the Full Adder is shown below:
Output Output
Input
Desired Observed
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Simplified Boolean function for the two outputs can be written from this truth table as:
S = C’ (A’B+AB’) +C (A’B+AB’)’
= C’ (A’B+AB’) +C (AB+A’B’)
A
B
Cout
Adders that are available in integrated circuit form are parallel binary adders. A 4- Bit parallel
adder actually consists of four full adders connected in parallel. The carry output of each adder
is internally connected to the carry input of the next higher order adder. Fig 5 shows the
internal functional structure of 7483 IC in which 4 full adders are shown as separate entity.
Figure 6 is connection diagram for full adder function.
44
Table 7. 3: Truth Table of 4 bit binary parallel adder IC-7483 to be verified
A A A A B B B B C S S S S C S S S S
A B Sum
3 2 1 0 3 2 1 0 o 3 2 1 0 o 3 2 1 0
0 0 0 1 0 0 0 1 1 1 0 0 0 1 0 2
0 0 1 1 0 0 0 1 3 1 0 0 1 0 0 4
0 1 0 0 0 0 1 0 4 2 0 0 1 1 0 6
0 1 0 0 0 1 0 0 4 4 0 1 0 0 0 8
0 1 0 1 0 1 0 0 5 4 0 1 0 0 1 9
0 1 0 1 0 1 0 1 5 5 0 1 0 1 0 10
1 0 0 0 0 1 0 0 8 4 0 1 1 0 0 12
1 0 0 1 0 1 1 0 9 6 0 1 1 1 1 15
1 0 0 1 1 0 0 0 9 8 1 0 0 0 1 17
1 0 0 1 1 0 0 1 9 9 1 0 0 1 0 18
Procedure:
1. Insert the IC 74xx on the trainer’s breadboard.
2. Use any two Logic Switches (S2 to S9) of the trainer for Input and any one of the LEDs (L0
to L15) of the trainer for Output indication.
3. Connect +5V to pin 14 (Vcc) and Ground to pin 7 (GND) of the IC.
4. By setting various combinations of the two switches verify that the output of the gate is in
accordance with the Truth Table shown above.
45
5. Record your observation.
Conclusion:
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.8
Implementation of Full Subtractor and 4-Bit Parallel Subtractor using IC 7483
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 8
Objective:
Equipment:
1. Digital Logic Trainer
2. IC 7408, 7404, 7483 & IC 7486
3. Connecting wires
Theory:
In binary subtraction, when larger digit is to be subtracted from a smaller digit, it becomes necessary
to BORROW a value from the next higher position. Thus the binary subtraction results in the
following basic operations
0-0=0
0 - 1 = 1, with a 1 borrowed from next higher digit position (which became 11 binary on reaching
current position).
1-0=1
1-1=0
The arithmetic element that performs this subtraction operation is called a Half Subtractor.
FULL SUBTRACTOR:
When we have borrowed a value from a higher position, then it must be accounted for when
subtraction is performed at that higher position. The way it is done can be explained with the
following example:
Minued 26 = 1 1 0 1 0
Subtrahend -12 = 0 1 1 0 0
48
Digital Techniques Lab 8
14 = 0 1 1 1 0
49
We borrowed a ‘1’ from position 3 to carry out subtraction. When we move to position 3 for
subtraction, the position 2 should have returned the borrowed ‘1’ which will be added to the
subtrahend at position 3. (Note: Minuend at posn3 will remain 1)
First, in addition to the subtraction result (call it DO), the position 2 should give out another output as
high (or 1) (call it Bo- borrow out) which would indicate its obligation to return the borrowed ‘1’ to
position 3
Second, position 3 should have some input arrangement (call it Bin- borrow in) which would take the
‘1’ returned by position 2 and add it to the subtrahend of position 3.
0 - 0 with a 0 as Bin = 0
0 - 0 with a 1 as Bin = 1, only if a 1 is borrowed from next higher digit position
0 - 1 with a 1 as Bin = 0, only if a 1 is borrowed from next higher digit position.
0 - 1 with a 1 as Bin = 0, only if a 1 is borrowed from next higher digit position.
1 - 0 with a 0 as Bin = 1
1 - 0 with a 1 as Bin = 0
1 - 1 with a 0 as Bin = 0
1 - 1 with a 1 as Bin = 1, only if a 1 is borrowed from next higher digit position.
The arithmetic element that performs this subtraction operation is called Full Subtractor.
We arbitrarily assign symbols A and B to the two inputs and D (for Difference) and Bo (for
Borrow) to the two outputs. Truth table for Half Subtractor as shown below:
Logic Circuit:
A
D
B
B B
A
Output
Input Observed
Desired
A B B D B D
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0
The simplified Boolean function for the two outputs can be written from this truth table as:
D = A'B +AB'
or
B = A'B
The circuit diagram for the Half Subtractor to implement above mentioned Boolean function could be
quite a few. We will however verify only one.
A full Subtractor is a combinational circuit that performs subtraction involving three bits, namely
minuend, subtrahend, and borrow-in.
Simplified Boolean function for the two outputs can be written from this truth table as:
D = C’ (A’B+AB’) +C (A’B+AB’)’
= C’ (A’B+AB’) +C (AB+A’B’)
= C’A’B + C’AB’ + ABC + A’B’C
Bo = A’B+A’C+BC
Logic Circuit:
Z D
A
B
Truth Table:
Output Output
Input
Desired Observed
A B Z B D B D
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 1 0
1 0 0 0 1
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
TASK 3: 4 BIT BINARY SUBTRACTOR
4 bit Subtractor that that is available in integrated circuit to form. A 4-Bit subtractor actually
consists of four full subtractors connected in parallel. The borrow output of each adder is
internally connected to the carry input of the next higher order subtractor. Figure 8.3 shows the
internal functional structure of 7483 IC in which 4 full subtractors are shown as separate entity.
Figure 8.4 is connection diagram for full subtractor function.
B3 A2 A1 B1 A0 B0
A3 B2
Mode Selection
B Cin A B Cin A B Cin A B Cin M = 0 (Addition)
M = 1 (Subtraction)
Co/Bo S3
Co S2 Co S1 Co S0
A3 3 14
C0/B0
A2
8 15 L3
A1
10 2 L2
7483
A0
16 6 L1
B3
4 9 L0
B2
7 12 GND
B1
B0 11 13
Mode Selection
M = 0 (Addition)
M = 1 (Subtraction)
Truth Table:
A A A A B B B B B S S S S C S S S S
O o 0
3 2 1 0 3 2 1 0 u 3 2 1 0 3 2 1
t
1 0 0 0 0 0 1 0 1 0 1 1 0
1 0 0 0 1 0 0 0 1 0 0 0 0
0 0 1 0 1 0 0 0 0 1 0 1 0
0 0 0 1 0 1 1 1 0 1 0 1 0
1 0 1 0 1 0 1 1 0 1 1 1 1
1 1 1 0 1 1 1 1 0 1 1 1 1
1 0 1 0 1 1 0 1 0 1 1 0 1
Procedure:
1. Insert the IC 74xx on the trainer’s breadboard.
2. Use any two Logic Switches (S2 to S9) of the trainer for Input and any one of the LEDs (L0
to L15) of the trainer for Output indication.
3. Connect +5V to pin 14 (Vcc) and Ground to pin 7 (GND) of the IC.
4. By setting various combinations of the two switches verify that the output of the gate is in
accordance with the Truth Table shown above.
5. Record your observation.
Conclusion:
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.9
Design of Combinational Circuits
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 9
Objective:
1. Design a combinational circuit whose input is a four-bit number and whose output is the 2’s
complement of the input number.
2. Show that the circuit can be constructed using exclusive-OR gates
Equipment:
1. Digital Logic Trainer
2. IC 7486
3. Connecting wires
Theory:
A combinational circuit is a circuit made up by combining logic gates such that the required logic at
thorough put depends only on the input logic present condition, both completely specified by either a
truth table or by a Boolean expression.
Characteristics:
1. An output remains constant, as long input conditions do not require change in output.
2. An output depends solely on the current input condition and not on any past input condition
or past output condition.
As combinational logic circuits are made up from individual logic gates only, they can also be
considered as “decision making circuits” and combinational logic is about combining logic gates
together to process two or more signals in order to produce at least one output signal according to the
logical function of each logic gate. Common combinational circuits made up from individual logic
gates that carry out a desired application include Multiplexers, De-multiplexers, Encoders, Decoders,
Full and Half Adders etc.
56
Truth Table:
Table 9.1: Truth Table
INPUTS OUTPUTS
A B C D W X Y Z
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
Simplification using K-Map
W=
X=
Y=
Z=
Boolean Function:
X=
Y=
Z=
Logic Diagrams:
Procedure:
1. Insert the IC 74xx on the trainer’s breadboard.
2. Use any two Logic Switches (S2 to S9) of the trainer for Input and any one of the LEDs (L0
to L15) of the trainer for Output indication.
3. Connect +5V to pin 14 (Vcc) and Ground to pin 7 (GND) of the IC.
4. By setting various combinations of the two switches verify that the output of the gate is in
accordance with the Truth Table shown above.
5. Record your observation.
Conclusion:
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.10
Implementation of Code Converters using Gates
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 10
Equipment:
1. Digital Logic Trainer
2. IC 7447, IC 7486, AND, OR, NOT gates
3. Connecting wires
4. Resistors 180 ohms
Theory:
The availability of large variety of codes for the same discrete elements of information results in the
use of different codes by different digital systems. Sometimes it becomes necessary to use output one
system as input to another system.
A conversion circuit must be inserted between the two systems, if each uses different code for the
same information. When a decimal number is decoded such that each digit of the number is
represented by a 4-bit binary number, it is called 8421 Binary Coded Decimal Code or more simply
a BCD code.
Here, ten out of sixteen possible combinations of the code are selected to represent decimal 0 through
9. Most commonly used BCD codes are given below:
63
Table 10.1: Truth Table of BCD to Gray Code and Excess-3
EXCESS-3
DECIMAL BCD GRAY CODE
CODE
9 1001 1 1 01 1100
The important characteristics of the Gray code is that only one digit changes as we count from top to
bottom; that is why it is termed as minimum change code. The Gray code is used for input and
output devices. Primary use is in numeric input encoding applications, where we expect
nonrandom input value change (i.e. value n changes either to n-1 or to n+1).
Another decimal code that has been used in some old computers is Excess-3 code. Its code
assignment is obtained from the corresponding value of BCD after the addition of 3. The code is
used in many arithmetic circuits because it is self- complementing (i.e. the 9’s complement value
of the decimal number can be obtained by complementing each bit of the code).
Task 1: BCD to Seven Segment Display Code Conversion
Most Digital equipment has some means for displaying information in a form that can be understood
readily by the user or operator. One of the simplest and most popular methods for displaying
numerical digits uses a 7-segment configuration. To form decimal characters 0 through 9 and
sometimes hex characters A through
A BCD to 7-Segment Driver (IC 7447) is used to take four bit BCD input and provide the outputs
that will pass current through the appropriate segment of the display to generate desired output/
number. Truth Table for Active High and Active Low cases are shown below:
1 16 vCC
S2 2 f15
f
S1
3 g 14
10 9 8 7 6
g
4 a13 g fcomm a b
7447 a a
f b
5 b 12 g
b e c
d
6 c 11
S0 c
e dcomm cDp
1 2 3 4 5
7 d10 d
S3
GND8 e9 e
The segments of Seven Segment display are made of LEDs. Depending on the arrangements of the
LEDs, the display could be Common Anode or Common Cathode type. We are using common anode
type of display, which would require that either pin 3 or pin 8 is connected to Vcc and the input is
active low.
Truth Table:
Decimal
BCD (Active High)
Display
So S1 S2 S3 a b c d e f g
Output
0 0 0 0 0 1 1 1 1 1 1 0 0
0 0 0 1 1 0 1 1 0 0 0 0 1
0 0 1 0 2 1 1 0 1 1 0 1 2
0 0 1 1 3 1 1 1 1 0 0 1 3
0 1 0 0 4 0 1 1 0 0 1 1 4
0 1 0 1 5 1 0 1 1 0 1 1 5
0 1 1 0 6 0 0 1 1 1 1 1 6
0 1 1 1 7 1 1 1 0 0 0 0 7
1 0 0 0 8 1 1 1 1 1 1 1 8
1 0 0 1 9 1 1 1 0 0 1 1 9
Truth Table:
Decimal
BCD (Active Low -IC 7447) Display
Output
S0 S1 S2 S3 a b c d e f g
0 0 0 0 0 0 0 0 0 0 0 1 0
0 0 0 1 1 1 0 0 1 1 1 1 1
0 0 1 0 2 0 0 1 0 0 1 0 2
0 0 1 1 3 0 0 0 0 1 1 0 3
0 1 0 0 4 1 0 0 1 1 0 0 4
0 1 0 1 5 0 1 0 0 1 0 0 5
0 1 1 0 6 1 1 0 0 0 0 0 6
0 1 1 1 7 0 0 0 1 1 1 1 7
1 0 0 0 8 0 0 0 0 0 0 0 8
1 0 0 1 9 0 0 0 1 1 0 0 9
Task 2: BCD to Gray Code Conversion
The bit combination for the BCD and Gray code are listed in the table below. Since each code uses
four bits to represent a decimal digit, there must be four input variables and four output variables.
Truth Table:
Input
Output Gray Code Observed Output
BCD
A B C D W x y z W x y z
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 0
0 1 0 1 0 1 1 1
0 1 1 0 0 1 0 1
0 1 1 1 0 1 0 0
1 0 0 0 1 1 0 0
1 0 0 1 1 1 0 1
Logic Circuit Diagram:
D
Z
C
Y
B
X
A W
The bit combination for the BCD and Excess-3 code are listed in the table below. Since each code
uses four bits to represent a decimal digit, there must be four input variables and four output
variables.
Truth Table:
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
Conclusion:
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.11
4-bit Magnitude Comparator
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 11
Equipment:
1. Digital Logic Trainer
2. IC 7408, 7404, 7402, IC 7486, IC 74LS85
3. Connecting wires
Theory:
Another common and very useful combinational logic circuit is that of the Digital Comparator
circuit. Digital or Binary Comparators are made up from standard AND, NOR and NOT gates that
compare the digital signals present at their input terminals and produce an output depending upon
the condition of those inputs.
For example, along with being able to add and subtract binary numbers we need to be able to
compare them and determine whether the value of input A is greater than, smaller than or equal to
the value at input B etc. The digital comparator accomplishes this using several logic gates that
operate on the principles of Boolean algebra. There are two main types of Digital Comparator
available and these are.
1. Identity Comparator – an Identity Comparator is a digital comparator that has only one output
terminal for when A = B either “HIGH”
A = B = 1 or “LOW” A = B = 0
The purpose of a Digital Comparator is to compare a set of variables or unknown numbers, for
example A (A1, A2, A3 ... An) against that of a constant or unknown value such as B (B1, B2,
B3… Bn) and produce an output condition or flag depending upon the result of the comparison.
For example, a magnitude comparator of two 1-bits, (A and B) inputs would produce the
following three output conditions when compared to each other
This is useful if we want to compare two variables and want to produce an output when any of the
above three conditions are achieved. For example, produce an output from a counter when a certain
count number is reached. Consider the simple 1-bit comparator below.
75
Task 1: 1-bit Digital Comparator
Circuit Diagram:
A A A<B
A=B
A>B
B
B
Truth Table:
0 0 0 1 0
0 1 1 0 0
1 0 0 0 1
1 1 0 1 0
There are two distinct features about the comparator from the above truth table. Firstly, the circuit
does not distinguish between either two “0” or two “1”„s as an output A = B is produced when they
are both equal, either A = B = “0” or A = B = “1”. Secondly, the output condition for A = B
resembles that of a commonly available logic gate, the Exclusive-NOR or Ex-NOR function
(equivalence) on
cascading together n of these and produce n-bit comparator just as we did for the n- bit adder in the
previous tutorial. Multi-bit comparators can be constructed to compare whole binary or BCD words
to produce an output if one word is larger, equal to or less than the other.
A very good example of this is the 4-bit Magnitude Comparator. Here, two 4-bit words (“nibbles”)
are compared to each other to produce the relevant output with one word connected to inputs A
and the other to be compared against connected to input B as shown below.
IC Pin Configuration:
B3 1 16 vCC
A<B 2 f 15 A3
ENTREES
A=B 3 g 14 B2
A>B 4 a 13 A2
7485
A>B 5 12 A1
b
SORTIES
A=B 6 c 11 B1
A<B 7 d 10 A0
GND 8 e 9 B0
A3
x3
B3
A2
x2
B2
(A<B)
A1
x1
B1
A0
(A>B)
x0
B0
(A=B)
0 0 0 1 0 0 0 1
0 0 1 1 0 0 0 1
0 1 0 0 0 0 1 0
0 1 0 0 0 1 0 0
0 1 0 1 0 1 0 0
0 1 0 1 0 1 0 1
1 0 0 0 0 1 0 0
1 0 0 1 0 1 1 0
1 0 0 1 1 0 0 0
1 0 0 1 1 0 0 1
Procedure:
1. Insert the IC 74xx on the trainer’s breadboard.
2. Use any two Logic Switches (S2 to S9) of the trainer for Input and any one of the LEDs (L0
to L15) of the trainer for Output indication.
3. Connect +5V to pin 14 (Vcc) and Ground to pin 7 (GND) of the IC.
4. By setting various combinations of the two switches verify that the output of the gate is in
accordance with the Truth Table shown above.
5. Record your observation.
Conclusion:
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.12
Implementation of Multiplexer and Demultiplexer using Ic74151& Ic74138
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 12
Equipment:
1. Digital Logic Trainer
2. IC 74151, 74138
3. Connecting wires
Theory:
MULTIPLEXER:
1. The multiplexer circuit is used to place two or more digital signals (from two or more
sources) onto a single line, by placing them there at different time intervals (technically it is
known as time-division- multiplexing).
2. The multiplexer (also known as data selector) will select data from several transmission lines
to be gated to the single output transmission line.
3. The multiplexer will have a number of control inputs that are used to select the appropriate
data channel for input.
4. The number of data inputs is equal to 2n where n is the number of control selecting
leads.
5. A multiplexer can be used to convert parallel data to serial data.
DEMULTIPLEXER:
1. A demultiplexer (data distributor) will receive information from a single line and selectively
transmits it to several output lines/channels (one at a time).
2. Demultiplexer has several control select lines which are used to determine (or select) the
output transmission path.
3. The number of data output lines is 2n, where N is the number of control select leads.
4. Demultiplexers are used to convert serial data to parallel data.
82
Task 1: Multiplexer
IC 74151 is 8-to-1-Line Multiplexer. It has following features:
Clock Input to
Data Input Pins
Data Input D3 1 16
D3 VCC
Data Input D2 2
D2 D4 15 Data Input D4
Data Input D0
4
D0 Data Input D6
74151 D6
L0 Data Input D7
5 13
Y
Switch S1
6 W D7
GND Switch S2
12
7 G
GND
A 11 Switch S3
8 GND
B 1
0
C 9
Procedure:
1. Wire the circuit as per figure above.
2. Connect “Clock Input” (very low frequency) to Input pins of the IC (D0 – D1) and see if the
Output LED is pulsating. Confirm your finding on the truth table.
Truth Table:
C B A G (or S) Y Observed
A 1-Line-to-8-Line demultiplexer distributes one input to 8 output lines. IC 74138 which was used
as a decoder in the last experiment will be used here as Demultiplexer. The only difference between
the previous circuit and present circuit will be addition of an INPUT (through Enable AND gate)
to the 4th pin of all the 8 NAND gates. The A, B and C inputs will serve as SELECT input (to
select a particular output line).
1 16
Switch S2 A VCC
Switch S1 2 15 O0
B Y0
3 14 O1
Switch S0 C Y1
4 13 O2
G2A Y2
74138
5 12 O3
G2B Y3
+5V 6
G1 Y4 11 O4
O7 7
Y7 Y5
10 O5
8 9 O6
GND Y6
Truth Table:
Input Output
C B A O7 O6 O5 O4 O3 O2 O1 O0
0 0 0 1 1 1 1 1 1 1 0
0 0 1 1 1 1 1 1 1 0 1
0 1 0 1 1 1 1 1 0 1 1
0 1 1 1 1 1 1 0 1 1 1
1 0 0 1 1 1 0 1 1 1 1
1 0 1 1 1 0 1 1 1 1 1
1 1 0 1 0 1 1 1 1 1 1
1 1 1 0 1 1 1 1 1 1 1
Multiplexer IC 74151 and Demultiplexer IC 74138 have been utilized to demonstrate single-line data
communication. The 3-bit select code will determine which data input will be steered to the Y output
of the Demultiplexer.
Circuit Diagram:
Switch S2
Switch S1
Switch S0
Data Input D2 2 15 2 B Y0 15 O0
D2 D4 Data Input D4
Data Input D5 3 C 14 O1
Data Input D13D1 D5 14 Y1
6W A 11
GND7 G 10
B
GND C
GND8 9
Procedure:
Wire the circuit as per figure above and verify result first by giving clock signal to One Input pin at a
time of the IC (D0 – D1) and then to all the pins simultaneously.
Truth Table:
Observed
Applied Signal When Clock Signal
Select Signal at is Applied At All of
Out at
Data Input Output D Pins of MUX
Pin Pin
Observed Output
A B C D Y
at Pin of
DEMUX
0 0 0 D0 Y0
0 0 1 D1 Y1
0 1 0 D2 Y2
0 1 1 D3 Y3
1 0 0 D4 Y4
1 0 1 D5 Y5
1 1 0 D6 Y6
1 1 1 D7 Y7
Conclusion:
Department of Aviation Engineering Technology
Superior University
Digital Techniques
AT-2226
Experiment No.13
Verification of Latch and Flip Flop Operation using Gates
Prepared for
By:
Name:
ID:
Section:
Semester:
Total Marks:
Obtained Marks:
Signature:
Date:
Digital Techniques Lab 13
Equipment:
1. Digital Logic Trainer
2. 2. IC 7402, 7400, 7404
3. Connecting wires
4. Digital Logic Trainer
Theory:
A Flip Flop is a logic circuit that has two stable states Low or High. Enable input signal may be used
to enable or disable a flip flop. Clock signal is used to synchronize operations of flip flops. Most (if
not all) of the system output can change state only when the clock makes a transition.
Latches are a form of Flip Flop, which do not require clock pulse to latch or hold data present at its
input.
89
Task 1: SR (or RS or SC) Latch
The SR is the simplest form of Flip Flop or Latch. It could be constructed from NOR gates or NAND
gates. Standard logic symbol of SR flip flop and its truth table is given below
S Q
R Q
Input Output
S R Q
Set Reset
0 0 Last state
1 0 1
0 1 0
1 1 Forbidden
R
Clear
Q
S Q
Set
Input Output
Action Observation
S R
Q
Set Reset
1 0 1 Set
1 1 Forbidden Forbidden
Task 2: Gates SR Flip Flop
S
Set
Q
EN
Enable
Q
R
Clear
Input Output
En S R Action Observation
Q
Enable Set Clear/Reset
1 1 0 1 Set
1 0 1 0 Clear
1 1 1 Forbidden Forbidden
S
Set
Q
EN
Enable
Q
R
Clear
Input Output
En J K Action Observation
Q
Enable Set Clear/Reset
1 1 0 1 Set
1 0 1 0 Clear
1 1 1 Qn’ Toggle
Conclusion: