Download - DLD Lab Manual
The Islamia University of Bahawalpur
University College of Engineering & TechnologyEL-222 Digital Logic Design (4th Semester)
LAB EXPERIMENT NO.01
Name: --------------------------- Roll No. --------------------------
Lab Instructor Signature: ---------------------- Date: ---------------------------
Introduction to Basic Logic Gates
PEFORMANCE OBJECTIVESUpon successful completion of this experiment, the student will be able to know
The basic gates and their operation Verify the truth table of logic gates
EQUIPMENT REQUIRED Digital trainer with adapter Inverter (7404 Hex ) AND gate (7408 2-input Quad) OR gate (7432 2-input Quad) NAND gate (7400 2-input Quad) NOR gate (7402 2-input Quad) X-OR gate (7486 2-input Quad) Bread board LED
DISCUSSION Inverter
Inverter is a logic gate which takes the complement of the input. AND gate
AND is a logic gate which multiply the inputs
PRELIMINARY PROCEDURE Insert inverter IC (7404) in bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its inverter operation by applying 0 and 1 on input of each gate and
connect the output of each inverter to a LED Fill the following table Insert AND gate IC (7408 2-input Quad) in bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its AND operation by applying logic 0 and logic 1 in its both of
input as given in following table and check output of each gate LED Fill the following table Insert OR gate IC (7432 2-input Quad) in the bread board
1
Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its OR operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Fill the following table Insert NAND gate IC (7400 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its NAND operation by applying logic 0 and logic 1 in its both of
input as given in following table and check output of each gate LED Fill the following table Similar steps repeat for every logic IC
S.# Logic Gate Symbol Boolean ExpressionTruth Table
1 Not
A F
1
0
2 AND
A B F0 00 11 01 1
3 OR
A B F
0 00 11 01 1
4 NAND
A B F0 00 11 01 1
5NOR
A B F0 00 11 01 1
6 X-OR
A B F0 00 11 01 1
2
Similarly check inverter in 7404 IC by connecting one by one input output to switch and LED respectively
Similarly check each AND gate in 7408 IC by connecting one by one input output to switch and LED respectively
3
Similarly check OR gate in 7408 IC by connecting one by one input output to switch and LED respectively
Similarly check NAND gate in 7400 by connecting one by one input output to switch and LED respectively
Similarly check NOR gate in 7402 by connecting one by one input output to switch and LED respectively
Similarly check X-OR in 7486 by connecting one by one input output to switch and LED respectively
4
The Islamia University of Bahawalpur
University College of Engineering & TechnologyEL-222 Digital Logic Design (4th Semester)
LAB EXPERIMENT NO.2
Name: ------------------------------------------------------- Roll No. --------------------------
Lab Instructor Signature: ----------------------------------- Date: ---------------------------
Implement a given Boolean function on bread board
PEFORMANCE OBJECTIVESUpon successful completion of this experiment, the student will be able to know
The circuit connections Verify the operation and truth table of the given function
EQUIPMENT REQUIRED Digital trainer with adapter AND gate (7408 2-input Quad) OR gate (7432 2-input Quad) NOT gate (7404 Hex not gate) Bread board LED
DISCUSSION
Implement the following function on bread board and verify its truth table
5
PRELIMINARY PROCEDURE
Insert AND gate IC (7408 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its AND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Insert OR gate IC (7432 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its OR operation by applying logic 0 and logic 1 in its both of input as
given in following table and check output of each gate LED Insert NOT gate IC (7404 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its AND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Connect the circuit on bread board as shown in above Fill the following truth table
0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1
6
The Islamia University of Bahawalpur
University College of Engineering & TechnologyEL-222 Digital Logic Design (4th Semester)
LAB EXPERIMENT NO.3
Name: ------------------------------------------------------- Roll No. --------------------------
Lab Instructor Signature: ----------------------------------- Date: ---------------------------
Implement a given Boolean function by NAND implementation
PEFORMANCE OBJECTIVESUpon successful completion of this experiment, the student will be able to know
The NAND Implementation To convert the a given Boolean function into NAND logic
EQUIPMENT REQUIRED Digital trainer with adapter NAND gate (7400 2-input Quad) AND gate (7408 2-input Quad) OR gate (7432 2-input Quad) NOT gate (7404 Hex not gate)
DISCUSSION
Digital circuit are more frequently constructed with NAND or NOR 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.to fabricate with electronic components and are the basic gates used in all IC digital logic families.
Implement the following Boolean function by using NAND implementation
7
NAND Implementation
PRELIMINARY PROCEDURE
Insert AND gate IC (7408 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its AND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Insert OR gate IC (7432 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its OR operation by applying logic 0 and logic 1 in its both of input as
given in following table and check output of each gate LED Insert NOT gate IC (7404 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its AND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Connect the circuit on bread board as shown in above Fill the following truth table
0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1
8
The Islamia University of Bahawalpur
University College of Engineering & TechnologyEL-222 Digital Logic Design (4th Semester)
LAB EXPERIMENT NO.04
Name: ------------------------------------------------------- Roll No. --------------------------
Lab Instructor Signature: ----------------------------------- Date: ---------------------------
To Design and Implement Half Adder Circuit
PEFORMANCE OBJECTIVESUpon successful completion of this experiment, the student will be able to know
The basic operation of Half Adder Circuit Verify the truth table of Half Adder Circuit
EQUIPMENT REQUIRED Digital trainer with adapter X-OR gate (7486 2-input Quad) OR gate (7432 2-input Quad) Bread board LED
DISCUSSION Adder
Digital computers perform a variety of information –processing task. Among the basic functions encountered are the various arithmetic operations. The most basic arithmetic operation, no doubt is the addition of two binary digit. The simple addition consist of four possible elementary operations namely 0+0=0, 0+1=1, 1+0=1, 1+1=10. A combinational circuit that performs the addition of two bits is called half adder & addition f three bits is called full adder.
o Half –AdderFrom the verbal explanation of a half-adder, we find that this circuit
needs two binary inputs and two output. It is necessary to specify two output variables because the result may consist of two binary digit. We assign symbol x and y the two input and S (for sum) and C (for carry) to the output. The truth table is shown below
9
The simplified Boolean function for the two outputs can be obtained directly from the truth table. The simplified expressions are:
The logic diagram of half-adder is shown below
PRELIMINARY PROCEDURE
Insert AND gate IC (7408 2-input Quad) in bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its AND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Fill the following table Insert XOR gate IC (7486 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its XOR operation by applying logic 0 and logic 1 in its both of input as
given in following table and check output of each gate LED Fill the following table Connect the circuit as shown in figure 1
10
Figure 1
Fill the following table.
X Y Sum Carry0 00 11 01 1
11
The Islamia University of Bahawalpur
University College of Engineering & TechnologyEL-222 Digital Logic Design (4th Semester)
LAB EXPERIMENT NO.05
Name: ------------------------------------------------------- Roll No. --------------------------
Lab Instructor Signature: ----------------------------------- Date: ---------------------------
To Design and Implement Full Adder Circuit
PEFORMANCE OBJECTIVESUpon successful completion of this experiment, the student will be able to know
The basic operation of Full Adder Circuit Verify the truth table of Full Adder Circuit
EQUIPMENT REQUIRED Digital trainer with adapter AND gate (7408 2-input Quad) OR gate (7432 2-input Quad) NOT gate (7404 Hex not gate)
DISCUSSION Adder
Digital computers perform a variety of information –processing task. Among the basic functions encountered are the various arithmetic operations. The most basic arithmetic operation, no doubt is the addition of two binary digit. The simple addition consist of four possible elementary operations namely 0+0=0, 0+1=1, 1+0=1, 1+1=10. A combinational circuit that performs the addition of two bits is called half adder & addition f three bits is called full adder.
o Full–Adder
A full adder is a combinational circuit that performs the arithmetic sum of three input bits. It consists of three input and two outputs. Two of the input variables, denoted by x and y. the third input z represents the carry from the previous lower significant position. Two outputs are necessary because the arithmetic sum of three binary digit ranges in value from 0 to3. Two outputs denoted by the symbols S for sum and C for carry. The truth table of full adder is shown below.
12
Truth table of full-Adder
The simplified Boolean function for the two outputs can be obtained directly from the truth table. The simplified expressions are:
After simplification we obtain the following equation.
The logic diagram of full-adder is shown below
PRELIMINARY PROCEDURE Insert AND gate IC (7408 2-input Quad) in bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its AND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Fill the following table Insert XOR gate IC (7486 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its OR operation by applying logic 0 and logic 1 in its both of input as
given in following table and check output of each gate LED Fill the above table
13
The Islamia University of Bahawalpur
University College of Engineering & TechnologyEL-222 Digital Logic Design (4th Semester)
LAB EXPERIMENT NO.06
Name: ------------------------------------------------------- Roll No. --------------------------
Lab Instructor Signature: ----------------------------------- Date: ---------------------------
To Design and Implement Half Subtractor Circuit
PEFORMANCE OBJECTIVESUpon successful completion of this experiment, the student will be able to know
The basic operation of Half Subtractor Circuit Verify the truth table of Half Subtractor Circuit
EQUIPMENT REQUIRED Digital trainer with adapter X-OR gate (7486 2-input Quad) OR gate (7432 2-input Quad) Bread board LED
DISCUSSION Subtractor
The subtraction of two binary numbers may be accomplished by taking the complement of the subtrahend and adding it to the minuend. It is possible to implement subtraction with logic circuit in a direct manner. By this method each subtrahend bit of the number is subtracted from its corresponding significant minuend bit to form a difference bit. If the minuend bit is smaller than the subtrahend bit, a 1 is borrowed from the next significant position the fact that a 1 has been borrowed must be conveyed to the next higher pair of bits by means of a binary signal coming out of a given stage and going into the next higher stage.
o Half –Subtractor A half subtractor is a combinational circuit that subtracts two bits and
produces their difference. It also has an output to specify if a 1 has been borrowed. Designate the minuend bit by x and subtrahend bit by y. to perform x-y, we have to check the relative magnitude of x and y. The half subtractor needs two outputs.
14
One is generate the difference and designate by the symbol D. Second output designates B for borrowed. The truth table for the input-output relationship of a half subtractor is shown below.
Truth table of Half-Subtractor
The simplified Boolean function for the two outputs can be obtained directly from the truth table. The simplified expressions are:
The logic diagram of half Subtractor is shown below
PRELIMINARY PROCEDURE
Insert AND gate IC (7408 2-input Quad) in bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its AND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Fill the following table Insert XOR gate IC (7486 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its OR operation by applying logic 0 and logic 1 in its both of input as
given in following table and check output of each gate LED Fill the given table
15
The Islamia University of Bahawalpur
University College of Engineering & TechnologyEL-222 Digital Logic Design (4th Semester)
LAB EXPERIMENT NO.07
Name: ------------------------------------------------------- Roll No. --------------------------
Lab Instructor Signature: ----------------------------------- Date: ---------------------------
To Design and Implement Full Subtractor Circuit
PEFORMANCE OBJECTIVESUpon successful completion of this experiment, the student will be able to know
The basic operation of Full subtractor Circuit. Verify the truth table of full subtractor Circuit.
EQUIPMENT REQUIRED Digital trainer with adapter X-OR gate (7486 2-input Quad) OR gate (7432 2-input Quad) Bread board LED
DISCUSSION Subtractor
The subtraction of two binary numbers may be accomplished by taking the complement of the subtrahend and adding it to the minuend. It is possible to implement subtraction with logic circuit in a direct manner. By this method each subtrahend bit of the number is subtracted from its corresponding significant minuend bit to form a difference bit. If the minuend bit is smaller than the subtrahend bit, a 1 is borrowed from the next significant position the fact that a 1 has been borrowed must be conveyed to the next higher pair of bits by means of a binary signal coming out of a given stage and going into the next higher stage.
o Full –Subtractor A full subtractor is a combinational circuit that performs a subtraction
between two bits taking into account that a 1 may have been borrowed by a lower significant stage. This circuit has three inputs and two outputs. The three inputs x y and z denote the minuend, subtrahend and previous borrow, respectively. The two outputs, D and B represent the difference and outputs borrow respectively. The truth table for the circuit is as follows. The simplified Boolean function for the two outputs can be obtained directly from the truth table. The simplified expressions are:
16
The logic diagram of half subtractor is shown below
Full Subtractor
PRELIMINARY PROCEDURE Insert inverter IC (7404) in bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its inverter operation by applying 0 and 1 on input of each gate and
connect the output of each inverter to a LED Insert AND gate IC (7408 2-input Quad) in bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its AND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Insert OR gate IC (7432 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its OR operation by applying logic 0 and logic 1 in its both of input as
given in following table and check output of each gate LED Insert XOR gate IC (7486 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Connect the jumpers as shown in the logic diagram Fill the following table
X Y Z D (Difference) B(Borrow)0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1
17
The Islamia University of Bahawalpur
University College of Engineering & TechnologyEL-222 Digital Logic Design (4th Semester)
LAB EXPERIMENT NO.09
Name: ------------------------------------------------------- Roll No. --------------------------
Lab Instructor Signature: ----------------------------------- Date: ---------------------------
To Design BCD to Excess-3 code Converter
PEFORMANCE OBJECTIVESUpon successful completion of this experiment, the student will be able to know
The basic operation of BCD to Excess-3 code Converter. Verify the truth table of BCD to Excess-3 code Converter.
EQUIPMENT REQUIRED Digital trainer with adapter X-OR gate (7486 2-input Quad) OR gate (7432 2-input Quad) Bread board LED
DISCUSSION
CODE CONVERSION
The availability of a large variety of codes for the same discrete element of information results in the use of different codes by different digital system. It is sometimes necessary to use the output of one system as the input to another. A conversion circuit must be inserted between the two systems if each uses different codes for the same information. The design procedure of code conversion will be illustrated by mean of a specific example of conversion from BCD to the excess-3 code. There must be four input variable and four output variables. Let us designate the four input binary variable by the symbol A, B, C and D, and the four output variable by w, x, y, and z. We note that four binary variables may have 16 bit combination, only 10 of which are listed in the truth table. The six bit combination not listed for the input variables are don’t-care combination. The truth table of BCD to Excess-3 code conversion is shown below.
18
Truth table of code conversion
The simplified Boolean function by using Kaurnaugh map for the four outputs can be obtained directly from the truth table. The simplified expressions are:
W=A+BC+BD = A+B(C+D) X =B′C+B′D+BC′D′ = B′(C+D)+BC′D′ = B′(C+D)+B(C+D)′Y =CD+C′D′ + CD+(C+D)′Z =D′
The logic diagram of code conversion is shown below
19
PRELIMINARY PROCEDURE Insert inverter IC (7404) in bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its inverter operation by applying 0 and 1 on input of each gate and
connect the output of each inverter to a LED Fill the following table Insert AND gate IC (7408 2-input Quad) in bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its AND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Fill the following table Insert OR gate IC (7432 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its OR operation by applying logic 0 and logic 1 in its both of input as
given in following table and check output of each gate LED Verify the above table.
20
The Islamia University of Bahawalpur
University College of Engineering & TechnologyEL-222 Digital Logic Design (4th Semester)
LAB EXPERIMENT NO.09
Name: ------------------------------------------------------- Roll No. --------------------------
Lab Instructor Signature: ----------------------------------- Date: ---------------------------
To Design Four bit Gray code converter
PEFORMANCE OBJECTIVESUpon successful completion of this experiment, the student will be able to know
The basic operation of BCD to Gray Code Converter. Verify the truth table of BCD to Gray code Converter.
EQUIPMENT REQUIRED Digital trainer with adapter X-OR gate (7486 2-input Quad) OR gate (7432 2-input Quad) Bread board LED
DISCUSSION
CODE CONVERSIONGray belongs to a class of codes known as minimum change code, in which a number changes by only bit as it proceeds from one number to the next. Hence this code is not useful for arithmetic operations. This code finds extensive use for shaft encoders, in some types of analog-to-digital converters, etcThe bit combinations 4-bit binary code and its equivalent bit combinations of gray codeare listed in the table in Figure. The four bits of binary numbers are designated asA, B, C, and D, and gray code bits are designated as W, X, Y, and Z. For transformationof binary numbers to gray, A, B, C, and D are considered as inputs and W, X, Y, and Z are considered as outputs.
21
.Four Bit Binary Inputs Four Bit Gray Code
A B C D W X Y Z0 0 0 0 0 0 0 00 0 0 1 0 0 0 10 0 1 0 0 0 1 10 0 1 1 0 0 1 00 1 0 0 0 1 1 00 1 0 1 0 1 1 10 1 1 0 0 1 0 10 1 1 1 0 1 0 01 0 0 0 1 1 0 01 0 0 1 1 1 0 11 0 1 0 1 1 1 11 0 1 1 1 1 1 01 1 0 0 1 0 1 01 1 0 1 1 0 1 11 1 1 0 1 0 0 11 1 1 1 1 0 0 0
From Karnaugh map we get Boolean function for the outputs
22
PRELIMINARY PROCEDURE Insert XOR gate IC (7432 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its OR operation by applying logic 0 and logic 1 in its both of input as
given in following table and check output of each gate LED Assemble the circuit on bread board as shown above Verify the above table.
23
The Islamia University of Bahawalpur
University College of Engineering & TechnologyEL-222 Digital Logic Design (4th Semester)
LAB EXPERIMENT NO.10
Name: ------------------------------------------------------- Roll No. --------------------------
Lab Instructor Signature: ----------------------------------- Date: ---------------------------
To Design and Implement RS Flip Flop
PEFORMANCE OBJECTIVESUpon successful completion of this experiment, the student will be able to know
The basic operation of RS Flip Flop. Verify the truth table of RS Flip Flop.
EQUIPMENT REQUIRED Digital trainer with adapter X-OR gate (7486 2-input Quad) OR gate (7432 2-input Quad) Bread board LED
DISCUSSION
FLIP FLOP
The memory element used in clocked sequential circuits are called flip-flop. These circuits are binary cells capable of storing one bit of information. A flip-flop circuit has two outputs, one for the normal value and one for the complement value of the bit stored in it. The cross coupled connection from the output of one gate to the input of the other gate constitutes a feedback path. For this reason the circuits are classified as asynchronous sequential circuit.
R
24
Flip Flop Circuit with NOR gates
S
R
Flip Flop Circuit with NAND gates
PRELIMINARY PROCEDURE Insert NAND gate IC (7400 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its NAND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Fill the following table Insert NOR gate IC (7402 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its NOR operation by applying logic 0 and logic 1 in its both of input as
given in following table and check output of each gate LED Fill the following table
S (Set) R (Reset)0 00 11 01 1
Table for NOR RS flip flop
S (Set) R (Reset)0 00 11 01 1
Table for NAND RS flip flop
25
The Islamia University of Bahawalpur
University College of Engineering & TechnologyEL-222 Digital Logic Design (4th Semester)
LAB EXPERIMENT NO.11
Name: ------------------------------------------------------- Roll No. --------------------------
Lab Instructor Signature: ----------------------------------- Date: ---------------------------
To Design and Implement D Flip Flop
PEFORMANCE OBJECTIVESUpon successful completion of this experiment, the student will be able to know
The basic operation of RS Flip Flop. Verify the truth table of RS Flip Flop.
EQUIPMENT REQUIRED Digital trainer with adapter X-OR gate (7486 2-input Quad) OR gate (7432 2-input Quad) Bread board LED
DISCUSSION
D FLIP FLOP
The memory element used in clocked sequential circuits are called flip-flop. The D flip flop is a modification of the RS flip-flop.
D F/F has property to send input data as it is on the output.
Characteristics Table of D flip-flop
26
Logic Diagram of D flip-flop
PRELIMINARY PROCEDURE Insert NAND gate IC (7400 2-input Quad) in the bread board Apply Vcc +5V to pin number 14 and connect pin number 7 to ground Verify its NAND operation by applying logic 0 and logic 1 in its both of input
as given in following table and check output of each gate LED Connect the circuit on bread board as shown in above
27