De U1-5 MVSR
De U1-5 MVSR
- 3 - - - 30 70 3
Course Objectives
To learn the principles of digital hardware and support given by it to the software.
To explain the operation and design of combinational and arithmetic logic circuits.
To design hardware for real world problems.
Course Outcomes
At the end of this course the students will be able to
1. Understand the deign process of digital hardware, use Boolean algebra to minimize the logical
expressions and optimize the implementation of logical functions.
2. Understand the number representation and design combinational circuits like adders, MUX etc.
3. Design Combinational circuits using PLDS and write VHDL code for basic gates and
combinational circuits.
4. Analyse sequential circuits using flip-flops and design registers, counters.
5. Represent a sequential circuit using Finite State machine and apply state minimization techniques
to design a FSM
UNIT – I
Design Concepts: Digital Hardware, Design process, Design of digital hardware. Introduction to logic
circuits – Variables and functions, Logic gates and networks. Boolean algebra, Synthesis using gates, Design
examples. Optimized implementation of logic functions using K-Map and Quine-McCluskey Tabular
method
UNIT – II
Number representation: Addition and Subtraction of signed and unsigned numbers.
Combinational circuit building blocks: Half adder, Full adder, Multiplexers. Decoders. Encoders. Code
converters, BCD to 7-segment converter, Arithmetic comparator circuits.
UNIT – III
Design of combinational circuits using Programmable Logic Devices (PLDs): General structure of a
Programmable Array Logic (PAL), Programmable Logic Arrays(PLAs), Structure of CPLDs and FPGAs, 2-
input and 3-input lookup tables (LUTs)
Introduction to Verilog HDL: Verilog code for basic logic gates, adders, decoders
UNIT – IV
Sequential Circuits: Basic Latch, Gated SR Latch, gated D Latch, Master-Slave edge triggered flip-flops, T
Flip-flop, JK Flip-flop, Excitation tables. Registers, Counters, Verilog code for flip-flops
UNIT – V
Synchronous Sequential Circuits: Basic Design Steps, Finite State machine(FSM) representation using
Moore and Mealy state models, State minimization, Design of FSM for Sequence Generation and Detection,
Algorithmic State Machine charts.
12
Faculty of Engineering, O.U. AICTE Model Curriculum with effect from Academic Year 2019-20
Suggested Readings:
1. Moris Mano and Michael D CIletti, Digital Design, Pearson, fourth edition,2008
2. Zvi Kohavi, Switching and Finite Automata Theory, 3rd ed., Cambridge University Press-New Delhi,
2011.
3. R. P Jain, Modern Digital Electronics,4th ed., McGraw Hill Education (India) Private Limited, 2003
4. Ronald J.Tocci, Neal S. Widmer &Gregory L.Moss, “Digital Systems: Principles and Applications,”
PHI, 10/e, 2009.
5. Samir Palnitkar, “Verilog HDL A Guide to Digital Design and Synthesis,” 2nd Edition, Pearson
Education, 2006.
13
DIGITAL ELECTRONICS
UNIT-I
Part-1
DIGITAL ELECTRONICS
UNIT-I
Part-2
Numben Syalem
Fon
Pocen8 data in a
digital Compatey
K
olocohg rumben &gaems Oe Csed.
bae a , Penfonn
ertud divisi am oy a.
5 A (uDo: ouDa
a 29
4
OCta numben Sysems- 8es digits o to 7
Coith ae 8. oowed Faon dacmato oChl
Porbam ePear d diisio H 8
50(asde
nambea Sysle
16
a
o ao @o
o
a v oxe + ox
= ax6u+o Ho (as))o
E a)a to dathal numb
cawve
4 avg+5x 8° 64416+5s
a5g =
E owye Cloooo D to btectma umboj.
(1oo oo L, -
1xa*oYa4+ox234ox a-poxa'
T
5 2 3 a a ad
224
3a+o4 o+04o+133o
(1 1o D
txa yas+1xa44ox 23
+ 1 x a + lya' + lx2
a a5 a a a
+a+I
6 4 + 3a+ 16+o y
Hexa decma
mumte ystem
o to amd aPhabets
Ues 6 digis
CoTth e 6
A oF
Caweat C l o o hexadeca
lloo
664 (100 696
6
S t haxadacme
Conve
EX
16
55A
bmeny oCtal
CoJonsion oM
OCtd
oo Oo (4Ds
o 3 bta tarhg from
Fonm a gmop
MS& If
n d Phocead tods
-
he Ls no+ aa m
oF b t au
g u i d e numbe
Jas gaoaP aPRhd zenoS.
Ex Conven F ALoDa t Octal.
Sol
3 3
3g
aPRendalL
to hexadaca
Conjer (loo co1
oto haxadacial
haxadetha
Rom bnoy
S To
To Cowe
b bs
4 i i
a 9ou of
Fmm
humke OF e a s
Neauirad
LsB and aPed
doost hd- hawe2
Jasl 9oap
fon
( oo o o),
Oo lo
Connod
1D haxadecnal
1D2
200g aPROnded
o ooI 1 1
(L
F
DIGITAL ELECTRONICS
UNIT-I
Part-3
All possible combinations of 3 logic variables
A B C Decimal
Value
0 0 0 0
0 0 1 1
0 1 0 2
0 1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7
A B C D Decimal
Value
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 10
1 0 1 1 11
1 1 0 0 12
1 1 0 1 13
1 1 1 0 14
1 1 1 1 15
All possible combinations of 5 logic variables
A B C D E Decimal
Value
0 0 0 0 0 0
0 0 0 0 1 1
0 0 0 1 0 2
0 0 0 1 1 3
0 0 1 0 0 4
0 0 1 0 1 5
0 0 1 1 0 6
0 0 1 1 1 7
0 1 0 0 0 8
0 1 0 0 1 9
0 1 0 1 0 10
0 1 0 1 1 11
0 1 1 0 0 12
0 1 1 0 1 13
0 1 1 1 0 14
0 1 1 1 1 15
1 0 0 0 0 16
1 0 0 0 1 17
1 0 0 1 0 18
1 0 0 1 1 19
1 0 1 0 0 20
1 0 1 0 1 21
1 0 1 1 0 22
1 0 1 1 1 23
1 1 0 0 0 24
1 1 0 0 1 25
1 1 0 1 0 26
1 1 0 1 1 27
1 1 1 0 0 28
1 1 1 0 1 29
1 1 1 1 0 30
1 1 1 1 1 31
PossiCe FaouPin of3, 3 Vauable
ma PS
O mo M_
O0010
m3l
f-
Thace Varuablo mct P
3 OO
OD
O
Ool |
O0
Mo m m6
M1 S
OOD
loo
oOo o ms
1ol010 ho omM7
Xamples
C O, L
O0O L , I
aauPing OF
OD
f
f
lo
f
Foun Vaiable k-maP
fC,7a,
lo
lol6
looolo Ol1o 11
mo
m m3 ma
m1 m
lo ma m6 MyMio
Oo1 OO10
O0 Oo00 OoO
OO00oloO1 O10
11oo1o1 lo
lo llooo loou loIP |lo o
m
O0bM
""S|m1 m6
M
M M3 m15
m m 1o
m 1p
ommq
Jnaupog of ErghF
00
O
1
fay
O
O1
Ue L -ma P mnhm Ze
CX,,2, mC)334,5,6, 1
3 uiable m a p
lo
93
gf
a
Mmizodon OF Sum Of Prccducts exaaion
maP
Cing
logical fmckon
Mimimize h SoP on a
k-maP as &hawn
3hacwn
Sal Coniden a fban Voia ba
celo
OO
Lo
gag93
a two 9ouP of |'>
ne gaccp of 1
Paoblam pnminimi zahdy
omed on is
93
E inimize k
SoP te gtca fmcho,
PCa, s ) : SnCo,a, 4,5, 10,11,13 15)
SoR 10
oo H 81
O
93
Anorhan altonaive un an
Phoblam
CPo
TMCO,\L ta 15
fCAa
FCA,a,3
Troth tole
da 13
O O
AO1
-Voobla -mafP
134
oo o o o
O
lot
hou oun
8
In comPole SReukal hunctions
Conside o iables ad a
u d hct
3witcheg
woiter locked
Cowtno
"be closed at
oth witches Cahnot
ame hme
Cowinaos a
R , a o ,o1, 1ol
Cwill n e
nevn
wil
miakon 3,,ay: L
The Called d o n ' E Cona
ane
Called don
Comtinahions
Suoh
OCLn esftetthat
hos
junckon
Conduhon&. A
2aid
&a id
Cone Condition CS)
Geett don
ircomploaly secihed
to be
DonF Cone bdi'tons ha tn odadog2
dongn of digit
Condafions eithen o
Vadme hvn ose
On
o1 1
o1
O
o(d
O ol
41 1 ld
O 1 o
co
cO
Cv@n
E C a , 7s,1) : mCo, a, s, , lo, 1
+DCL36, D
inimi z e Jha Funchon C maP
ooD
o
9 3
Peakzako
Co8
No oF ANAD golu
o
No-Of i npty
1
1
Minimize b Pos hn Jait tunchon
FC a,3,4)=TMC3,11,)4HD Co,a,le,1a)
S
Ood d
1D
MO d
9
FC,a,,) C72+D(++3)
o-f
Minimize da Pos n ogic fmchon
Co,\,a,3,,9,10, D
fca,7a, 2 ) : IM
D Ca,13,/415)
O 11 1o
d
d O
d
d Le
l o
Faas4):
DIGITAL ELECTRONICS
UNIT-I
Part-4
ONIT-I
nb amahion
CIRCOITs
CIRCOTTS
ana Hha paic
HARDWAPE.-
hooic
DIGITAL
buidddigital
handane
blam s
bldog
buldog
Aevices
devices
Digi tal
Digi uafchu
t kekas
handuan
handue
OF Dgita
namplae
r aple of mcloil phows ee
eachoric fame
CD PloHO
Camences
eVolukon
of
of dugit
dugital honduane
hancduane
techmelagica
The
oans, mainy m
Oler
oea Ta e
dnastials
Od vamad
olacada tre numoon
Decade y
u deadA
Cne2 be
Cinuik
tha Cn
Cgic
of I n e l Predhcked
Chou m a n
Gen d o Noona,
wmbes ofErs?8tus
Jne
doubla
dloubls ton
placud on a cup
tar Can
allcd Maonals law
a Yeans This
ey (S
Tho doigve Of dgita hondanna u l be dasngning
e imblemanded ou a
JogitCo
thot Cun
R te Cincu
Sngla ChiP 0n daird
p l o a d On
c ChiPs
a h u mba
ho inoive
boand CPCB
Pinted ciacut
h o d u n a t, hthsae
Maun
hoduna oae
igita
tmpbanmg
Fon
OF ChiPs
>ramdand CiP
ChiP Orbins a
Chips A
Standand
Cinvoluma ka
OF Cicuinp loo has1St
amant
mall
Sshsl(mchon
Thoe diPs aluayn
a
ad Pen fumm Cohth is x d
a
shondnd ferclvn
Pnodu
tgulauns3 toneny, OP-AMPS ec
Bagnammabe hgic Devic
thou Can e
to Conshcc Chips
T fib
a Caicu
o Imblemant
CN
Conhgched
Thase ciPs hane
CiACiS
ne OF ogic
Cluda
in C uda a Collkcham
Cole
and
a in
Ztnuctua
agenea
ta
swithes t a allaas
P o g a a h m a b l a
be Cokigoucl
enna CACwtaH aJne CiP
diffeund uaya
Ma deVic
a o g n a h m a b l a
ugic
Cale ide sange OF
a l a i l a b l a
D ana
naaliza much
Tha a n wed
standand Chip
SoPisicotd
PLD
PLD iAS
amd
opulan hgna mable
FPop-a field
Ghale AMAY,
COSTOM CHIPS
tErd Sncd ta
doaw
hach
PLDS have a
VV e e r
lblu
luaa
bbul
COnnma
witchu
ORMoov Of
OPIaioy
&eed of
ne
Jmit
and d
Chip anea
tA [mplamewed Cin
d odio
g ig
n na
a
Pilda
billa
J s t ad
gihaloy
th d must
must
2oma
In cihny
Tha lagre
fieh ad
n e t avd
2cntdh
chiP no c
CMiP
P
d u i g h e d
d a i g h e d
Jha chosen
On Chosen
i
aay
hcudad
be techn
a P P N o P a
than oan
This
a aPPlkahia
Onc an
anso
Can Le OPhnised
&pecihc sk.
on
(
DEVELoPN ENT PRoCESS
Roaned Aaluci
Dehne Seähahns
T n i h a DONGm
Paseign
Simulahon
poagn
Connec
Y
Make,
Conechosl
Fhototype iplenoct|
aTOv_ y
Mingn
NO
Joshg
Maets SAeäkal No
Pridud Pedict)
hocess
pengn De veloPhe
Fig-
(
Slep ih e devdlcPerd Pctes
a Fno
tra gven
given Peciicahons Caate an
hot.
IF e
Conhect
Cohethe t dasen B
el ae
else Recleyh
Reolejsh
SBeP 4
iu Conmect go to
doign
nd go o
2teP 3
a
PDdut Cnd
Photohyre of
a
4-aoat
Fentonm teeh7.
imPehantehonpos oro
ipohanedoa
tka frclotyPe
Poloype
5 f After teshrg,it enon8 Omc
heck fp minon
goheck fon
9Pufiaions,
meets Phototyre
Pno totyre
to SBeP
go to
So
4.
Step 4
E then
hen
ConaeChons
SBep 6.
make
9o to
mRlementaion PeThahos
au go
da4grad and it
The2 Pnoduc is 2ucesfly
do Paduchon
(6
DIGITAL HADWARE
DESTON
OF
Design Coxept
n i w doisn
Siulal
Pedesgn
De9n NO
COAnadt
y
S u c c e f
Dengn -ooP
F 12 Basc
SlPs
iwha CnCapt akout cohot
hawe Cn
hone
Aung
he
deign o s
achieed in
Bhowld be
aqinas a bF
9tep
hs
pen9h specatz
fein
h i ho Moal dargns houa
dler9ms
hona2
mast Knaslads
ye
t ec
caau
u
et dLMSher
'g
moh
m uad
oh u Hnouuh
nnchad
a
t h o ean
ay
Skil and (nthon
deignbna beimy
e tekd
Phduch thor Can
hral
Jevty
Veity ras
nas
nies
nies to
Tmuabo
Tha NAJned
O
Pen fonw
3 o
Phadud
e i g nedd LPeciholion
Pwduct
Unden t O
o a
a gi
g in
naa
muutnm
non8
m
muas
sFt
a Chomged
Chomad
dasigu
S w v e e m
Pbloms
oenco
a i n 8malated
Veaicn ss
VeaÑCM
o d o G n a d
woy haue c
d iis
s a
a p
p P
peea
anui
c d
d
The
deBenmne whethen
the muulohay
te
Cnil
C A n h l
ofeabd
is
Joop
This
S. uccef doign
indicate
DESTON OF A DIOI1AL HA2DWARE ONLT
COmbla
dengnad
ChaP
3am
RB a onge Pcnt Of omRd
Suppant mauti PAcako)
duGnad
te
TH Can
many V
C
COOn
ntaau
nns
whth
Euinon naes
oy a Prhakey
to ao
Cd
togethe
tlat Can e
Cntauns Chio
Phocuon Chip
PCB mo COmpley
&ubhant Chips
Vonnous momoY Om
e
heea
cde
ec d
ck
On
Cincui
Aogte
amd
he PaCCesn
Prdn ce
rehween aecdeod
to
The &teps
hmelms
duhad a u a s
fulo
On a
Ce
Dnblaanlod
Can 2
Jna
Dexg ContePt
Pon hi tiovn
peign
Deign One
Ona blocn
bloc
Cornac
YO
Physica MaPP®Ey
Tin Simulalon
NO
Connec
mevenkm
As t
Dealmg with Complesiby nvoluecd
2alle blchs
into
P u t h onm
tre CioCd
buch gePaalely.
Qac
Omd tron
.mona
ungan tash
BAaay down
LnOh a tha
manageable Bmale
OF
Dergn
Degh
a P aPPaoadh.
P a o a h .
a n d - C o n u e
cceftlly
musf
Af
Af he
blockg
etwan
a
i n e n c o h h e c l i o n s
Comihy s e
omihs
effecheh
wkch
lch Ou le
Pkabmad
AS
mulahaM
3Funcdion
Canet
Comblet C
desai ptlon
o u
imulale th
clod
A Cincit AaPreentbd
nas-
COect
ib pg rca C a n Uee
enpaanias
pgrcal
Ch fom of aeraded
Jthct
l fumckon
&nlatach
do
etd
DeReneu on Qmo ralninlans OCCona
e poetfu p a l , ' e
in nccmhshm
eraons
deign of
bloths
bloths-
enons
aderghad
Omd h
P a n ih o n -
Zimulaha ara n a y
Cno
Succosfu umckomad
LAC Cnwt
a a l iz e h i s
Qah
Jocoha c
ancd e
The Phya+a
datenna
Conhachay
m hachas
ocond t mahe
maha
aoded
Fatlem
Ci be dahined
chips
wwchana mdaha, Cond
Of
Caig
rPhgicas
Juat Prunt
(nuowes malad raas
eJedical
99nas am han
Omd C a r a c a n c a o
OPCalm.
2peed d
pact ro
6 Mladom 12 pe/oxmad o Conside hmug
bewio
tng 3mulahon
Coden hming bahavion,
6-Jo
oyoa Flenha nfonmano
Cohich
Ce
Can e2 Cmaced
Cohic
Pcplo
mahe Chonga Cn Ju Phca
to u
o CAp
doxgn c PB
Ccuat
aften uccek
Phyi c a impbnendon
mulathion
(13
ONIT
STONED NOMBEPS
bbo
biF bhap
MSB numbe
Maghitude
Fo Onghed humbe
reghtdo
S9n Mognitude
O-deolesf
- denole FG Signed humbe
Fon a Sighed mb
) sComplamet
) Sgh- and Maghituda
as Complen@rd
MSB ndicau
og'ou
bits oPe2nt
MSB- Mumbe
humbe 4
+Ve MSB-I
MSB-O nCmbes is
-Ve
S M M
Olol
- S 1 1ol
M
-la 11o
M
3 Compleovt epewhioy
AS nePno3ented
A Leeping MSB Gt t
MOSnituco OnCe -
SM
1 Combherm
oo Cvnblaho an
b O- magwuda
n a Combleroned
ePne ndedi?
M
I'3 Connplemavd
Combla -(4
O Oo01 8
a's Comblaen epne wdavay
ePaaswtohiag hegahe
Tn
opoLnded
hambe brny
LeePis
MSB Peenhwhg
hnajtucda
majuuda
biy
bily anol
h
On
Coblemon
1'8
LSS
addy
Complement
S SSM )oo
3
+
lo
nesoine
numbe
dno as Comble mud
Comblena
To Conves a bihany
bihany
Cmd ObeNe Uha meghifde
magutude
Jeae t e moshi rucda
9ugh+ t l e f
Pekuh tHhe b i
bets om
o m o t b i ha,
'appecms
anh Hhe finst (
ComPlome ainiy bi
um a s COmpleeud
EX -1
M
S T1
-\5
Tho nayF
bik n
Complamaned
Comblarmat
a s Comblead
- I-s
s
1Oo ol
o o
E Add + s + ) U g Sen and
Mashdo nepres2h
+5 O
addu ham
'Comblament
Ex+5+ C-a)
9eord OPamd
Exomble2 tha
blanmerd
im
n
SPnaMued
s
t P g O P r a n d
S
o1
)
S&M Oolo 2
Coooy
o o 3
M
n 1' Combleme addihm mcd &ubhacha,
hhd
7 SM
S
O O O O
C M
5C+a
SM O
majnihude
o=-3
S M
a Complemant
oddiho Omd Subtdim
+5 + G
SSM D
a
- a SM dolo
S M
Cowblemen
a d d han amd
Subnachan Cooy
be dis Caclad
Cuil
MSB
9 C-3
E
Combleme
SM
3 SM ool 3o
SM
DT&cono
6
Pen fvnm
Combloment
M 2'& Compl
S&M
-|
S&M
ua
Tha Comblanont a eedahan
Mas nida oF
OF a hegalive s u t l i
Ponunm - a + G8) a
wmg as
COmblame
-}a- 04
asut CU be
eXample Te
o 0 Pnayt
ao Hence
magtucla u h mu
5 bits
PaOUwunod
(
SM
M
SM
SM TO100 Ioloo
-a
M
S9 OloO0
)Io oo
o 11 o n
Tho nosuk
a Camble meut
a& Comblk
M
M
Half-adder:
Half adder is a logic circuit which adds two 1-bit numbers x and y and produce
two outputs sum s and carry c. The following diagrams in Fig.1 gives the truth
table , symbol and logic circuit of the half adder.
From the truth table it is observed that the logical expression for the two outputs
is as follows.
s=ab
c=ab
Full adder:
While adding two multi bit numbers the carry at a particular bit position i will
be moving to the next bit position i+1. The carry at the MSB is treated as carry
out. Hence a full adder is a logic circuit which adds three one bit numbers xi, yi
and ci and produce the outputs sum si and ci+1. The implementation details of
full adder is given in the following Fig.2.
From the truth table the logical expression for the outputs si and ci+1 are written
as
si =xiyici
ci+1=xiyi+yici+ciyi
Multiplexer (data-selector) :
2: 1 MUX:
For a 2:1 MUX the two inputs are denoted as w0,w1 and output is denoted as f.
s is the single selection input. Figure 3 gives the implementation details of 2:1
MUX.
From the truth table the sum of products logical expression for the 2:1 MUX is
given by f=s'w0+sw1 and the corresponding logic circuit is shown in (c).
4:1 MUX:
A 4:1 MUX (22: 1 MUX) consists of four inputs w0,w1,w2,w3 two selection
inputs s0,s1 and an output f. Figure 4 gives the implementation details of 2:1
MUX.
16:1 MUX:
s3 s2 s1 s0 Input
0 0 0 0 wo
0 0 0 1 w1
0 0 1 0 w2
0 0 1 1 w3
0 1 0 0 w4
0 1 0 1 w5
0 1 1 0 w6
0 1 1 1 w7
1 0 0 0 w8
1 0 0 1 w9
1 0 1 0 w10
1 0 1 1 w11
1 1 0 0 w12
1 1 0 1 w13
1 1 1 0 w14
1 1 1 1 w15
Demultiplexer:
Fig.8 Demultiplexer
Decoder :
Decoder is a combinational circuit that is used to decode the encoded
information. A decoder will have n inputs and 2n outputs. For each input
combination 1 of the 2n is asserted. There are two types of decoders.
1. active high 2. active low
In a active high decoder the output is asserted to '1'. In an active low decoder
the output is asserted to '0'. By default a decoder is active high.
Each decoder will have an input En for enabling or disabling the decoding.
The following figure 9 gives the structure of a n to 2n decoder.
Fig.9 : n to 2n decoder
2-to- 4 decoder:
For a 2 to 4 decoder the two inputs are w0,w1 and four outputs y0,y1,y2.y3 and a
single En bit.
Truth tables:
En w1 w0 y0 y1 y2 y3
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
0 x x 0 0 0 0
En w1 w0 y0 y1 y2 y3
1 0 0 0 1 1 1
1 0 1 1 0 1 1
1 1 0 1 1 0 1
1 1 1 1 1 1 0
0 x x 0 0 0 0
From the truth table of an active high decoder the logical expressions for the
four outputs y0,y1,y2.y3 are as follows.
y0 = w1'w0'
y1= w1'wo
y2=w1w0'
y3=w1w0
3 to 8 decoder:
A 3 to 8 decoder will have 3 inputs w0,w1,w2 and 8 outputs from y0 to y7.The truth table of a
3 to 8 decoder is given below. Figure 11 gives the block diagram of 3-to-8 decoder.
w0 y0
y1
w1
3-to-8 y2
decoder
y3
w2
y4
y5
En y5
y6
y7
Fig 11: 3-to-8 decoder
En w2 w1 w0 y0 y1 y2 y3 y4 y5 y6 y7
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 0 0 0 1 0 0 0 0 0
1 0 1 1 0 0 0 1 0 0 0 0
1 1 0 0 0 0 0 0 1 0 0 0
1 1 0 1 0 0 0 0 0 1 0 0
1 1 1 0 0 0 0 0 0 0 1 0
1 1 1 1 0 0 0 0 0 0 0 1
0 x x x 0 0 0 0 0 0 0 0
Enable inputs for upper and lower decoders are w2' En and w2 En respectively.
This type of decoder is having four inputs w0, w1,w2,w3 and 16 inputs y0 to y15
with an Enable input En.
Truth Table
1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
1 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
1 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 x x x x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
It consists of five 2-to-4 decoders --- 1 decoder at the first level and 4 decoders
at the second level. For the first level decoder the inputs are w3,w2 and En
inputs. The four outputs of this decoder act as enable inputs for the four
decoders at the second level. All the four decoders at the second level will have
the common inputs w1,w0
Fig 12: 4-to-16 decoder using 2-to-4 decoder
Encoder:
while deriving the logical expressions for the encoder the values of the outputs
for the remaining 12 rows are considered as don't care.
Priority Encoder :
The encoder outputs indicate the active input that has the highest
priority.
A BCD to 7- segment display accepts BCD inputs w0, w1.w2 , w3 and produce
outputs on seven segments a,b,c,d,e,f,g. All the segments are light emitting
diodes. When any segment is activated it will have a value of 1 and 0 if
deactivated. The details of the BCD to 7-segment display is shown in Figure 14.
a=∑m(0,2,3,5,6,7,8,9)+ D(10,11,12,13,14,15)
b= ∑m(0,1,2,3,4,7,8,9)+ D(10,11,12,13,14,15)
c=∑m(0,1,3,4,5,6,7,8,9)+ D(10,11,12,13,14,15)
d=∑m(0,2,3,5,6,8,9)+ D(10,11,12,13,14,15)
e=∑m(0,2,6,8)+ D(10,11,12,13,14,15)
f=∑m(0,5,6,8,9)+ D(10,11,12,13,14,15)
g=∑m(2,3,4,5,6,8.9)+ D(10,11,12,13,14,15)
UNIT-3
The logic gates such as AND, OR , NAND , NOR gates etc always produce fixed
functionality. In order to design logic circuits with variable functionality Programmable logic
Devices (PLDs) are used. PLDs contains a collection of logic circuit elements that can be
customized in different ways. A PLD can be viewed as a “black box” that contains logic
gates and programmable switches, as illustrated in Fig.1. The programmable switches allow
the logic gates inside the PLD to be connected together to implement whatever logic circuit is
needed.
There are several types of PLDs out of which the popularly used are
1.Programmable Logic Array (PLA)
2. Programmable Array Logic (PAL)
Programmable Logic Array (PLA) : The general structure of a PLA is shown in Fig.2.
In PLA both AND plane and OR plane or programmable. Historically, the programmable
switches presented two difficulties for manufacturers of these devices: they were hard to
fabricate correctly, and they reduced the speed-performance of circuits implemented in the
PLAs. These drawbacks led to the development of a similar device in which the AND plane
is programmable, but the OR plane is fixed. Such a chip is known as a programmable array
logic (PAL) device. Because they are simpler to manufacture, and thus less expensive than
PLAs, and offer better performance, PALs have become popular in practical applications.
An example of PAL implementing the logic functions f1=x1x2x3'+x1'x2x3 and
f2 = x1'x2'+x1x2x3 is shown in Fig.4
In this example there are four product terms P1= x1x2x3' , P2= x1'x2x3, P3=x1'x2', P4= x1x2x3
Hence the logic functions implemented are f1=P1+P2 and f2= P3+P4
- Go o
(to Gsoy da G: G-Gh-a Gn-3
Cny B- Bbn-a
h-Bn-l,
B Bo
G-3 Bn-29 Bn-3
Goay cada
EX Coned B: O1
B3 1B2B, Bo
ive
Go
G a Ca G
oI: I
B: o
B3O, Ga BD82
3
Gn: o I oo
Cn
ImPamex a 3bit birany humbe Bwsng
PLA
a PAL and
numbon B:BaB %s
Guven B is 3-bit ior
Gio
Go OR Pana
Fon e 3-ad rt Ga Gy
3-oPgt
uino
CaaP
GPa+
GaR+
Bioy to Groay Coca hg PÅA
D D Pu
T
Biry to Cooy Coda PAL
Do
Pa
D Gno
D
1pbant r follawn Jogic funckons Cing
PAL
m Co,3,578, 10, 13,3
Sca,:
fa Cu1y,D: £ m C o , a , 6 , , 1 4 /
fCu,D:
SmCo,La4,5, 8 1)
oo
Z+WXz+ wxy
Cu D:
Y 11
oo
fCw,xy2):nzz+WYZ+wxy+wxy
y
J gien
given
expranio g
Jagial
S
Hena
obem an
: P +Pa +P3
W x z + w x
Y
XZ+
,CxyzD:
PswxY
P Wx z
Xz
Cohea P:
wxy
z+ wxy4
wy
f2CwxyD:
Wxz
+Pq
Py P +P
wx y
Pe:
y z,
Pu: wxz
Ps w
Choa
P w y
Ps4+Pra
z+Wy+XY
=
Cw,y):
f
ChOna
P , g :wY P :
C AND 9ale
0uines
ÁND plane
3 OR
Plave
Ihmponaoo Cw PA
-Da
DA
-D
-D
-fa
BCD to XS-3 ConVezion
3 to a
be obbed y adelivg BCD umben
Coith biBs X3 2 X Xo
a x S 3 numbenb
B B2 B Bo X3 Y2 X o
Xo
B O D
1
O 1 O
5
6
O 1 O
O O O
x, á Xo
3a,
Cs,6,73 + DCIO1112,13,14, 1
X
SmC,a,3,4,D+D Cto, ILI2,1314, 1s)
a-
XSCo,3,4,,
+ D CoIL, 13,1Is
13,14 1S)
oEmC,a,4,6
+ DCl9,1Lla,
BaBa
B 3 2 R
10
O
d
d
B.3, Bo
a Ba Bo +Ba Bt
sB3tBBo+Ba B
Ol 10
Go d
o d ol d
d
o
e to
Henca lcgi cal exaeians fun BCP
ane as
a s follas
Conuesion
XS-3
PBoP .Xo P
Xo: Bo Chea
B, B
Pa B Bo, Pa
:
XIB,BotB, Bo Cohae
X PatB
o
Cohaa BBo P4
B,+Ba B1
XaBaBo + Ba
B By B P
Ba B, Ps
Pa+Ps +
P- Ba
Bo+Ba3
whoe
whoaL
B3+ B2
*XaX3=
Pa BaB
Pa B Bo
xg Pt Ps+
Pncduct tems P to
D tis thoa ae
ga Omd
0Juines -AnD
AND Plane
han
a fotn OtPais Yoto
i n tho c-Plone
Bcp to xS3
mPlemantha of
PLA
B B3
D
Subjeci: DIGITAL ELECTRONICs
by th no.
fonc ons toe hav.
OR Plane
D
D
DA
AND lane
PLA tor XOR 2
lmplementing XNOR 2 Using PAL
Gnd fa
a
D
AND P Gne
O O
O
O
S, , ,c
,9,e; 7,,,+ 19,C 7,9, +
Co
PLA:
Implemesting
C
P2
Ps
Pa
Co
IMPLEMENT HALF ADDER USIN6 PAL
Troth table fov Ha1f AddeY
O O
S ®y
C 1
Assigning the product terms
P, P,9 P
Implem enting3 using PAL
-S
P
C
Complex Programmable Logic Device (CPLD):
PLAs and PALs are useful for implementing a wide variety of small digital circuits. They are
useful designing chips which are supporting a combined number of inputs plus outputs of not
more than 32. For implementation of circuits that require more inputs and outputs, either
multiple PLAs or PALs can be employed or else a more sophisticated type of chip, called a
complex programmable logic device (CPLD), can be used.
A CPLD comprises multiple circuit blocks on a single chip, with internal wiring resources
to connect the circuit blocks. Each circuit block is similar to a PLA or a PAL; we will refer to
the circuit blocks as PAL-like blocks. An example of a CPLD is given in Fig.5.
It includes four PAL-like blocks that are connected to a set of interconnection wires.
Each PAL-like block is also connected to a sub circuit labeled I/O block, which is attached
to a number of the chip’s input and output pins. CPLDs are used for the implementation of
many types of digital circuits.
A large CPLD that has 1000 macrocells can implement circuits of up to about 20,000
equivalent gates. To implement larger circuits, it is convenient to use a different type of chip
that has a larger logic capacity. A field-programmable gate array (FPGA) is a programmable
logic device that supports implementation of relatively large logic circuits. FPGAs are quite
different from SPLDs and CPLDs because FPGAs do not contain AND or OR planes.
Instead, FPGAs provide logic blocks for implementation of the required functions. The
general structure of an FPGA is illustrated in Fig.6. It contains three main types of resources:
logic blocks, I/O blocks for connecting to the pins of the package, and interconnection wires
and switches. The logic blocks are arranged in a two-dimensional array, and the
interconnection wires are organized as horizontal and vertical routing channels between rows
and columns of logic blocks. The routing channels contain wires and programmable switches
that allow the logic blocks to be interconnected in many ways.
FPGAs can be used to implement logic circuits of more than a few hundred thousand
equivalent gates in size. Each logic block in an FPGA typically has a small number of inputs
and outputs. The most commonly used logic block is a lookup table (LUT), which contains
storage cells that are used to implement a small logic function. Each cell is capable of
holding a single logic value, either 0 or 1. The stored value is produced as the output of the
storage cell. LUTs of various sizes may be created, where the size is defined by the number
of inputs. Fig.7 shows the structure of a small LUT. It has two inputs, x1 and x2, and one
output, f .
Consider the implementation of 3 input XOR gate using a 3 input LUT. The truth table is
shown in Fig.10
x1 x2 x3 f
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
3-in LUT
My
NO
LUT
1ogic funchon Cuy 3-ibt
F-11
Unit-4
Sequential Circuits:
In combinational logic circuits the output at any pint of time dependent upon the present
inputs. In sequential circuits the output is dependent not only on the present inputs and also
on the past behavior of the circuit. To store the past storage elements are required. The
contents of the storage elements are said to represent the state of the circuit. Hence in
sequential circuits the output is dependent not only on the inputs applied but also on the state
of the circuit.The storage elements are referred to as memory elements. There are two types
of memory elements. 1. Latches 2. Flip-flops.
Basic Latch:
The basic SR (Set- Reset) latch using NOR gates is shown Fig. 1(a) and its truth table in
Fig.1(b). The outputs Qa and Qb of the NOR gates represents the state of the latch. Both are
complementary to each other.
S=0, R=0 will keep the latch to remain in the same state
S=0 , R=1 will give Qa = 0 , Qb =1 represent the Reset state.
The timing diagram of SR latch is shown in Fig.2. A timing diagram represent the state
changes i.e Qa & Qb of the latch with respect to changes in the values of inputs S and R at
different time instants. The timing diagram in Fig.2 can be interpreted as follows.
The initial state of latch are shown as Qa=0 and Qb=1 till time t2
At t2, for S=1. R=0 the states change to set state with Qa=1 and Qb=0
At t3, for S=0 , R=0, no change in the present state. Hence Qa=1 and Qb=0
At t4, for S=0, R=1, the states change to reset state with Qa=0 and Qb=1
At t5, for S=1, R=1, the undesired state is obtained with Qa=0 and Qb=0
The causality relationship is indicated by the arrows in the timing diagram. As
observed at t2 S=1, causes Qb to change to 0 which in turn causes Qa to change to
1.At t4 R=1 causes Qa to change to 0 which in turn changes Qb to change to 1. At t5
S=1 causes Qb to change to 0 and so on.
Like this we can observe state changes for the remaining time instants
Fig.2: Timing Diagram of SR latch
Fig.3 shows two NAND gates 1 and 2 connected in a cross-coupled manner acting as SR
latch.
Truth Table:
S R Q Q'
0 0 1 1
0 1 1 0 ( Set state)
1 0 0 1 (Reset state)
1 1 No change
The interpretation of truth table is as follows. For a NAND gate if one of the inputs is 0 then
the output is 1. Q and Q' denote the true and complementary state of the latch. H
There fore for S=0, R=0 Q=1,Q'=1 which is an undesired state
For S=0, R=1 Q=1, Q'=0 Set State
For S=1,R=0 Q=0, Q'=1 Reset state
For S=1, R=1 ------ > Assume present state Q=0, Q'=1 then the output of gate 1 Q=0 and
output of gate 2 Q'=1. Hence there is no change in the present state. Similar analysis can be
done for present state Q=1, Q'=0. For this also S=R=1 represent the no change state.
In order to control the state change of a SR latch a control signal is applied as input Such type
of a latch with a control input signal is called Gated SR latch which is shown in Fig.4.
As shown in Fig.4(a) the SR latch is enabled when clk=1. For clk=0 , the circuit is disabled.
The truth table is shown in Fig.4(b). The timing diagram is shown in Fig.5. For a latch or flip-
flop the present state is denoted as Q(t). The state transition or next state is denoted as Q(t+1).
The timing diagram is shown in Fig.5.
The timing diagram can be interpreted as follows.
Initially Q=0, Q'=1
For the first instance of Clk=1, S=1,R=0 the state changed to Q=1,Q'=0
For the second instance of Clk=1, S=0, R=1 the state changed to Q=0, Q'=1
For the third instance of Clk=1, S=0, R=0, the state is not changed
Like that state changes can be examined for Clk=1 and different values of S and R
The operation of the circuit shown in Fig.7 is described by the truth table in Fig.4(b). As this
design using NAND gated requires fewer transistors this is more preferred when compared to
the structure in Fig.4(a).
Gated D Latch:
In applications such serial addition of two numbers the carries generated from LSB to MSB
are to stored for some time while performing addition at each bit position. Hence it is
advisable to a single input latch to store the carry value instead of two values S and R. The
complete structure of a Gated D Latch is shown Fig.8. Fig.8(a) represents the logic diagram,
Fig.8(b) represents the truth table, Fig.8(c) represents the graphical symbol and Fig.8(d)
represents the timing diagram.
As shown in Fig.8(a) , D latch is a modified version of SR latch with NAND gates. It consists
of single data input, called D, and it stores the value on this input, under the control of a clock
signal, It is called gated D latch. Here S=D and R=D'. Let the outputs of the first two NAND
gates will be S' and R'.
For Clk=0, D=x, the D latch will remain in the present state Q(t) since S'=1, R'=1
For Clk=1, D=0, the latch will be reset with Q(t+1)=0, since S'=1, R'=0
For Clk=1, D=1, the latch will be set with Q(t+1)=1, since S'=0,R'=1
Same observation can be made from the timing diagram in Fig.8(d)
Fig.8 Gated D Latch
0 x x x 1 1 Q(t)
1 0 0 1 1 0 0
1 1 1 0 0 1 1
Master-Slave D Flip-flop:
Fig.10: D Flip-flop with Clear and Preset for positive and negative edge triggering
As observed from the graphical symbols of D-FF from Fig.10(a) & 10(b), the two control
active low inputs Preset and Clear are used to set and reset the states of the flip-flop before
applying inputs. If Clear=0 , in both the cases the state Q=0 . If Preset=0, in both the cases
Q=1.
For a D FF , Q(t+1) =D at the edge of the clock
T Flip-flop:
T D=T'Q+TQ' Q(t+1)
0 Q(t) Q(t)
1 Q'(t) Q'(t)
JK Flip-flop:
Fig.13: JK Flip-flop
Figure 13 shows the details of the JK Flip-flop. In Fig.13(a) the logic diagram is shown,
which is a modified version of D Flip-flop. Here also There is a feedback from the true state
Q and complementary state Q' to the input. In JK FF D=JQ'+K'Q. The truth table and the
graphical symbol are given in Fig.13(a) & 13(b) respectively. The detailed truth table is given
in Fig.14.
J K D=JQ'+K'Q Q(t+1)
0 0 Q(t) Q(t)
0 1 0 0
1 0 1 1
1 1 Q'(t) Q'(t)
Excitation Tables:
Excitation tables are the inputs required for the various flip-flops to make a transition from
present state to next state i.e from Q(t) to Q(t+1).
Q(t) Q(t+1) J K J K
0 0 0 0 0 x
0 1
0 1 1 0 1 x
1 1
1 0 0 1 x 1
1 1
1 1 0 0 x 0
1 0
Q(t) Q(t+1) D
0 0 0
0 1 1
1 0 0
1 1 1
Q(t) Q(t+1) T
0 0 0
0 1 1
1 0 1
1 1 0
Applications of Flip-flops:
Counters:
Counter circuits are used in digital systems for many purposes. They may count the number
of occurrences of certain events, generate timing intervals for control of various tasks in a
system, keep track of time elapsed between specific events, and so on.
There are two types of counters
1. Asynchronous counters
2.Synchronous counters
Asynchronous counters : In asynchronous counters all the flip-flops are not triggered by the
same clock. The first flip-flop is triggered directly by the clock and the subsequent flip-flops
are triggered either by the true or complementary states of the previous flip-flops. These are
also called as ripple counters.
Synchronous counters: In synchronous counters all the flip-flops are triggered by the same
clock.
Asynchronous 3-bit up counter:
The up and down count sequence of the states of FFS for one iteration is given in the
following table.
Q2 Q1 Qo Q2 Q1 Qo
0 0 0 1 1 1
0 0 1 1 1 0
0 1 0 1 0 1
0 1 1 1 0 0
1 0 0 0 1 1
1 0 1 0 1 0
1 1 0 0 0 1
1 1 1 0 0 0
As shown in Fig.15 (a) the asynchronous 3-bit up counter is realized by three T FFs with
states Q0, Q1, Q2. The first FF is triggered directly by the positive edge of the clock, second
FF by Q0' and the third by Q1'. The timing diagram is shown in Fig.15(b).
Tauth toble
clock
Pulse
O
G Choug
clo a
Changes
Cole Qo fals
5 Cheg edge o
Chage
O
1 Coka , als
ho to O
Cheg dge cf
3-bit COunte
Asyncha onou3
g g e a d dnedJyp t f Sa
nst FF
the
The
S
oF cloC Second FF
Poh Ve edge
gols cf Hrst FE
CComplamatap
Go
twggaod
t99ad
hind
and SecondFE)
CcomplamevdonY >ada OF
Joinad o g e t h o n
AU t ha inpods
o Com plamao
o P h a e
tnudue s Shown
The
FFS
Btotes of Hha
olowing figune
CL o
diogna
A ob20nnd fo
, Qo OoO
Qo
Seyuane
togglas
otoygl
COu
tuth abb OF
o
Posi h l e
Adg2 of cl
fpn evo Chomga
Chavges i s 3bla Cokan
gahe
ede Of
i.e
hom to Change3 om
CDhan
ifs state
Chauges
edge of
hegohiee
toO -e
CL
O
AStnchhonda3 3-bit dawn Couto
ck
Puule
fon
Q Choge3
ewy cleiu Pulso
O Changes Cwken
O
Changes o O fo
+Ve edge cA,)
To o L Ta
r CLk
FF tg9red dhedy y
iaat
Far9gne 9ne ned y
Cecond FF
Cue 8tate oF
Anst FF
o
8hle ch
Tind FF tiggerad oy a , Chue
Secod F#)
Diana of 3-bit down Counte
FF
9hadta of a
CLk
3
O
O
T O of
O o
Synchronous 3-bit up counter:
It consists of three T flip-flops with states Q 0, Q 1, Q 2 respectively. The count sequence for one
iteration is as follows
T0 =1
T1= Q0
T2=Q0 Q1
Tn = Q0 Q1 Q2 ............... Qn-1
It consists of three T flip-flops with states Q 0, Q 1, Q 2 respectively. The count sequence for one
iteration is as follows
Clock Pulse Q2 Q1 Q0
1 1 1 1
2 1 1 0
3 1 0 1
4 1 0 0
5 0 1 1
6 0 1 0
7 0 0 1
8 0 0 0
As observed from the above table Q0 changes for every clock pulse. Q1 changes when Q0 =0 and Q2
changes when Q1=0.
The T inputs of the three FFs will be T0=1 , T1=Q0' , T2 = Q0' Q1'
The details of a synchronous 4-bit up-counter are shown in the following Fig.1(a) and 1(b) with the
timing diagram. As observed from the figure it consists of four T-FFs with states Q0,Q1, Q2,Q3. All the
FFs are triggered by the same clock. The T inputs of the four FFs will be
T0=1, T1=Q0 , T2 = Q0 Q1 , T3 = Q0 Q1 Q2.
The counting sequence will be from 0000 to 1111. From the timing diagram it can be observed that Q 0
changes on every positive edge of clock, Q1 changes on the negative edge of Q0 , Q2 changes on the
negative edge of Q1. Q3 changes on the negative edge of Q2. The initial state of all FFs is 0000.
Changes on ey
Clock Go clocu Pue
Puuge
O O
2
change3 oha Oo-
3 O
O 62 Change Cohe h
5
6 O 1
1 O
- o Go
CL
3-bit Counte
asmda onOu
chaugs askan = o
6
1
Syncaonouy 3-bi down Counte Cobtnuded
CLk
a Counte
Madulud OF
ia .e MOD 1 6 Counten
MoD- 6 CauatanADYncondubCaippla) Counte
Counton Counta Ja t o
A MOD 6
tyPo oCountam
To desigh ae
aFplied tto the
applied th
0synchoohaus
inPul CLEA
uS2
Ccunt
3auOnO2 hon
MoD-6 Caueke
Fon
o
MOi to a d
tobe
inPuts s ton
gate Tf both the
o NANDA
To Snce ACh\ela
S c e AChe Jas
NAND2 ta is o.
of Je
tha olP Cd ana
nhacedd
the satts o
i ed
Cleon
of
cohay both o=G2=-1,oP
gat.
to NAND2
Comated
Comaded
oP
Jk olp
i s * o ' ano
NAND2 gat
CLEAR i|Ps of all F
to acke Jow
LTo L
C CLEA
CLEA CLEAL
0sgncaoous Counte n
MOD-o CDecade)
a s auows
o sta
O
To eaute a MOD-1 Coudo C 900june
FIS Coith 8 t e s o , 0 , , Od 0
olp of t
NAND gate. Tha
nRis td a
CLEAL tJP
CLEAL
PE
P of PL
sConheckd to
VAND
gate
gate
ne olP of AND t
Cohen Coun Wache8
CLEAL
C LEL inet
inrr
ache o o
o, thee ty
neset
Neet te
Cui
s2ha bled and
Oo o
alu PES
L La
CLEANL
CLEAL
CLEA
etEAn
The structure of different shift registers is shown in Fig.2, Fig.3 & Fig.4
Fig.5(a) shows a four-bit shift register that is used to shift its contents one bit position
to the right. The data bits are loaded into the shift register in a serial fashion using
the In input. The contents of each flip-flop are transferred to the next flip-flop at each
positive edge of the clock. An illustration of the transfer is given in Fig.5 (b), which
shows what happens when the signal values at In during eight consecutive clock cycles are
1, 0, 1, 1, 1, 0, 0, and 0, assuming that the initial state of all flip-flops is 0.
Fig.5 : a 4-bit shift right register and a shift sequence
Let the initial state of all the D FFs Q1, Q2, Q3, Q4 will be 0000. As observed from the shift
sequence in Fig.5(b), for an input sequence In = 10111000 1-bit will be serially shifted right
on every clock pulse. For every clock pulse Q1 = In, Q2 =Q1, Q3= Q2 and Q4 = Q3 and
out= Q4.
flp- flor
To,T,Ta
and T3 a
eune Fup-flops. Lel
nd Go amd Q
ilPs oE FES
e8Pechely.
Pene an exa laka tohle
Of each FE
neyt tota us)
Phesens
sBatz PS,
teween ha
inPuas CTo
(To to T)
Ta)
ad seuined
Exciia
."Ps NS
, Jo
O
o
O
O
O
O
O
O
1
O
O O
1 O O
O
O
1
O
O
OI
O
OO
F90m
eycitohon table tho gic
given
SmC,3,5, 1,9,11,13,1
a:EC3,1,1)
To-
0 0O 1 1 lo
T D do
Ta , So
L
o o G 63
eLK
hous
uP Coun ten
Coun
Sequential circuits are also called finite state machines (FSMs). The name derives from the
fact that the functional behavior of these circuits can be represented using a finite number of
states. The general form of a sequential circuit is shown in Fig.1.
From the structure shown in Fig.1, the input is W ,output is Z and the state is Q. Two types
of FSM are defined, Mealy FSM and Moore FSM. In Mealy FSM the output Z is dependent
on both the primary inputs and the state. In Moore FSM output is dependent on the state of
the circuit.
Suppose that we wish to design a circuit that meets the following specification:
The sequence of the input and output signals for the given specifications is given in the
following Fig.2
State Diagram; The pictorial representation of the FSM can be represented in the form
of a state diagram, which is a graph that depicts states of the circuit as nodes (circles)
and transitions between states as directed arcs.
Mealy FSM State Diagram:
State Table:
The tabular representation of the state diagram is called state table. The table indicates all
transitions from each present state to the next state for different values of the input signal.
The state table and state assigned table of the Mealy FSM shown in the state diagram of Fig.3
is shown in Fig.4 and Fig.5 respectively.
Moore FSM:
The state diagram for the specifications listed in Fig.2 is shown in the following Fig.6.
The state table and state assigned table of the Moore FSM shown in the state diagram of Fig.6
is shown in Fig.7 and Fig.8 respectively.
Algorithmic State Machine (ASM) Charts: The state diagrams and tablesare convenient for
describing the behavior of FSMs that have only a few inputs and outputs. For larger machines
the designers often use a different form of representation, called the algorithmic state
machine (ASM) chart.
An ASM chart is a type of flowchart that can be used to represent the state transitions and
generated outputs for an FSM. The three types of elements used in ASM charts are 1.State
box 2. Decision box. 3. Conditional output box. Their representation is shown in Fig. 9(a), (b)
& (c).
Fig.9: Elements of ASM Chart
State box – A rectangle represents a state of the FSM. It is equivalent to a node in the
state diagram or a row in the state table. The name of the state is indicated outside the
box in the top-left corner. The Moore-type outputs are listed inside the box. These are
the outputs that depend only on the values of the state variables that define the state;
we will refer to them simply as Moore outputs. It is customary to write only the name
of the signal that has to be asserted. Thus it is sufficient to write z, rather than z = 1, to
indicate that the output z must have the value 1.
Decision box –A diamond indicates that the stated condition expression is to be tested
and the exit path is to be chosen accordingly. The condition expression consists of one
or more inputs to the FSM. For example, w indicates that the decision is based on the
value of the input w, whereas w1 ・w2 indicates that the true path is taken if w1 = w2 = 1
and the false path is taken otherwise.
Conditional output box – An oval denotes the output signals that are of Mealy type.
These outputs depend on the values of the state variables and the inputs of the FSM;
we will refer to these outputs simply as Mealy outputs. The condition that determines
whether such outputs are generated is specified in a decision box.
ASM chart for Mealy FSM:
The following Fig.10 gives the ASM chart of Mealy FSM of the state diagram represented in
Fig.3
The following Fig,11 describes the ASM chart of the state diagram shown in Fig.6
1. The output is a function of both inputs and 1. The output is a function of present
present state. state.
2. Input changes may effect the output of the FSM 2. Input changes may not effect the
output of the FSM
3. It requires less number of states to implement 3. It requires more number of states
the same logic function. implement the same logic function
Sequence Detection:
One of the main application of the FSM is to detect the occurrence of a sequence of bits or a
pattern in a random binary input sequence 'w' or 'x'. If a particular sequence is detected the
output 'z; will be 1.
The sequence detector can be represented by state diagram using Mealy or Moore FSM.
Serial Adder: Consider the addition of two binary numbers 'a' and 'b' . If they are added bit
by bit from LSB to MSB they will produce two outputs carry 'c' and sum 's'. This can be
represented by a Mealy or Moore FSM with states representing the carry of '0' or '1'. The
following Fig.12 represent the Mealy FSM state diagram and state table with state 'G'
representing the carry '0' and state 'H" representing the carry '1'. At each state the two input
bits a & b are tested for the combinations '00', '01', '10' , '11' and to verify the sum 's' being '0'
or '1'.
Fig.12 :Mealy FSM state diagram and state table for serial adder
Fig.13 represent the Moore FSM state diagram and state table for a serial adder. As observed
from the state diagram it requires more number of states G0. G1. H0, and H1. Here G0 and G1
represent produce the output sum of '0' and '1' respectively for carry '0'. H0 and H1 represent
produce the output sum of '0' and '1' respectively for carry '1'.
Fig.13: Moore FSM state diagram and state table for serial adder
Sauonce Detecon
Mealy FsM fa
pekechng h Senonce
Diogam Cmg
Mea FEM
Stat
olo
Tabla
Stae
A A B
B O
9oue
AsM Cha fon dolechi
Nealy FSM
Peset
(z
w
Seqyuan Detecko
MOOne FSM
MOOne FSM
Ab Blo
(
State Tabla
NS
Z
P Ps wEO we
A B
A
B A C
C
C A
FSM
ASM Chad
Do9pt
B
Z:0
Z)
W
Sealuanca C10
Mealy FSM fun clolech
Daghan
Stade
ayuinnd A, B
Juo
ol
State obla
NS
Ps W:o w weo wa
O
A A
B O
BA
AsM Chant to dolechrs r ueno 1o m9
May tsM
Resef
2
Meal FSM o t diogram dodechng0
he oio
foun Sao A B, C, D
l o lo
lo Olo
1/o
State Jabk
NS
W
PSw-O w
O
A A
O
B C
O O
D
c
AsM Chat
AsM foa dodechng e
Seau0nta1olo
1010 wvhs
Mealy tSM
W
Seayuena o StCP% to dovgya FSM
ealize o PADblam
tati
excitahan
abla fon
on
3 PePona O
he next 8 l e
exPnesion
PAaRnac n 8eP 3
he table
Cihcuit dliogram whg Jn
oaco a
S
Je
eXProsio Ob tamed
Chongn FE and
in tar 4
pexgn FSM A D FE fo
Consnut a
tata Awghed tabla hho
3o C lo and D: I
NS CY YD
Ps olB
weo wej W-l
A-O oO O O
O o O
O
O
NS Realuingd
PS T/P
Ya Y
O
O
O
1 O
O o
110
D
DL
D Cy,4u)2 EmCl;3,5)D
he k-map
From
,9,co ,
P D
Exataha tabla
2 99, C
euatons
tha acoe
-
Z
CLk -
CchRym Jk FF to TFF
Extera
PS Next
thrut Iht
n JK
T
O
Cg k-maP
Sm C ) + DCI,)
SmC3) DCOaD
o L
J: KT
FF to
Con lesm from D
extenna inPts
T FF Ov
Hee
ConeNOn
DFF is aaiabls
tabs of D FF
E xtoa Flipflo
PS NS
ThPd
D
n
O
O
O O
6no0ol_Ulo
p n+ n