LCD Lab Manual
LCD Lab Manual
INDEX
PART A
PART B
THEORY:
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 (∑)
POS: - It is the product of the sums form in which the terms are taken as 0. It is denoted in the
K-Map expression by the Sign pie (π)
Truth table
PROCEDURE:
1. Test all the components and IC packages using a digital tester and assure that the wires
are in good condition using multimeter.
2. Verify the dual in line package pinout of the IC before feeding the inputs.
3. Set up the circuits and observe the outputs. Enter the output states in truth table
corresponding to the input combination.
RESULT: Realized the Boolean functions using logic gates in both SOP and POS forms.
THEORY:
Half Adder: The simplest binary adder is called a half adder. Half adder has two input bits and
two output bits. One output bit is the sum and the other is carry. They are represented by S and C
in the logic symbol.
S=A B
C = AB
Full Adder: A half adder has no provision to add a carry from the lower order bits when binary
numbers are added. When two input bits and a carry are to be added, the number of input bits
becomes three and the input combinations increases to eight. For this, a full adder is used. Like
half adder, it also has a sum bit and a carry bit. The new carry generated is represented by �� and
carry generated from the previous addition is represented by ��−1.
S=A B ��−1 .
�� = �� + ��−1 (A B)
Half Subtractor: Subtracting a single-bit binary value B from another A (i.e. A -B ) produces a
difference bit D and a borrow out bit B-out. This operation is called half subtraction and the
circuit to realize it is called a half subtractor. The Boolean functions describing the half-
Subtractor are:
Full Subtractor: Subtracting two single-bit binary values, B, Cin from a single-bit value A
produces a difference bit D and a borrow out Br bit. This is called full subtraction. The Boolean
functions describing the full-subtracter are:
PROCEDURE:
1. Verify whether all the components and wires are in good condition.
2. Set up the half adder circuit and feed the input bit combinations.
3. Observe the output corresponding to input combinations and enter it in the truth table.
4. Repeat the above steps for all circuits.
HALF ADDER
I/P O/P
A B C D
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
S =A B C=A.B
FULL ADDER
Logic Symbol
Input Output
�� �� ��−1 �� ��
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
Please draw half adder and full adder circuit using NAND Gates
1.
Please draw half Subtractor and full subtractor circuit using NOR Gates
RESULT:
The circuit for half/full adder and subtractor were setup and the output for various combinations
of input are observed.
THEORY:
4 BIT BINARY ADDER:
A binary adder is a digital circuit that produces the arithmetic sum of two binary numbers.
It can be constructed with full adders connected in cascade, with the output carry from each full
adder connected to the input carry of next full adder in chain. The augends bits of ‘A’ and the
addend bits of ‘B’ are designated by subscript numbers from right to left, with subscript 0
denoting the least significant bits. The carries are connected in chain through the full adder. The
input carry to the adder is C0 and it ripples through the full adder to the output carry C4.
4 BIT BINARY SUBTRACTOR:
The circuit for subtracting A-B consists of an adder with inverters, placed between each
data input ‘B’ and the corresponding input of full adder. The input carry C0 must be equal to 1
when performing subtraction.
4 BIT BINARY ADDER/SUBTRACTOR:
The addition and subtraction operation can be combined into one circuit with one
common binary adder. The mode input M controls the operation. When M=0, the circuit is adder
circuit. When M=1, it becomes subtractor.
4 BIT BCD ADDER:
Consider the arithmetic addition of two decimal digits in BCD, together with an input
carry from a previous stage. Since each input digit does not exceed 9, the output sum cannot be
greater than 19, the 1 in the sum being an input carry. The output of two decimal digits must be
represented in BCD and should appear in the form listed in the columns.
ABCD adder that adds 2 BCD digits and produce a sum digit in BCD. The 2 decimal
digits, together with the input carry, are first added in the top 4-bit adder to produce the binary
sum.
PIN DIAGRAM FOR IC 7483:
LOGIC DIAGRAM:
4-BIT BINARY ADDER
LOGIC DIAGRAM:
4-BIT BINARY SUBTRACTOR
LOGIC DIAGRAM:
4-BIT BINARY ADDER/SUBTRACTOR
TRUTH TABLE:
A4 A3 A2 A1 B4 B3 B2 B1 C S4 S3 S2 S1 B D4 D3 D2 D1
LOGIC DIAGRAM:
BCD ADDER
K MAP ?
TRUTH TABLE:
PROCEDURE:
RESULT: The circuit for 4-bit adder / subtractor and BCD adder using IC 7483 were setup and
the output for various combinations of input are observed.
1. SR flip flop
2. JK flip flop
3. D flip flop
4. T flip flop
5. JK Master slave flip flop
1 IC 7400,7404,7410 1,1,2
2 IC trainer kit 1
THEORY:
SR FLIP-FLOP: There are two inputs to the flip-flop defined as R and S. When I/Ps R=0 and
S=0 then O/P remains unchanged. When I/Ps R=0 and S=1 the flip-flop is switches to the stable
state where O/P is 1 i.e. SET. The I/P condition is R=1and S=0 the flip-flop is switched to the
stable state where O/P is 0 i.e. RESET. The I/P condition is R=1 and S=1 the flip-flop is switched
to the stable state where O/P is forbidden.
JK FLIP-FLOP: For purpose of counting, the J K flip-flop is the ideal element to use. The
variable J and K are called control I/Ps because they determine what the flip-flop does when a
positive edge arrives. When J and K are both 0s, both AND gates are disabled and Q retains its last
value.
D FLIP FLOP: This kind of flip flop prevents the value of D from reaching the Q output until
clock pulses occur. When the clock is low, both AND gates are disabled D can change value
without affecting the value of Q. On the other hand, when the clock is high, both AND gates are
enabled. In this case, Q is forced to equal the value of D. When the clock again goes low, Q
retains or stores the last value of D. D flip flop is a bistable circuit whose D input is transferred to
the output after a clock pulse is received.
T FLIP-FLOP: The T or "toggle" flip-flop changes its output on each clock edge, giving an
output which is half the frequency of the signal to the T input. It is useful for constructing binary
counters, frequency dividers, and general binary addition devices. It can be made from a J-K flip-
flop by tying both of its inputs high.
MASTER-SLAVE JK FLIP-FLOP: The Master-Slave Flip-Flop is basically two gated SR flip-
flops connected together in a series configuration with the slave having an inverted clock pulse.
The outputs from Q and Q from the “Slave” flip-flop are fed back to the inputs of the “Master”
with the outputs of the “Master” flip flop being connected to the two inputs of the “Slave” flip flop.
This feedback configuration from the slave’s output to the master’s input gives the characteristic
toggle of the JK flip flop.
The input signals J and K are connected to the gated “master” SR flip flop which “locks” the
input condition while the clock (Clk) input is “HIGH” at logic level “1”. As the clock input of
the “slave” flip flop is the inverse (complement) of the “master” clock input, the “slave” SR flip
flop does not toggle. The outputs from the “master” flip flop are only “seen” by the gated “slave”
flip flop when the clock input goes “LOW” to logic level “0”.
When the clock is “LOW”, the outputs from the “master” flip flop are latched and any additional
changes to its inputs are ignored. The gated “slave” flip flop now responds to the state of its
inputs passed over by the “master” section.
Then on the “Low-to-High” transition of the clock pulse the inputs of the “master” flip flop are
fed through to the gated inputs of the “slave” flip flop and on the “High-to-Low” transition the
same inputs are reflected on the output of the “slave” making this type of flip flop edge or pulse-
triggered.Then, the circuit accepts input data when the clock signal is “HIGH”, and passes the
data to the output on the falling-edge of the clock signal. In other words, the Master-Slave JK
Flip flop is a “Synchronous” device as it only passes data with the timing of the clock signal.
PROCEDURE:
SR FLIP FLOP
7400
7400
7400
7400
D FLIP FLOP
T FLIP FLOP
JK FLIP FLOP
DATE:
Sl
Components and equipments Specification Quantity
No
1 IC 7476,7400 2,2 each
2 IC trainer kit 1
THEORY:
This type of asynchronous counter counts upwards on each trailing edge of the input clock signal
starting from 0000 until it reaches an output 1001 (decimal 9). Both outputs Q0 and Q3 are now
equal to logic “1”. On the application of the next clock pulse, the output from the 74LS10
NAND gate changes state from logic “1” to a logic “0” level.As the output of the NAND gate is
connected to the CLEAR (CLR) inputs of all the 74LS73 J-K Flip-flops, this signal causes all of
the Q outputs to be reset back to binary 0000 on the count of 10. As outputs QA and QD are now
both equal to logic “0” as the flip-flop’s have just been reset, the output of the NAND gate
returns back to a logic level “1” and the counter restarts again from 0000. We now have a decade
or Modulo-10 up-counter.
As we know that in the up-counter each flip-flop is triggered by the normal output of the
preceding flip-flop (from output Q of first flip-flop to clock of next flip-flop); whereas in a
down-counter, each flip-flop is triggered by the complement output of the preceding flip-flop
(from output Q^ of first flip-flop to clock of next flip-flop). The operation of such a counter is
controlled by the up-down control input. i.e, in the circuit diagram mode input(M) is the up-
down control input. When M=0, the output of XOR gate is Q output and it will act as a 3-bit up
counter. When M=1, the output of XOR gate is complement of Q output and it will act as a 3-bit
down counter.
PROCEDURE:
CIRCUIT DIAGRAMS
DECADE COUNTER
Truth table
Clock Q3 Q2 Q1 Q0
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
Truth Table
RESULT: The circuit for asynchronous 3 bit up/down counter and decade counter were setup
and the output for various combinations of input are observed.
DATE:
AIM: To design and setup synchronous 3 bit up/down counter and decade counter using JK
flipflops.
Sl
Components and equipments Specification Quantity
No
1 IC 7476,7400,7408,7410 2,2,1,1 each
2 IC trainer kit 1
THEORY:
In Asynchronous binary counters the output of one counter stage is connected directly to
the clock input of the next counter stage and so on along the chain. The result of this is that the
Asynchronous counter suffers from what is known as “Propagation Delay” in which the timing
signal is delayed a fraction through each flip-flop. However, with the Synchronous Counter, the
external clock signal is connected to the clock input of EVERY individual flip-flop within the
counter so that all of the flip-flops are clocked together simultaneously (in parallel) at the same
time giving a fixed time relationship. In other words, changes in the output occur in
“synchronisation” with the clock signal. The result of this synchronisation is that all the
individual output bits changing state at exactly the same time in response to the common clock
signal with no ripple effect and therefore, no propagation delay.
PROCEDURE:
CIRCUIT DIAGRAM
DECADE COUNTER
Excitation Table
DESIGN
Circuit Diagram
Excitation Table
Design
Circuit Diagram
RESULT : The circuit for synchronous 3 bit up/down counter and decade counter using JK
flipflops were setup and the output for various combinations of input are observed.
DATE:
AIM: To implement ring and Johnson counter using flip flop integrated circuits.
Sl
Components and equipments Specification Quantity
No
1 IC 7474 2
2 IC trainer kit 1
THEORY:
The synchronous Ring Counter, is preset so that exactly one data bit in the register is set to
logic “1” with all the other bits reset to “0”. To achieve this, a “CLEAR” signal is firstly applied
to all the flip-flops together in order to “RESET” their outputs to a logic “0” level and then a
“PRESET” pulse is applied to the input of the first flip-flop before the clock pulses are applied.
This then places a single logic “1” value into the circuit of the ring counter.
So on each successive clock pulse, the counter circulates the same data bit between the four flip-
flops over and over again around the “ring” every fourth clock cycle. But in order to cycle the
data correctly around the counter we must first “load” the counter with a suitable data pattern as
all logic “0’s” or all logic “1’s” outputted at each clock cycle would make the ring counter
invalid.
Johnson Counter
The Johnson Ring Counter or “Twisted Ring Counters”, is another shift register with feedback
exactly the same as the standard Ring Counter , except that this time the inverted output Q of the
last flip-flop is now connected back to the input D of the first flip-flop as shown in circuit
diagram.
The main advantage of this type of ring counter is that it only needs half the number of flip-flops
compared to the standard ring counter then its modulo number is halved. So a “n-stage” Johnson
counter will circulate a single data bit giving sequence of 2n different states and can therefore be
considered as a “mod-2n counter”.
PROCEDURE:
Ring Counter
Truth Table
Clock Q0 Q1 Q2 Q4 D0 D1 D2 D3
1 1 0 0 0 0 1 0 0
2 0 1 0 0 0 0 1 0
3 0 0 1 0 0 0 0 1
4 0 0 0 1 1 0 0 0
5 1 0 0 0 0 1 0 0
Design
Circuit Diagram
Johnson Counter
Truth Table
Clock Q0 Q1 Q2 Q4 D0 D1 D2 D3
0 0 0 0 0 1 0 0 0
1 1 0 0 0 1 1 0 0
2 1 1 0 0 1 1 1 0
3 1 1 1 0 1 1 1 1
4 1 1 1 1 0 1 1 1
5 0 1 1 1 0 0 1 1
6 0 0 1 1 0 0 0 1
7 0 0 0 1 0 0 0 0
Design
Circuit Diagram
RESULT: The circuit for Ring and Johnson counter using flip flop integrated circuits were set
up and observed its outputs.
DATE :
AIM: To design and implement multiplexer and demultiplexer using logic gates and study of IC
74150 and IC 74154.
COMPONENTS AND EQUIPMENTS 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
4. IC TRAINER KIT - 1
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.
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
FUNCTION TABLE:
S1 S0 INPUT
0 0 X → D0 = X S1’ S0’
0 1 X → D1 = X S1’ S0
1 0 X → D2 = X S1 S0’
1 1 X → D3 = X S1 S0
TRUTH TABLE:
INPUT OUTPUT
S1 S0 I/P D0 D1 D2 D3
0 0 0 0 0 0 0
0 0 1 1 0 0 0
0 1 0 0 0 0 0
0 1 1 0 1 0 0
1 0 0 0 0 0 0
1 0 1 0 0 1 0
1 1 0 0 0 0 0
1 1 1 0 0 0 1
PROCEDURE:
(i) Connections are given as per circuit diagram.
(ii) Logical inputs are given as per circuit diagram.
(iii) Observe the output and verify the truth table.
RESULT: The circuit for multiplexer and demultiplexer using logic gates were set up and the
output for various combinations of input are observed.
PART B
The Basys 3 board is a complete, ready-to-use digital circuit development platform based on the
latest Artix®-7 Field Programmable Gate Array (FPGA) from Xilinx®. With its high-capacity
FPGA (Xilinx part number XC7A35T- 1CPG236C), low overall cost, and collection of USB,
VGA, and other ports, the Basys 3 can host designs ranging from introductory combinational
circuits to complex sequential circuits like embedded processors and controllers. It includes
enough switches, LEDs, and other I/O devices to allow a large number of designs to be
completed without the need for any additional hardware, and enough uncommitted FPGA I/O
pins to allow designs to be expanded using Digilent Pmods or other custom boards and circuits.
The Artix-7 FPGA is optimized for high performance logic, and offers more capacity, higher
performance, and more resources than earlier designs. Artix-7 35T features include:
Sl Components and
Specification Software Quantity
No equipments
OR gate waveform
Procedure:
1. Write a Verilog module to realize a basic gate.
2. Write a test bench to verify the design.
3. Simulate the test bench and verify the design.
4. Synthesize the design, implement in FPGA and verify the outputs.
RESULT: Verilog code for basic gates were familiarized and the following codes were
synthesized and bitstream file was generated and dumped to FPGA and output was verified.
Procedure:
1. Write the Verilog module to realize half adder in three different styles.
2. Write a test bench to verify the design.
3. Simulate the test bench and verify the design.
4. Synthesize the design, implement in FPGA and verify the outputs.
5. Realize Full Adder using half adder and perform above steps.
RESULT: Verilog modules for half adder and full adder in 3 modeling styles were familiarized.
Sl Components and
Specification Software Quantity
No equipments
1 FPGA Lattice iCEstick 1
Procedure:
1. Write the Verilog module to realize 4x1 MUX and 1x4 DEMUX.
2. Write a test bench to verify the design.
3. Simulate the test bench and verify the design.
4. Synthesize the design, implement in FPGA and verify the outputs.
RESULT: Developed verilog modules for a 4x1, 8x1 MUX and 1x4 DEMUX and observed its
outputs.
Sl Components and
Specification Quantity
No equipments Software
SR Flipflop waveform
JK Flipflop waveform
D Flipflop waveform
T Flipflop waveform
Procedure:
1. Write the Verilog module to realize the counters
2. Write a test bench to verify the design.
3. Simulate the test bench and verify the design.
4. Synthesize the design, implement in FPGA and verify the outputs.
RESULT: Verilog code for SR, D, JK, D, T flipflops and binary decade/Johnson/Ring counters
were written and observed the outputs.
Theory:
Procedure:
1. Write the Verilog module to realize the flipflops.
2. Write a test bench to verify the design.
3. Simulate the test bench and verify the design.
4. Synthesize the design, implement in FPGA and verify the outputs.
RESULT: