Final Shift Reg
Final Shift Reg
Electronics”
Presented by VLSI Batch -2025
1
Topics
SOP and POS Setup Time and Hold Time
Combinational and Sequential Glitches and Hazards
Circuit Shift Registers
ASCII Encoder FIFO
Decimal to Binary Encoder Memories
4-Bit Carry Look-Ahead Adder CMOS
(CLA)
NAND gate And NOR Gate using
Flipflop Converter CMOS
Counters
2
“SOP and POS”
3
Definition of SOP and POS
SOP (Sum of Products) and POS (Product of Sums) are core
concepts in Boolean Algebra.
SOP : Sum (OR) of product terms (AND).
POS :Product (AND) of sum terms (OR).
Both simplify Boolean expressions and are used in Karnaugh
Maps (K-maps).
What is SOP? What is POS?
SOP stands for Sum of Products. POS stands for Product of Sums (Not included
It is the sum (OR operation) of minterms above, but complementary for explanation).
in Boolean expressions. Represents the product (AND operation) of
Denoted by the symbol ∑ in equations. maxterms, using sum terms.
Works on active high logic, meaning it Works on active low logic, meaning it focuses on
represents conditions where variables are conditions where variables are false (0).
true (1). Example format: (A + B)·(B + C)·(C + D).
Example format: A·B + B·C + C·D.
Applications
Used for minimizing Boolean
expressions.
Widely applied in K-map
4
simplifications for designing
SOP in K-Map
• The below image represents the SOP in K-map. Example:
•F=1 for minterms m1 and m3.
CD C’D’ C’D CD CD’ Step 1: Identify Minterms
AB 00 01 11 10 •m1=A′B′C′D
•m3=A′B′CD
A’B’ A’B’C’D’ A’B’C’D A’B’CD A’B’CD’
00
Step 2: K-map Representation
0 1 3 2
CD=00 CD=01 CD=11 CD=10
A’B AB=00 0 1 1 0
A’BC’D’ A’BC’D A’BCD A’BCD’
01 4 5 7 6 AB=01 0 0 0 0
AB AB=11 0 0 0 0
11 ABC’D’ ABC’D ABCD ABCD’ AB=10 0 0 0 0
12 13 15 14
AB’ Step 3: Simplify
10 AB’C’D’ AB’C’D AB’CD AB’CD’ Final SOP Expression:
8 9 11 10
F=A′B′D
SOP(MINTERMS)
5
POS in K-Map
Example:
• The below image represents the POS in K-map. F=0for maxterms M0and M2.
Step 1: Identify Maxterms
C+D’ C’+D’ •M0=A+B+C+D
CD C+D C’+D
01 11 •M2=A+B+C′+D
AB 00 10
Step 2: K-map Representation
Denotation By Σ. By П.
7
“Combinational and Sequential Circuit”
8
What is Combinational Circuit?
• A Combinational circuit is a type of digital circuit where the output
depends only on the current inputs. It doesn't have memory or
store any past information.
Examples
Combinational
• Adders, Subtractors I Logic I
n input I I m output
• Multipliers, Dividers variables I Circuit I variables
• Multiplexers, Demultiplexers
• Encoders, Decoders
• Comparators, Parity generators
• All types of Code Converters etc.
9
What is Sequential Circuit?
• A Sequential circuit is a type of digital circuit where the output depends on
both the current inputs and past inputs. It has storage elements like flip-
flops or latches to remember previous states.
Examples
• Flip-Flops Sequential
n input I Logic I
m output
• Registers variables
I
I Circuit
I
I variables
I I
• Counters
• Shift Registers
Clock Pulses
• Finite State Machines (FSMs)
• Timers
10
Combinational Circuits VS. Sequential Circuits
2.) Output depends on the present input. 2.) Output depends on the present input and
past output.
3.) There is no memory unit. 3.) There is a memory unit to store immediate
results.
Examples: Half Adder, Full Adder, Multiplexer, Examples: Flip flops and Registers.
Demultiplexer etc.
11
ASCII Encoder
(American Standard Code for Information Interchange)
12
ASCII Encoder
• Converts Alphanumeric characters, symbols, and control signals into
their corresponding ASCII numerical values. These numerical values
are then represented in binary form.
• Example
Input : A
ASCII Value : 65
Binary Output : 1 0 0 0 0 0 1
13
• Total no of Combinations are 128 ( 0 to 127) than we need a total 7 Pins ( 0 to 6) in Output.
I0
I1
I2
I3
I4
I5 O0
.
. O1
.
.
O2
INPUT .
.
O3 OUTPUT
.. O4
.
. O5
.
. O6
I122
I123
I124
I125
I126
I127
14
ASCII Table
15
“Decimal to Binary Encoder”
Using 8:3 encoder
16
• Truth Table
INPUT OUTPUT
D B3 B2 B1 B0
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
17
CIRCUIT DIAGRAM
D1 D2 D3 D4 D5 D6 D7 D8 D9
B3
B2
B1
B0
18
Steps for achieve the Binary o/p equation
19
EXTERIOR DESIGN OF DECIMAL TO BINARY
ENCODER
D0 B3
D1
ENCODER
D2 B2
D3
D4
D5
B1
D6
D7
B0
D8
D9
20
“4-Bit Carry Look-Ahead Adder (CLA)”
Efficient Addition in Digital Circuits
21
Introduction to Carry Look-Ahead Adder
22
Carry Look Ahed Adder Block Diagram
Carry prediction
B3 A3 B2 A2 B1 A1 B0 A0
G3 G0
G2 G1
F. A. F. A. F. A. C0 F. A. Cin
C2 C1
P3 P2 P1 P0
S3 S2 S1 S0
Cout
23
Carry Propagation And Generation Equations
• C1 = G0 + P0*Cin
• C2 = G1 + P1*C1
= G1 + P1*G0 + P1*P0*Cin
• C3 = G2 + P2*C2
= G2 + P2*G1 + P2*P1*G0 + P2*P1*P0*Cin
• C4 = G3 + P3*C3
= G3 + P3*G2 + P3*P2*G1 + P3*P2*P1*G0 +
P3*P2*P1*P0*Cin
24
Carry-Output-Generation
C4
P3
G3
C3
P2
G2
P1
G1 C2
C1 25
Carry-Look-ahead-Adder-Truth-Table
A B Ci Ci+1 Condition
0 0 0 0 No carry generate
0 0 1 0 No carry generate
No Carry
0 1 0 0 Generate
No carry generate
0 1 1 1
1 0 0 0
No carry
1 0 1 1 propagate
1 1 0 1
1 1 1 1
Carry generate
27
“Flipflop Converter”
28
Flip flop conversions
SR to D
T to D SR to JK
D to SR SR to T
All Possibilities
D to T JK to T
JK to SR JK to D
29
PROCEDURE FOR CONVERSION
Draw the block diagram of the target flipflop from the given problem.
30
Ex : JK to D Flip-Flop Conversion
D Qn Qn+1 J K
0 0 0 0 X
0 1 0 X 1
1 0 1 1 X
1 1 1 X 0
31
K- MAP FOR JK TO D FLIPFLOP
J K
q’(n) q(n) q’(n) q(n)
D’ 0 X D’ X 1
D
D 1 X D X 0
J=D K = D’
32
CIRCUIT DIAGRAM
D J Q
CLK
K Q’
33
All Other Conversions
Conversion Pins
SR JK S = Jq’(n) , R = Kq(n)
SR D S=D , R= D’
SR T S = Tq’(n) , R = Tq(n)
JK SR J=S , K=R
JK D J = D , K = D’
JK T J=T , K=T
D JK D = Jq’(n) + K’q(n)
D T D = T + q(n)
T JK T = Jq’(n) + Kq(n)
T SR T = Sq’(n) + Rq(n)
T D T = D + q(n)
34
Counters
• A counter is a sequential circuit that counts pulses and produces
a sequences or mod(States).
• Uses
Frequency Division
To Count no. of Clock cycle Applied
Used for Pulse Stretching
• MOD no of Counter
Total no of Different States in Counter
Ex. 0 – 1 – 4 – 7 – 6 : MOD no. 5
After Application of MOD no Counter will go to it’s Starting
State.
• Types
1. Asynchronous Counter
2. Synchronous Counter
35
MOD of Counter Concept
• Let’s Understand with a Example
• MOD : 0 – 1 – 3 – 2 MOD no :
4
QA QB
• QB • QA
0 0
Ton = 2 clk Ton = 2 clk
0 1 Toff = 2 clk Toff = 2 clk
1 1 TQA = 4 clk TQA = 4 clk
fQB = fclk / 4 fQA = fclk / 4
1 0
Clk
QA
QB 36
What is an Asynchronous Counter?
• The flip-flops are not clocked simultaneously (Different Clocks).
The output of one flip-flop acts as the clock input for the next
flip-flop.
• Execution Slower (why ?)
• Only Fixed Sequence is Possible
• Propagation Delay Accumulated is increase as per going to block.
• Up Sequence
1 Q0 1 Q1 1 Q2 1 Q3
• Down Sequence Possible Sequence
1 Q0’ 1 Q1’ 1 Q2’ 1 Q3’
• BCD counter
CLK
37
No. of Flip-Flop are Required for designing a Counter
Mode M Counter N flip-flop
• Where 2^N >= M
• M is nothing but no of possible states
Ex : counting Sequence
• 0-1-2-3-4-5-6-7 and repeat it
• Than N = 3 that means No of Flip flops are three
• And by the using of we can generate a total 8 mods
38
MOD-16 Counter by Asynchronous
• Let’s Consider a 4bit Asynchronous Counter
1 Q0 1 Q1 1 Q2 1 Q3
40
CLK
Q0
Q1
Q2
Q3
42
Max Clock Frequency
1 Q0 1 Q1 1 Q2 1 Q3
LSB MSB
0 0 1 0 1 1
0 0 0 0 1 0
Decoding Error
0 1 0 0 0 0
1 0 0
Decoding Error
• 1 0 1 1 1 1 0 0 : decoding error(1 0 1 0, 1 0 0 0)
44
How to Avoid Decoding Error
Strobe
1 Q0 1 Q1 1 Q2 1 Q3
CLK
T(df) T(df) T(df) T(df)
45
“Understanding Setup Time and Hold
Time in Digital Circuits"
46
Introduction
• Setup Time:The minimum time before the clock edge that the data input
must remain stable to be reliably captured.
------------------------
-------------------------
Input
CLK
Tset
47
Continue..
• Hold Time:The minimum time after the clock edge that the data
input must remain stable to ensure proper operation.
----------------------------
----------------------------
Input
CLK
THol
48
Why Are They Important?
49
Setup Time Violation
-------------------------
------------------------
Input
Setup
CLK Time
violation
50
Hold Time Violation
• Occurs when data changes too soon after the clock edge.
• Causes incorrect latching of data.
-------------------------
--------------------------
------------------------
Input
Tset
Hold
CLK Time
Violation
51
Design Techniques to Avoid Violations
• Use flip-flops with better timing characteristics.
• Optimize clock distribution networks.
• Insert buffers to manage propagation delays.
• Adjust clock frequency for safe operation.
52
“Glitches and Hazards”
53
Glitches And Hazards
Definition
• A glitch is a short-lived, unintended pulse in a digital circuit's output.
• It occurs during signal transitions due to varying delays in the circuit.
Key Points
• Glitches appear as switching transients in combinational outputs.
• They result from propagation delays across different paths.
Causes of Glitches
1.Propagation delays in logic gates.
2.Unequal delays in input signal paths.
3.Race conditions during state transitions.
54
Types of Glitches
Static-1 glitch: The output should remain at logic 1 but temporarily
dips to logic 0.
55
Elimination of Hazards
Method-1
• Since Unequal delays are the main cause of Hazards,
Adding buffer to balance delays in parallel path can
eliminate hazard.
2ns 2ns
A 2ns A 2ns
B B
f f
C C
1ns 1ns
56
Method-2
• Adding Redundant gates can eliminate Hazards.
• The additional AC path acts as a "safety net," ensuring the
output doesn't glitch during specific transitions.
• f = Σm(3,4,5,7)
A
BC
A 00 01 11 10 F
0 0 B
0 1 0
C
1 1 1 1 0
F’= AB’ + BC + AC A
57
Method-3
• Adding pipelining registers at the end of combinational
circuit.
2ns
A 2ns f
B D Q Y
C
Clk
Clk
Y
58
“Shift Register”
59
A Shift Register is a sequential logic circuit used to store
Intoducion of Shift Register
and shift data.
60
SISO (Serial-In Serial-Out)
Introduction
A Serial-In Serial-Out (SISO) Shift Register is a type of
sequential circuit used to store and transfer data bit by bit.
Key Features
Data enters the register serially bit by bit and exits serially after
being shifted through all stages.
A. Serial-In Serial-Out
61
Structure
Flip-flops connected in series with one serial input and
one serial output, controlled by a shared clock.
Working
Initialization: Data enters serially, bit by bit.
Shifting: Each clock pulse moves data to the next flip-
flop.
Output: Data appears at the output after N clock cycles.
Serial Serial
D Q3 D Q2 D Q1 D Q0
DataIn DataOut
clk clk clk clk
clock
62
How Shifting Occurs in SISO Shift
Registers
63
64
SIPO (Serial-In Parallel-Out)
Definition
A SIPO Shift Register takes serial data input and provides
parallel output after processing.
Key Features
Shifts data serially, one bit per clock pulse.
Outputs all data in parallel after N clock cycles for an N-bit
register.
Data Out
Data In
B. Serial-In Parallel-Out 65
Structure
Flip-flops connected in series with one serial input, multiple
parallel outputs, and a shared clock for synchronization.
Working
Bits enter serially through the input line.
Each bit is stored in a flip-flop and shifted to the next stage on
every clock pulse.
The full data word is available simultaneously at the parallel
output lines. Data Out
DQ3 DQ1 DQ1 DQ0
Data Input D Q3 D Q2 D Q1 D Q0
clock
clear
66
67
PISO(Parallel-In Serial-Out)
Definition
A Parallel-In Serial-Out (PISO) Shift Register is
used to load parallel data and shift it out serially,
bit by bit. Data In
It’s designed for parallel-to-serial conversion,
enabling efficient data transfer.
68
Structure
Flip-flops store data, multiplexers handle serial shifting and
Parallel inputs allow simultaneous data loading.
Working Mechanism
Parallel Load: Data is loaded simultaneously into flip-flops.
Shifting: Bits shift one position per clock pulse.
Serial Output: Outputs one bit per cycle until all bits are
shifted out.
69
ParalleI Input
Control
Signal
OR OR OR
Serial
D Q3 D Q2 D Q1 D Q0
out
clk clk clk clk
clock
clear
70
71
PIPO(Parallel-In Parallel-Out)
Definition Data In
A Parallel-In Parallel-Out (PIPO) Shift
Register accepts and outputs data in
parallel without serialization.
It’s primarily used for fast data
storage and transfer.
Key Features
Operates on the entire data word at Data Out
once. D. Parallel-In Parallel-Out
No shifting occurs; only storage and
transfer functions are performed.
72
Structure
Consists of flip-flops with parallel input and parallel output connections.
All bits are loaded and retrieved simultaneously.
Working Mechanism
Parallel Load: Data is loaded into all flip-flops at the same time.
Parallel Output: All bits appear simultaneously at the output lines.
Parallel DataOut
QA QB QC QD
D Q3 D Q2 D Q1 D Q0
clock
PA PB PC PD
Parallel Data In73
74
Bidirectional Shift Register
Definition
Sequential circuit for storing and shifting
data.
Uses flip-flops to move data bit by bit.
Shifts data left or right with control
signals.
Structure
Enables flexible and reversible data Working
Flip-Flops:
operations.Store data. Data Input: Entered serially.
Clock Input: Synchronizes shifts. Direction Control:
Control Signals: Select direction (left Left Shift: Data moves to higher-order
or right). bits.
Serial Data I/O: For data entry and Right Shift: Data moves to lower-
retrieval. order bits.
Direction Logic: Manages bidirectional Clock Pulse: Shifts data through flip-
flow. flops.
Data Output: Exits serially at the
output. 75
Control
Signal
Dr Dl
AND AND AND AND AND AND AND AND
OR OR OR OR
D Q3 D Q2 D Q1 D Q0
clock
clear
76
77
FIFO(First-In First-Out)
What is FIFO?
FIFO (First-In, First-Out) is a sequential
data storage and transfer system where the
first data input is the first to be output.
Operates like a queue, maintaining the order
of data flow.
78
Structure of FIFO
Components
Wr_Clk Rd_Clk
• Input/Write Port: Accepts new data.
Data_In Data_out
• Flip-Flops: Temporarily store data sequentially.
Wr_en
FIFO Rd_in
• Output/Read Port: Retrieves data in the same order as entered.
Full Empty
• Control Logic: Manages read/write operations and data flow.
How It Works
• Data enters through the write port and shifts toward the read port. Rst
• Control signals (e.g., enable, full/empty flags) regulate data entry and output.
Types of FIFO
Synchronous FIFO Asynchronous FIFO
Both read and write operations are clocked Read and write operations use different
by the same clock signal. clock signals.
Used when the input and output operate at Ideal for systems with mismatched
the same speed. input/output speeds.
79
80
Usage of shift registers
82
“Memories”
83
What is Memory?
• Memory devices store data temporarily or permanently.
• Used in digital systems like computers and hard disks to store user data or
control programs.
• To handle large data efficiently, memory devices must have high capacity
and be cost-effective.
Block diagram : Data lines
Address lines
Memory unit
Read
Write
84
Structure and Operations of Memory
85
CLassification
Memory
Volatile Non-volatile
Memory Memory
Flash
SRA DRA RO PRO EPRO EEPRO
memor FRAM MRAM
M M M M M M
y
86
Volatile memory
• Volatile memory is a type of computer memory that
requires a continuous power supply to retain data.
• All data is lost when the power is turned off.
• Used for temporary storage and high-speed
operations.
87
Types of Volatile Memory
Static RAM (SRAM)
• Stores data using flip-flops.
• Faster and more reliable than DRAM.
• Used in cache memory.
Dynamic RAM (DRAM)
• Stores data using capacitors.
• Requires periodic refreshing to retain data.
• Used as main memory in computers.
88
Non-Volatile Memory
• Non-volatile memory is a type of memory that retains
data even when the power is turned off.
• It is used for long-term data storage in digital devices.
89
Types of Non-Volatile Memory
Read-Only Memory (ROM)
• Permanently stores system firmware.
• Variants:
• PROM: Can be programmed once.
• EPROM: Erased with UV light and reprogrammed.
• EEPROM: Erased and rewritten electrically.
90
Continue...
Flash Memory
• High-speed, rewritable memory.
• Used in USB drives, SSDs, and memory cards.
Magnetoresistive RAM (MRAM)
• Combines non-volatility with high speed.
• Stores data using magnetic elements.
Ferroelectric RAM (FRAM)
• Uses ferroelectric material for durability and efficiency.
91
“Programmable Logic Device”
92
What is Programmable Logic Device (PLD)?
93
Types of PLD’s
• Simple PLDs: PAL, PLA, PROM.
94
PAL (Programmable Array Logic)
• It is PLD with a programmable AND array and a fixed OR array.
• The AND array performs the necessary logic functions, while the OR
• Array allows custom combinations of those functions.
OUTPUTS
INPUTS
PROGRAMM
FIXED OR
ABLE AND
ARRAY
ARRAY
95
“Implementation Of Full Adder Using PAL”
96
Truth Table and Boolean Eq. of Full Adder
A B C S Cout
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
SUM
CARRY
98
“Programmable Logic Array”
99
PLA (Programmable Logic Array)
• A PLD with programmable AND and OR arrays.
OUTPUTS
INPUTS
PROGRAMM PROGRAMM
ABLE AND ABLE OR
ARRAY ARRAY
100
“Implementation Of Full Adder Using PLA”
101
Truth Table and Boolean Eq. of Full Adder
A B C S Cout
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
• Using K-map we will get the boolean equation for Sum &
Cout
• Sum = A’B’C + A’BC’ + AB’C’ + ABC
• Cout = BC + AB + AC
102
Diagram
A B C
SUM CARRY
103
“Programmable Read Only Memory”
104
PROM (Programmable Read Only Memory)
• It has a fixed AND array (decoder) and a programmable OR array.
OUTPUTS
INPUTS
FIXED AND
PROGRAMMA
ARRAY
BLE OR ARRAY
(DECODER)
105
“Implementation Of Full Adder Using PROM”
106
Truth Table of Full Adder
A B C S Cout
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
• Sum = S =Σm(1,2,4,7)
• Cout = Σm(3,5,6,7)
107
Diagram
Y0
A Y1
3X8 Y2
B Y3
DECODER Y4
Y5
C Y6
Y7
SUM CARRY
108
What is CMOS ?
109
CMOS (Complementary Metal-Oxide-
Semiconductor)
It is a technology used to design digital and analog circuits
CMOS circuits use:
•PMOS Transistors: Operate when input is LOW (0).
•NMOS Transistors: Operate when input is HIGH (1).
NMOS PMOS
G G
B S D S D B
P+ n+ n+ P+ P+ n+
n-well
P substrate
110
“NAND Gate using CMOS”
111
VDD
NAND Gate: Outputs LOW only when all
inputs are HIGH
Logic Equation: Y= A⋅B
113
VDD NOR Gate: Outputs HIGH only when all
inputs are LOW.
Logic Equation: Y= A+ B
A Two PMOS transistors in series
connected to VDD
Two NMOS transistors in parallel
connected to GND
B •Operation:
•Both inputs LOW → PMOS ON →
YY=1(HIGH).
•At least one input HIGH → NMOS ON →
Y=0(LOW).
A B Y
A B
0 0 1
0 1 0
1 0 0
1 1 0
114
Reference
https://www.tutorialspoint.com/digital-electronics/im
plementation-of-nand-nor-gate-using-cmos.htm
https://www.elprocus.com/carry-look-ahead-adder/
https://en.wikipedia.org/wiki/CMOS
115