DSD Lab Manual
DSD Lab Manual
DSD Lab Manual
Lab Manual
Engineering and Design, Alliance University in the Laboratory of this college in the
year ______
Date:
CONTENTS
Digital Trainer Kit
Gates IC NO.
AND 7408
OR 7432
NAND 7400
NOR 7402
NOT 7404
XOR 74136
Theory:-
Logic gates are idealized or physical devices implementing a Boolean function,
which it performs a logical operation on one or more logical inputs and produce
a single output. Depending on the context, the term may refer to an ideal logic
gate, one that has for instance zero rise time and unlimited fan out or it may refer
to anon-ideal physical device.
1. Basic Gates
2. Universal Gates
3. Advanced Gates
Basic Gates
1. AND gate: - Function of AND gate is to give the output true when both the inputs are
true. In all the other remaining cases output becomes false. Following table justifies the
statement:-
1 1 1
1 0 0
0 1 0
0 0 0
IC 7408
2. OR gate: - Function of OR gate is to give output true when one of the either inputs are
true .In the remaining case output becomes false. Following table justify the statement:-
Outpu
Input A Input B
t
0 0 0
0 1 1
1 0 1
1 1 1
IC 7432
3. NOT gate: -Function of NOR gate is to reverse the nature of the input .It converts
true input to false and vice versa. Following table justifies the statement :-
Input Output
1 0
0 1
IC 7404
Universal Gates
1. NAND gate: -Function of NAND gate is to give true output when one of the two
provided input are false. In the remaining output is true case .Following table justifies
the statement :-
1 1 0
1 0 1
0 1 1
0 0 1
IC 7400
2. NOR gate: - NOR gate gives the output true when both the two provided input are
false. In all the other cases output remains false. Following table justifies the statement
1 1 0
1 0 0
0 1 0
0 0 1
Advanced Gates IC 7402
1. XOR gate: - The function of XOR gate is to give output true only when both the
inputs are true. Following table explain this:-
1 1 0
1 0 1
0 1 1
0 0 0
IC 74136
Exclusive NOR Gate: IC 74266
B A Q
0 0 1
0 1 0
1 0 0
2-input Ex-NOR Gate
1 1 1
• If led glows red then output is true, if it glows green output is false, which is
numerically denoted as 1 and 0 respectively. The Color can change based on the IC
manufacturer it’s just verification of the Truth Table not the color change.
Result:-
All gates are verified. Observed output matches theoretical concepts.
EXP NO. :
DATE :
Aim:-Implement of the given Boolean function using logic gates in both SOP and
POS forms
Two input SOP - A.B + A’.B’
Two input POS: - (A+B) (B+C) (A+C’)
Apparatus required:-Digital Lab Kit, Single Strand Wires, ICs, breadboards, Connecting
Wires.
Theory:-
a) SOP: - It is the Sum of product form in which the terms are taken as 1. It is denoted in
the K-map expression by sigma (∑)
A.B. + A’B’
Circuit Diagram
Y B OR
AND AND
C OR
CNOT
NOT OR
THEORY:
Code is a symbolic representation of discrete information. Codes are of different types.
The availability of large variety of codes for the same discrete elements of
information results in the use of different codes by different systems. A conversion
circuit must be inserted between the two systems if each uses different codes
for same information. Thus, code converter is a circuit that makes the
two systems compatible even though each uses different binary code.
Gray Code is one of the most important codes. It is a non-weighted code
which belongs to a class of codes called minimum change codes. In this codes
while traversing from one step to another step, only one bit in the code group
changes. In case of Gray Code two adjacent code numbers differs from each
other by only one bit.
The input variable are designated as B3, B2, B1, B0 and the output variables are
designated as G3, G2, G1, G0. From the truth table, combinational circuit is
designed. The Boolean functions are obtained from K-Map for each output
variable. A two-level logic diagram may be obtained directly from the Boolean
expressions derived by the k - map.
BINARY TO GRAY CODE CONVERTER:
TRUTH TABLE:
B3 B2 B1 B0 G3 G2 G1 G0
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
1 0 1 0 1 1 1 1
1 0 1 1 1 1 1 0
1 1 0 0 1 0 1 0
1 1 0 1 1 0 1 1
1 1 1 0 1 0 0 1
1 1 1 1 1 0 0 0
LOGIC DIAGRAM:
BINARY TO GRAY CODE CONVERTOR
K-Map for G3:
G3 = B3
TRUTH TABLE:
G3 G2 G1 G0 B3 B2 B1 B0
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 1
0 1 0 1 0 1 1 0
0 1 1 0 0 1 0 0
0 1 1 1 0 1 0 1
1 0 0 0 1 1 1 1
1 0 0 1 1 1 1 0
1 0 1 0 1 1 0 0
1 0 1 1 1 1 0 1
1 1 0 0 1 0 0 0
1 1 0 1 1 0 0 1
1 1 1 0 1 0 1 1
1 1 1 1 1 0 1 0
LOGIC DIAGRAM:
GRAY CODE TO BINARY CONVERTOR
B3 = G3
K-Map for B2:
TRUTH TABLE:
B3 B2 B1 B0 E3 E2 E1 E0
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
1 0 1 0 x x x x
1 0 1 1 x x x x
1 1 0 0 x x x x
1 1 0 1 x x x x
1 1 1 0 x x x x
1 1 1 1 x x x x
LOGIC DIAGRAM:
BCD TO EXCESS-3 CONVERTOR
K-Map for E3:
E3 = B3 + B2 (B0 + B1)
K-Map for E2:
X4 X3 X2 X1 A B C D
0 0 0 0 x x x x
0 0 0 1 x x x x
0 0 1 0 x x x x
0 0 1 1 0 0 0 0
0 1 0 0 0 0 0 1
0 1 0 1 0 0 1 0
0 1 1 0 0 0 1 1
0 1 1 1 0 1 0 0
1 0 0 0 0 1 0 1
1 0 0 1 0 1 1 0
1 0 1 0 0 1 1 1
1 0 1 1 1 0 0 0
1 1 0 0 1 0 0 1
1 1 0 1 x x x x
1 1 1 0 x x x x
1 1 1 1 x x x x
LOGIC DIAGRAM:
A = X1 X2 + X3 X4 X1
K-Map for B:
K-Map for C:
K-Map for D:
PROCEDURE:
(ii) Logical inputs are given through switches as per truth table
(iii) Logical output values are observed in the LED outputs and verified with the truth
tables.
RESULT:
Thus the code convertors circuits were designed using logic gates and their truth table were
verified.
EXP NO. : DESIGN OF 4-BIT ADDER AND SUBTRACTOR
DATE :
AIM:
To design and implement 4-bit adder and subtractor using IC 7483.
APPARATUS REQUIRED:
Sl.No. COMPONENT SPECIFICATION QTY.
1. IC IC 7483 1
2. EX-OR GATE IC 7486 1
3. NOT GATE IC 7404 1
3. IC TRAINER KIT - 1
4. PATCH CORDS - 40
THEORY:
LOGIC DIAGRAM:
LOGIC DIAGRAM: 4-BIT BINARY SUBTRACTOR
1 0 0 0 0 0 1 0 0 1 0 1 0 0 0 1 1 0
1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 1 0 1 0 1 1 0 1 0
0 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 0
1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 1
1 1 1 0 1 1 0 1 1 1 0 1 1 0 0 0 0 1
1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 1 0 1
DIAGRAM: BCD ADDER
TRUTH TABLE FOR SUM GREATER THAN 9:
Y = S4 (S3 + S2)
PROCEDURE:
Thus the 4 bit binary adder, 4 bit binary subtractor and BCD adder
were designed using logic gates and their truth table was verified.
EXP NO. :
DATE :
AIM:
To design and implement 4-to-1 multiplexer and 1-to-4 demultiplexer using logic gates.
APPARATUS REQUIRED:
Sl.No. COMPONENT SPECIFICATION QTY.
1. 3 I/P AND GATE IC 7411 2
2. OR GATE IC 7432 1
3. NOT GATE IC 7404 1
2. IC TRAINER KIT - 1
3. PATCH CORDS - 32
THEORY:
MULTIPLEXER:
Multiplexer means transmitting a large number of information units over a
smaller number of channels or lines. A digital multiplexer is a combinational
circuit that selects binary information from one of many input lines and directs
it to a single output line. The selection of a particular input line is controlled
by a set of selection lines. Normally there are 2n input line and n selection lines
whose bit combination determine which input is selected.
DEMULTIPLEXER:
The function of Demultiplexer is in contrast to multiplexer function. It takes
information from one line and distributes it to a given number of output lines. For this
reason, the demultiplexer is also known as a data distributor. Decoder can also
be used as demultiplexer.
In the 1: 4 demultiplexer circuit, the data input line goes to all of the AND gates.
The data select lines enable only one gate at a time and the data on the data
input line will pass through the selected gate to the associated data output line.
BLOCK DIAGRAM FOR 4:1 MULTIPLEXER:
FUNCTION TABLE:
S1 S0 INPUTS Y
0 0 D0 → D0 S1’ S0’
0 1 D1 → D1 S1’ S0
1 0 D2 → D2 S1 S0’
1 1 D3 → D3 S1 S0
TRUTH TABLE:
S1 S0 Y = OUTPUT
0 0 D0
0 1 D1
1 0 D2
1 1 D3
\
PIN DIAGRAM FOR IC 74154: 1-to-16 Demultiplexer
PROCEDURE:
RESULT:
Thus the multiplexer and de-multiplexer circuit was designed using logic gates and their
truth table was verified.
EXP NO. : DESIGN AND IMPLEMENTATION OF ENCODER AND DECODER
DATE :
AIM:
To design and implement encoder and decoder using logic gates.
APPARATUS REQUIRED:
Sl.No. COMPONENT SPECIFICATION QTY.
1. 3 I/P NAND GATE IC 7411 2
2. OR GATE IC 7432 3
3. NOT GATE IC 7404 1
2. IC TRAINER KIT - 1
3. PATCH CORDS - 27
THEORY: ENCODER
An encoder is a digital circuit that performs inverse operation of a decoder. An encoder
has 2n input lines and n output lines. In encoder the output lines generates the binary code
corresponding to the input value. In octal to binary encoder it has eight inputs, one for each
octal digit and three output that generate the corresponding binary code. In encoder it is
assumed that only one input has a value of one at any given time otherwise the circuit is
meaningless. It has an ambiguila that when all inputs are zero the outputs are zero. The zero
outputs can also be generated when D0 = 1.
DECODER:
A decoder is a multiple input multiple output logic circuit which converts coded input
into coded output where input and output codes are different. The input code generally has
fewer bits than the output code. Each input code word produces a different output code
word i.e., there is one to one mapping can be expressed in truth table. In the block diagram of
decoder circuit the encoded information is present as n input producing 2n possible outputs.
2n output values are from 0 through out 2n – 1.
TRUTH TABLE: OCTAL TO BINARY ENCODER
INPUT (OCTAL) OUTPUT
D0 D1 D2 D3 D4 D5 D6 D7 A B C
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
LOGIC DIAGRAM FOR ENCODER:
TRUTH TABLE: 2 TO 4 DECODER WITH ENABLE
INPUT OUTPUT
EN A B D0 D1 D2 D3
0 X X 0 0 0 0
1 0 0 1 0 0 0
1 0 1 0 1 0 0
1 1 0 0 0 1 0
1 1 1 0 0 0 1
RESULT:
Thus the encoder and decoder circuit was designed using logic gates and their truth
table was verified.
EXP NO. :
DATE :
RECOGNITION AND VERIFICATION OF FLIPFLOP
1. R-S flip-flop
2. J - K flip-flop
3. T Flip-Flop
4. D Flip-Flop
Theory: -In case of sequential circuits the effect of all previous inputs on the
outputs is represented by a state of the circuit. Thus, the output of the circuit at any time
depends upon its current state and the input. These also determine the next state
of the circuit. The relationship that exists among the inputs, outputs, present states
and next states can be specified by either the state table or the state diagram.
State Table: -The state table representation of a sequential circuit consists of three
sections labelledpresent state next stateand output. T he p r e sen t s t a t e
d e s i gn a t e s t h e s t a t e o f f l i p - f l op s be f o re t h e occurrence of a clock pulse.
The next state shows the states of flip-flops after the clock pulse, and the output
section lists the value of the output variables during the present state.
Flip-Flop:-The basic one bit digital memory circuit is known as flip-flop.It can store either
0or 1. Flip-flops are classifieds according to the number of inputs.
R-S Flip-Flop:- The circuit is similar to SR latch except enable signal is replaced by clock
pulse.
Logic Diagram
Logic Diagram
Logic Diagram
DATE :
CONSTRUCTION AND VERIFICATION OF 4 BIT RIPPLE COUNTER AND MOD 10/MOD 12
RIPPLE COUNTER
AIM: To design and verify 4 bit ripple counter mod 10/ mod 12 ripple counter.
APPARATUS REQUIRED:
Sl.No. COMPONENT SPECIFICATION QTY.
1. JK FLIP FLOP IC 7476 2
2. NAND GATE IC 7400 1
3. IC TRAINER KIT - 1
4. PATCH CORDS - 30
THEORY:
A counter is a register capable of counting number of clock pulse arriving at its clock input.
Counter represents the number of clock pulses arrived. A specified sequence of states appears as counter
output. This is the main difference between a register and a counter. There are two types of counter,
synchronous and asynchronous. In synchronous common clock is given to all flip flop and in asynchronous
first flip flop is clocked by external pulse and then each successive flip flop is clocked by Q or Q output
of previous stage. A soon the clock of second stage is triggered by output of first stage. Because of inherent
propagation delay time all flip flops are not activated at same time which results in asynchronous
operation.
PIN DIAGRAM FOR IC 7476:
Equivalent Diagram:
THEORY:
A counter is a register capable of counting number of clock pulse arriving at its clock input.
Counter represents the number of clock pulses arrived. In synchronous counters, the clock inputs
of all the flip-flops are connected together and are triggered by the input pulses. Thus, all the flip-
flops change state simultaneously (in parallel). An up/down counter is one that is capable of
progressing in increasing order or decreasing order through a certain sequence. An up/down
counter is also called bidirectional counter. Usually up/down operation of the counter is controlled
by up/down signal. When this signal is high counter goes through up sequence and when up/down
signal is low counter follows reverse sequence.
PIN DIAGRAM FOR IC 7476:
LOGIC DIAGRAM: 3 – BIT SYNCHRONOUS UP / DOWN COUNTER
TRUTH TABLE:
Up Counter Down Counter
CLK QA QB QC QA QB QC
0 0 0 0 1 1 1
1 0 0 1 1 1 0
2 0 1 0 1 0 1
3 0 1 1 1 0 0
4 1 0 0 0 1 1
5 1 0 1 0 1 0
6 1 1 0 0 0 1
7 1 1 1 0 0 0
8 0 0 0 1 1 1
PROCEDURE:
(i) Connections are given as per circuit diagram.
RESULT:
Thus Up counter and Down counter was designed successfully using IC 7476 and its truth table
was verified successfully.
EXP NO. :
DATE :
APPARATUS REQUIRED:
THEORY:
A register is capable of shifting its binary information in one or both directions is known as shift
register. The logical configuration of shift register consist of a D-Flip flop cascaded with output
of one flip flop connected to input of next flip flop. All flip flops receive common clock pulses
which causes the shift in the output of the flip flop. The simplest possible shift register is one that
uses only flip flop. The output of a given flip flop is connected to the input of next flip flop of the
register. Each clock pulse shifts the content of register one bit position to right.
TRUTH TABLE:
1 1 0
2 0 0
3 0 0
4 1 1
5 X 0
6 X 0
7 X 1
LOGIC DIAGRAM: SERIAL IN PARALLEL OUT
TRUTH TABLE:
OUTPUT
CLK DATA QA QB QC QD
1 1 1 0 0 0
2 0 0 1 0 0
3 0 0 0 1 1
4 1 1 0 0 1
LOGIC DIAGRAM: PARALLEL IN SERIAL OUT
TRUTH TABLE:
CLK Q3 Q2 Q1 Q0 O/P
0 1 0 0 1 1
1 0 0 0 0 0
2 0 0 0 0 0
3 0 0 0 0 1
LOGIC DIAGRAM: PARALLEL IN PARALLEL OUT
TRUTH TABLE:
DATA INPUT OUTPUT
CLK DA DB DC DD QA QB QC QD
1 1 0 0 1 1 0 0 1
2 1 0 1 0 1 0 1 0
PROCEDURE:
Thus the various shift registers were designed successfully using flip-flops and their truth tables
were verified successfully.
Expt. No:
Date:
Aim: To write and execute Assembly language program using different addressing modes
and copying a set of data from source memory location to destination for 8086 Processor.
Components:
4100 01
4101 02
4102 03
4103 04
4104 05
4105 06
4106 07
4107 08
4108 09
4109 10
MOV SI 4100
MOV DI 4500
MOV CX 0A
MOV AL [SI]
MOV [DI] AL
INC SI
INC DI
DEC CX
JNZ 41009
INT 03
Data Output
4500 01
4501 02
4502 03
4503 04
4504 05
4505 06
4506 07
4507 08
4508 09
4509 10
Program: By overlapping the memory location
Data Input:
4100 01
4101 02
4102 03
4103 04
4104 05
4105 06
4106 07
4107 08
4108 09
4109 10
MOV SI 4101
MOV DI 450C
MOV CX 0A
MOV AX [SI]
MOV [DI] AX
DEC SI
DEC DI
DEC CX
JNZ NEXT
INT 03
Data Output
4103 01
4104 02
4105 03
4106 04
4107 05
4108 06
4109 07
410A 08
410B 09
410C 10
Result:
Program:
Algorithm:
1. Fix the DPTR with the Latch Chip address FFC0
2. Move the values of register A one by one with some delay based on the 2-
Phase switching Scheme and repeat the loop.
3. For Anti Clockwise direction repeat the step 3 by reversing the value
sequence.
4. End the Program
Result:
The direction of rotation of the stepper motor changes as the data bit in the port changes