You are on page 1of 93

OMpleMENT OF A NunMBER SYSTeM

.find he 9's Complement and 10S Complemenk of given decimal


0. Sys kem

(o) 3465 (b)82 54


So1: 9s Comple ment of 3465 9 9 9 9
3 4 65
653
10 S Complement
Ob 3465 6 534

65 35

S's Comple.men 0f 48 2.54 999 9 9


82 54
-2 7.4 S
os Compl. o 782.54 2 17,45 Chcan o. O mistake
+

217.4 6

's and 2's c omplement 0( given binauy TLimbe


ind he
l ool. iO
()
addinon and Subrachon

Besose 3hadt you Shoulel knod binoy


sol
Bin.ay adclihon Rules
Biny Subshack Ruls

0+
-1 with be moo 1
+0 I -0
1
+I 0, Cany o(

eg
e 11. 110
Tol. I0T 10 00
+ 0 01. 10
+ 0
I00l. 0 o
Sol
0o010 > ' S Compl.)

Ooo (2's com p}emnt)

&Repses entaion Signed Mumben s sing


usin 2s Comp/1S Comp. Mehoc

5|
Sign bit

1 5

10 01 0 o 51
1
Oo o - 51
0
Sign bit t posikve
1 for Negahve
. Express 45 in 8 bit 2's Complemoak dorm
+45
45
( Comp-.))

45 II0 0 0
( Compl.) Ans
NuMBER SySTeM CoNVER SION
Conveit n y 70. syste m to decinmal

eq1 Convent o tol, Ho de Cincul

=(1x 2) + (0x2) + (x2) +(o v2) + (1x2)


6 X 0 O

210
to decima
eg2: Conven o1.1Ol2
- (Tx2)+ (I?)+ (ox2) +(Ix 2') + (Ix2) +(1 2) + (0x Z*)+ (0x2
16 t 8 o 4+2 + +0.S +O +O.2S
24. 6 251D

eg.3 ConvenE 4054. 06g deimc

Ca 8)+(ox8) + (Sx8')+ (x8*) + (o x8) + (68


2048 + Ot 40 + 7 + O+ 0.0934

2095. 093 71o

Convent 5C to decmal

(Sx 16)+ (12x 16) + (7x 16)


280 92
Two's COMPLEMENT ARITHMETIC
. Subhut 14 8 bits 2
rom 46 using S
Comple.ron oTm
Anp
+46
- 14
+14
+32 -14
You nou0 Jhis
mehod
46
14 + 4 0 0
+3 2
0 0 1 0 00 0 0

Ans. w i be v e .
Sino Jhy s Cam
and Jha no. oit be 00l00 O00 + 32

5
. Suwb hact om 26
uSin 8 bits 2's Compl. toT m
Ans 26 +26
5
49 +15
15 I0 1 1 o 0

+2 C
5
- 49

NOCOu Answen wit be.-Ve


Numben a is in 2s Cormplemo n
or m
6oiu be 2's Compl. o 1 o0 11
o ollo O O1= 19
A 19
Nunnber
Convent Doem Convensi ON
Decimalto any TAmben Syskem DOVBLE-
9Convont 05. 1510
05.1510 to
DABBLE METHOD)

binay ng. Sysem


Considen fiYStinteqen pane
pant l005
SuCcessive divisi cn
2 1o 5
2 52
26
2 13
2
Botto m to
2 ToP
2 1
1051) Ilol00l2
Consid en tho
Tachon pant 0 15
0.15 2 o.30
30 X 2
.60x 2 -2 O chano oG is taxo
0 20 x 2
040
0 40 x 2 = 8o ToP To
0. 80 x 2 G0 30Hom

Take this

(0.15)10 0.O0 ool,

(1O5.15 ).10 (Iolool. oolool)-


mehod
Subhachthe follouoi ng using 9's Complemont
(a) 745.8 436: 62 Cb) 436 62 7A5. 81|

sol (o) 45.81 +45. 8 1


436 62
436. 62 6 3 37 9 's Compl. o
309. 9 O 2 09. 18
+Ve no.
You Know This Jhenc is a Cauuy Anoen o i l be
Since
Convenhonad me hod
and Jhat no. wilu be 309.18
Add Jhat Camy
3 09.19

(6 436.62 4 36. 62
745. 81 a54-18
309.19 690.80
will e-Ve numb
Jhee is Cauy Ansuo es
Sinco
You Know This 80
690.
Convenhonal mefhod numbon ill be 9's Compt. 06
and Jhat
Ans is 3 0 9 .19
690.80_
3 09 9
. Subyac the. follooing mumbe using lo's Complernenmethod
Ca) 2928. 54- 4673 Cb) 416. #3 29 28 54
Sol
(a)
292 8 54 228 54
416. 73 95 83.2 10s Compl. of 4163

2 5!1 8 09.51.8
You Knoud Jhis is Answen wlu be +Ve no.
Stn Ce 3hoe
Stnce. a Cauy
Convenhonal me hocd and ho
ign ove Camy.

) 0416. 73
+707I. 46 10s Comp. of 2928 5
46.3
2 9 28 54 7488 . 9
-2511. 81
Sine Jhee is (NO)Cany Answn i be-Ve)no.
You Know his
10 S Cornpl.of 7488. 19 2511 8
ConVenkana mehocl
Ans is. -2511-81p
TopiC Boolean theorem S input 1

* Corresponding to OR Gate
A +A =A
input 2
A+A= 1
A+ O A

A+1 1 1 + Something =1
A+B +A |Commutahve La does mot depend
mpu posihon.

(2)*CoTsespon dling o AND Gate B

A. A A A

A. A A
Y
A.0 0
A A
AB BA Commutaive laud doen Tmot depend
inpu po sihon

AL gates doilow Commutahve Law: inpu posihon o6 Voiables au


iTyelevant, we Can Connec input vavablks [A,8,C, - ) to
any in posihon

(* AND is dishibuive.
Distibukbe Louox A.[e+c] AB + AC
Oven OR
*A+BC = (A+ 8) (A+c)> 'oR' is dishibuive
oven AND'.
eg.LA+ AB=A+B-
A+ A) (A+ )
CA+e)
es. LA+A = A+B- AtB

(A+A)(A+6)
(A+B)
A+.
Complement

AB AC+Bc CAB+ A Bc is fedundan ) hee


uwill veni fy in K- MAP.

Suppose, (AC) (B+D)


+ + (AtC) CA+D) = CA +c)+ (B+D

Hexe BC is Called Oe dundant teim

in form o6 Somehiy= some Hhiry


Dualiy Jheosem 96 n Tboole an expoes S)on

AND is eplaced by R
OR' Teplaced by AND
îseplaed by '1
s Te plaCod by '0'
Vaviables Ue NNOT Complemon hed

Jhen Jhe new bo olean expression s valid

e Rampk
GTiven expre ssion Du
al
O 1
1+1=
A 1 A A+O = A
A A- d A+ A =
AB .A A+B =E B+A
AD 4 A+ A =o A+e A.(A +e) = 1
om preiou elample in

AB+ AC +BC = AB A C SOP fo 6m

%(A+8). ( c) . (eB+c) -(A+8) . ( P0s orm

SOP s Sum o prdduct foom 1,..


will Study in K-MAP
Pas PoOduck of Sum foum
Suppose Ca) boolean
SelfDual
do(a)> Dual ofbo
boolecn
i n matuye
ghen
De Mosgan s heose m. Most powenfu Jhe0em in Booleen Algebra

|A+ B B
A. Break he line
change the Sign)

Jhis Law Can be extended to ahy n0. 0f Vanable s

A+ B+C + A.B.C.

AB +CD = AB CD

PBreak he line
AB A +8 change he Sig^ J

. Demosanige (A+B)(c+D)
A+8) + (C+ D)

AB+ a.D
AB+CD

& Reduce the expsessicn


AB (CD+ EF) (AB + D)

(CD+ E)+ AB+CD)


AB+ CD. EF + AB CD

AB++ D)(E+ F) + ABCD


LO GiIC G1ATES
NOE
Basic Giates AND
OR
X Univensal Gates NAND
NOR

XOR
Arithmeic aBes
X NOR

NOT Ghate
A
A

A A

Concept_Of Buffen:
A (uoith Some delay)
JF Das ses the inpur as TE 7 F WEE

wih Some dely

NOT Giate is also &Calledinvente

NOT Gate is also


Calledinveting bufe

AND Giate
A B Y S
AB

hree.four input And gate s also possibie

AND Gnate holds Commutahve Law


A
X
AND Gate holds Assodaive Law

B ABC
ABC

Onc buput
Jhvec. inpu

OR Giate
A B A+6-Y
A
A+e-
B

OR Grate also holds Commutaive and associahve) aw

XOR Giate
A A B
O
A B AB+ AB

when both input ->


unequal
Ourput is high
X is also Called inequalilg deectom CKt

XOR gate holdn Commulakve) la. and CAssoctakveau

Sopye
Only 2, inputs for XOR Giate
AB6
AGD BGC
5+2+8g - 10*818
RPo0peos hies oXOR gote (A GB)
A A = 0 AA+ AA O
A A 1
A0 A
A 1 A
EXchange poopenty A BC A C B
CA

.Hod Can yOW usee XOR Aate as a


Buen
A A 0 - A Buft1)

A I =
ÀA C9nventen)

Conhoe ilp= 0, 1

XNOR nate AO B
AlB
A -y - AB + AB

0
-

both inpubs ane equal


o hen

is
is also Cal led equolily_detectog
9

XNOR also holds Comnuta hve) and Associahve


La
Only 2- inputs or XNoR gote
gate sdefined
ropehes o XNOR gate (AOB)
A OA = 1
AO A - 0

A O 1 A
Ex chanGe B
PoD penhy AO B= C AOC
BOC A

. How Can use


you NOR gate as a Butfon /1nventen

AO 0 A ( 9nvanten)
A
AO1 A (Buton)

Cono! 9/p :0,


. ne
Jhe Train will oe Stopped only ohen S tahon is awuutved
eme geny ehain is pulled Pooblem sukenon

Stakon (A) (B) Tran s hpped|


Two vaiabl-
emenent
Chaun C
in this prolole Shahon mo Co)
aiveel Puled C1) Yes (1) His A
Srai on Co)
not am Co)
ved Not pulled No (0)
Staion Unived Pullad ( Yes
Shahon
C (1)Ag
amved NoE pulled
Yes C1)AB
Jhevefove, This above poblem Can be
imple.menteo by
AB+AB-t AB (A+0) OR
- C.

Reduce
9 90 Ho atch
spideimanfmy fiends goes wih
0es
me and como rou0' am s
posponed. Problem stctkmont)

Two boo lean vamab les idleni (ed

oiend qoe not eam poshponod Yo oi oaleh


wih me (A) a notCD)
Syid. gt (C)
Frierd doon not Vou tojll
go (o)| Yep no F (0)
Friend doen You wil not
notgo (0 No
(o
Frend g0 e ) Yen You itt go (1)
iend goon (1) No You uoiel or
(
Jhonfuve, Jhe ubove p oblem eon be implemort by

AB AND
2
7iven a Logic di agTam o any Tandom Statemont
CsoP
iotm gigates
(Digital
inputs
A Logic gates
D= AB.(A+8)

(Boolean expre SSicrt


("Boolean
vaniable s LoGiIC D1ARAM TouhTable)
ABC D

Keduce he express ion obltine at'D


. hree b elow apYured 10 a
oawe fosms A, B,C Shoon

3 put Ihe owpu wayetoTm


gate(AND), Draw

Detenmine tho oupu Y.

A
What is
Achuatly happening8

Given a
PoachCa problem

9deri gy Jhe booleam Vaviablo


CA,B,C,

Doauo Jhe tuh Table

Wite tho boolecn expYessicn


SOP 13
Pos
Reduce he Bo0lean
ex pve s sion
using
Boolean theoiem
De-mot gany n Lupto 3 vaviable
K- MAP fav3Vaiab

Doaw tho ogic qate diaram


K- MAP Sep-1)
den
renkhfyJhe
ne mo C bcclean Janacles ond dou he e

K- MA Toble
-NOmable 3-Wonable 4- Vanable
CDCD CD

A
2 3 2 3

IMPogtant Note 9n K-MAP, Codeis used which is also


as unit dis tance Code Called

O O One bit is
changed
O
one bie is
chan qed
0 ene bit is Changed.

exornple 4: m (0, 1, 6, 9) example : fa


Doat K- MAP table only A+ C

exanple 4 f (A+ B). (A +C)


1M (9, 14, 3, 1)
example3
K- MAP(Step 2)
boole an
an expreSion S m
Check Ohe theo he given
Stand and fosm o moE Yes

Canoniccu
Youx ans WeniS e s
form.|
ONo
wsite douon
C = ABC + ABC
he minteims 07 Maxtenm.
(sop)

(A+0) (6+ A) ( POs)

3 2m (0, 1, 3,6) (mintenm foms)


TIM (2, 9, 13) CMaxtonm fovm)
ABCD + ABCD + ABcD + ABCD

At+c). CAt A+ C). CAt Bt c)

mpor tan NOtes


HowHo idenify Standad foim not
A Shandand fom SOP) s Jhat
Jha boolem expre ssion n ohich each
Podduct oms Contains ule Jhe. vaniables
o Jhat unchon
{unchon
(A.e) =
(AB+ (BA anohea
poduch term Contcin all vaiab u.
one produ c tenm > Cosnioiy c l Uqntb
9t is in Standand soP
-form
Similanly, A Standand osform IS Jhat boole an ex poessi or
in
in ohich each Sumem Conain all
Vaiable, Jheuncha
eg-fA,8) A BA+c)}{c)
Cuno thes Sum tem
bne sum Ae1M
ohe (A, 9) is
Sm missin in
Sandand Pos forv his Sum for1m
on
What do uo mean by mintenms?
each o he pooduct tenm in
in Stan dand 4SOP) Joom s
Caled minteim. S denoted by Symbol Small m
and is 0mten

m (0,-. =mno,m,, -
Summan Sian)
X What do
yo mecin byMaxtems)
each O Jhe Sumtoms in Shandad O
Caled Max tIm 9 i
foim is
end is denoted by Capita M
om Hen

TTM (o,1, - .

) TlM
(MG, M,, M,.- )
>Procuck Sigm)
Youy Answen ic NO) Uhenonvenk is Standand ofm)
1. Expand A+ B to mintenms and
min/may tenm
LOite doton Hhe
0 Maxfenm s houo? exp Te sica
Shandand fom 0f A+B

62 expand A+ BC+ ABD + ABCD

A &,D is missing A (B+ B) (c+ ) (D+ D)

BC A ismissing BC:(A+ A).(D+5)


ABD cis missin ABD CC+ )
AGCD No vaiable is missing II|>(5)

HOME AssiGNMENTS.Mintem
2
or
bohk.
Maxterrwm bok.
AnsI A+ B
A-(B + B) + B(A+ A)
A B+ A) + BA +(AAB

AB+ AB+ AT
m 0 , 1,2) mintenms for mu
(Max tem
Missini
ntenm
Ointenms fromJho expressiom are axem
Maxtenmn
At B (SOP form) =
2mC o, 1, 2)
TT MC3
Ex pand A CA+ B) (A+ B +C) to
Maxtem Jhon Mintenn
POs form -
Gum 40nrw
AA B,C is
mis sing A+ BB +
mpor tant
A+B > C is
missing> A+ B+CC
A+ +C No vanable is mi ssin9
A +
BB + cC (A+B) CA+ ) + CC
CA+B+ c+). (At 0+ cC)
=
(A+ 8 +c) (At B+ C). (AtB+ C) (A + e +c)
At e+cC A ++C ) (A+B +C)
ACA+e)cÁ+8+¬) =
CAt04c) (AtB+C) CAt B+ C)CA+8+C ) (A+B tc)Ca
(o o0) (o o 1)Colo) C +
o
o) Co
, 1 , 23, 4, 5
Ans TTM(0, 12,3,4, 5)
Minteam ? Missing Maxteny 2m
m
6,7)7)
6,
K-MAP Step-3)
fill Jhe emties oY SOP form in Jhe K -
MAP

POS fo1m Table fom point-1


0 f
which
. In (SOP form,) (1s Jle placed)in Jhat Squane boxeo

Jhe (mintenm expre Ssion


aUle present in

Jha Squau boxe


n (POS Os Ce placod in

which Ye sent in ghe maxteam expressj cn

eg f Em (0, ,3, 9)
TM (2, , 13, 15)
-
AAC CD CD CD CD A CD C+ D CtD CtD Veruy
as1 11 A +B mpo
A A+8
AB
At
0
1
A+8
SOP entny
PoS eny
Vony impor ton)
TOPICS TO BE DISCUSSED (Module-2)
K- MAP method Pos fosm)
K- -

MAP mehod Dont Care Condiions)


wne Mc Clusky Method
Nand/Nor Gate Imple.men takon
0K- MAP Melhod (Pos) form
Follooing Steps to be
followed to Solve ahy
.Sdenhydhe no. 0 beolean
PrDblem in Pos
fosm
vaiables ad dsa CoTTespondin K- MAP toble

CD
+c +C + +C Ab CHD C D, T+ D C+D
B
2
A+B
A+B
13 5

Check he hen the given boolean expyesi


A
n n Shardand Oym or ndt?
Strndand Pos feTm is Jhot boolean ression
Sum te1n in ohich eack
Contins all Jhe Variable Jhe fun chon
efCA, 8, c) =
At0) (A+C) C ano her Sum deim
one sum tem
anche Sum en m
( nising) is missing) A, Bis nissing
Shanrland
abo ve
pcolear foimSo, yo have to
Conven
Le U expTessiun in
Standend foom
toKe Cne
eyample
. Cornyent ACA+ E) (A+Br C) to
maxtenme) and mintenms
SOP
LPos
A Cis
missin A BB + CC
A+B C is mi ssing A+ B + ca -
A+B+C No vamable is At B+ C
miissing
Let wo
take frs one

A+BB+ cC CA+B) (A+ 8) + cC


(A+ B+ cT) CA+ B+ cC)
( A +B +c) (A+ B+ ) C A+ B+ c) (A+ B+ C)

A+B+cc (A+ B+c)CA+ B+C)


Omginal expvessi cn = A CA+B) CA+B+ C
A+B +C) (A+ B+C)CA+B+c) (A+ B+)(A+ B+CA+8 +c)
Co o o) (o o t) CoI o) (o ) ( Oo)CtoD

0, 2, 3, 4, 5
TTM
Maxteme H Co, 1,2,3, 1, 5)
Mintenn m 6,7) missj n9 maxtenms

Next step:fill he enmes 0 for POS form in the K- MAP Table


e 9n Pos form 0's aUlo place.d Jha Squase boxe
ohich CU e Sent in maxtem expde ssjon

TM (2,6,13, 15)
C+D CD CD L1
A 9
0
ATB
AAB
A
X
NexNext
a[ten fuing he
Jhe enmes
and Yo have to cdo C lub bing poce ss
follow the ord en
8 boxes (ochet) 4boXeo (quod) 2 boxee Cpais)
highea pronty lowe pioihy
. Keduce Jhe expre ssion CA+B) (A+ 6) (A+ B) ung K- MAP
Step- 1 is a variable Coresponding K-MAP
expre. Ssian A and B and

B B
A

Shep-2: Non srandand


Shandand form max eam/minfeim expYes
TTM (0, ,3)
A+B 0, 0 o
ATB 0,I 3

Step-3: hii the enhes At@ 1 3

>A
A 0 Ans D (A). CB)
A

You Can do Jhis 9uoShon using sop).aso


so

NoF necon
B
AB Jhey wju Come
A
epual.
Reduce Jhe follousing
nd implement iE using uwîvensal ogie 9
e

TTM (2, e, 9, 10, , 12, 14)


Ler us do by both S0P/Pos fom
POS TIM (2,89,10, 11,12,1 SOP 2m (o,1,3, 4,S,6,7, 13,1S
AR CD CD
CtD CtD

A+0

-B0 AB
AD

at 8)
A+D) Ans,
Ans AC + AD+ AB + BD
. Ans

(A+6) (A+ D) ( B+C D


Implemonk usinj Nand a te
implemen using NOR gte

A PS
D

c- D
fos ODihng Jhe fnt
fin Re duced
KeduCed Boole an Cxpye,
ss}on, quoaysS
ime. mpli cants which es senha
Valid.
aime impi cerntS Cssenhal pime impWcan CEP)
>
Non-e sSenhal Prima impli. (N- EPI)
.Reduce. Jhe boolean expve.ssi on
SCA BGD) - TTM (34,S,4,9, 3, M, 15)

CtD,CtD CiD Ctp


At8 ToTal 5 PI.
4 E PT+ N-EPT
A0O0
Jhis o1 Come in
Ouput ex pve ssi en

2) K- MAP MeHhod (Dont Cave Condiha)


fCA, c)-2 (o, , 6, 7) t d (3,5)
C BC BC DC

A A

AP
Ans A B+Ct AD X X
Cis
AB+ A non-pimo. imp\i Cont
fCA,8, c) TTM Co,12, 5, 7)* d (3,6)
BC
A 0o X O Ans A+C

G Simpli(y Jhe Boolen un chen


( ,,9,) =
á (, 3,7, 11, 15) + d (0,2, 5)

AD

AD+CD
AB

A
CD

Simpli (y he Boolom 6

f(4,8,,0) TI (4S,,7, 15).Td (rs, 8)

40
A)
l+)
AAB
AM (A 48) (B+D)
A+0
. 3, 2mCo, \, 6, 7,
, 13
15
Column-I
ColumnI Column-II
ndex Min
A BclD
Ondex-0 ALBc D
(0,1 0 o0M A BC
1
Sndex-1 (o, 8)
o 0 J 0,8,9)
(1, 9 oo
6
9ndx-2
9
o0 (e, 9) T,14,14, 15) 1 P
(6,7) o
9nday-3 (6, 1)
13
9 13)
14
( , (7, 15)
SnAey 15 (13, 1S R
(N, 15)
Next STEP-
P 9 13 M15
X Columna l onc
An is P+
Bc+
Bc+BC
fle a) - £m (o, 3,5, 6, 7, 10, 12, 13) +zd (2, 9, 15)
Column- T Column - I
9ndex min A 8 CD A 8 C D
A 8CD
Snder-0 0 0 0 (O,2 0 0 6P ,3,6, 7) 0-I-U
Sndax-1 O 0 O0 (2,3)
O o 1 (2,6) - V
6
OloI (2, 10 , , 3, 115)
Snden-a o I (3,7) 0-
9 I-I
10
(5,7
C6,7
12
(S 13) - 0
Srdes-3 (9,13) 0IR
3 C12 13 L O-S
Srdey-4 15 (7, 15
C13, 15) 1
Jhus, P, , R, S, V, V ate Six Pi me mpli Con B
O 33 5 6
1lo 12 13 An P + U+ V + Q+S
AED+ AC + BD+ BCD
Donb inclue +ABC
R X
Don (an
,Key-point
NAND and NoR Implementahons
A
NAND Giate A =A+ B
AB c

B -
Touh able

A B
0

SOP foBm á(o,1,2) TT (3) POs fosm


Y =

NAND Gate as a Univensal Grcui t


AA A -- No gate oupuk
NOT gle AB- AND 9he Owpue
ANDAND gate LD
B D
OR gate A - A+B- OR gate oupuk

A At0 - NOR gate oupu


NOR gate
D

XOR gare A. AB

A AB AA . BAB
B
AOB
B.AB
Ouput o XOR
3ate
(2)
Ho A AB. BAB
A AB A AB
BAB
B AB y

y +

A (AB)+ B(AB)
A (AB)+ 8 (A+6)
AA AB + AB +
AB+ AB.
XNOR 8ate

A D AQ B

Why above cigcuu diaqiam is


imposhant to
Temermbe
AD B- (A B)+ (AB One nok gake= O
Ono AnND e =
2
one not qate 0 OR gabe=
one
AND ate -

TOTa no.
of Nand
acles Yequived O+ 0 +
you do direc + 9
Nine Nand ate
irmnplemunkahon, you
yo ) requ ve
(
in put
nimum no. okNAND gates Tentiva implernonhrihen of
fe llocoing boolean expre s Si on

9f(A e) A + BC
Direct Implemenhahon A 3
AB+BC

Totr Nand gateo sequv


Minimum no O Nand Gake
implemenkahon
A

C
0 AB+ BC

ToTal 3 Nand qate Yequived


Wha s the Appoach
A,e) AB + BCc

fCA,8) AB+ BCC

AB. BC

fA,6)-f(A, B) = AB. BC 3 -inpu Navnd


Sate an
Teruived
02. +CA,0) AB + BC

f AB + BC

ABBC

AB1 ec input Nand gakty ave vieed

exhu Nond Cralt is Yejuirtd


NOR G ate A
A A+B A B

Touh Table

0 0 1

NOR Gnate as
Universal Civcut
NOT gate A

OR e A+B

. AND gate

AB

NAND ate
AB

XNOR
6A ate

A
B y A
XOR aahe

A An

Kememb ho able

NAND NOR
NOT gate
1 1

AND gate 3
OR gate

XOR gahe 5
XNOR gate

extsa Concopt
NAND-AND + NOT
NOR 0R + NOT

adh Crcut ABove CAN ACT AS UNiVERSAL CKT


MODULE -3
DI GITAL CIRCUITS

Combinahonal Circuits Seguenhal Ciscuib


CMo dule-3)
CNodule- 4)

LoGC
CKTS
E LOGIC
CKTS

PTesent Output depends


On only
PTe sen inpurs Present output depends On Doh

No Present /P
feedback Past /P
No Memory. Fee dba cK is Jheye
eg HA, FA, MUX ,etc. Memosy is Jhe Ye.
eg
e. Flip Fiop,
Kegistens
Let us
study Combinahonal Circuits Counte1s.

StTate gic
inpuis arange. o6 Dulp utc
LOGC gates

Pgoce.duse to de sign
e sign
denhy The no. 0 inputs and ouwputs
Constuc Jouh Table
Oite Jhe logica ex pre ssion n
sOP/Pos
Minimige ogicad exprassion
mplemonk Jhe gic Circuit
ARITHMATICCRCUITS Rule to be.
emembened
HALF ADDER
0 + + 0
0 Sum bit
Cauuy bib

A
HA Sum CS)
Caouy out Cout )
uth Table
LoGu GAL ExPRESSIoN
INPUT OUTPUT
A B Sum Cs) = AB+ AB A O B
S Cou
-Cov Out Cou) = AB
AB
-S

Couk
HAIF ADOER USINC NAND GATES

A
AB
A AB

AB AB
HAIF ADDER USIN C NOR nATES Do it
Yo urSelf
) HAIE
SUBTRACTOR
A
HS Dif.()
borouo out (Bout)

duth Table
LOGC Ex PRESsioN
TNPUT
OUT PUTT
A
D
D (D) AB+ AB =
A B
O Borouo 0uk
O
Bot)) = AB
A
D

LDo- Bou
HALF SUBTLACTOR
USINC NAND CATES

A AB A B- D
AB Y 7 AB B

Bou= A8
8. Ab 8-(A+B)
Ab
HALF SUBTRACTOR USING NOR CATES Do i Youxsel.
FULL ADDER

A
Sum Cs)
FA
C Coue
Touth Table
LoGCAL ExpaESSI ON
INPUTs OUTPUTSs
A Sum
Sum ABC+ABC + ABC+ ABc
Cin Cou
Sum m ,2, 4,7
0 Sum A B C

CARRY ml3, 5, 6,#))


ABC t ABC + ABC + ABC

Le Conside Ihe A BC
CoUUy ABC,+ ALC + A BC
+

C CABt AD)+ AB CC+C)


Cavuy c CA ) + AB
LoGTIC DiAGRAN IM PLEM ENTATION Basic gate
Using
HA HA
A

S A B
C Ci

Cous A) C
+Ae
Fuil Adde OR Gaate
Can be Conshu cted by 2 HA + One

A
F Adden
HA

Cin HA

OR Cou

mpostetn NOfe. T Stagee


A Cin Popogah deloy srae
Propoqa lion daloy

tpa

tpd
Cout

9n Fun addon Civcuik, 96 a ogic gates have


n Same
prdpogah on delay TPd Jhen tuwo
provide 'S or
minimum 2tpa is Teqived. tCo
Even thouch a FA Can be
Conshucled by siny
Jhe dis cíoUCnBcye is Jha Jho bis
mus oo HA
Jhrouyh
Seven cu 5ates hich mak e
pd prp0aate
propoaate
Fuu aoldas usim AOT seten Jhan
8seaten
Logic han
You Can also impl Ful adden using UNINERSAL CATes
FULL CUBTRACTOR

A
D
FS Bomou
in
Touh Table
Lo CcAL ExPAESSION
TNPUTS
Dif Act ABC+ Aßct ABC
A n D Bom 2
m C1,2, 4, 7)
A e C
O

omuo m(2, 3, *)
Beut A@c +AT + A 8c+ ABC
cA@+A@) +ABCc+ C)
C(AO8) + A. B

A
OG1C
DIACRAM IM PLEMENTATI ON F u u Subhra cke
Hs
HS 2 |

Ful Subkaackor Can also be


DD Conshckcd by 2 Hs
Bor

+1 0R
pos tan NOTE
Similanto Fuu Alde FS Can be Con
cicut,
USin HS Jhe dis oduUcn
oje
shmucad by
y
is Jhcu Jh biy
P Tpo ate Jh oough Severo gates uhich makas
bib M M
mwMg
Then Jhak Fu L Subacha usiy AOT pd reclo
oic
ODULE -3
4 BIT
PAAALLEL ADDER
CARRY Loo AHEAD ADDER

A2 P3 Panallel 9npuks
A 8
AO Ac Bp
A Cn
A A
FA
Cin
Cin 1 A O Cin
Cou FA FAo
Cow Couk ouf S

Pialel ouputs
Fig. A4 bit binou ponculle adden Circuuut

Operahon A =
A A A A
B
Cu C
5 nikallyo
C C Sa So Ansus en.
adding tuoo bit n0. Ccun aive 2 ouput

Simil aly

odding tuo loi CCin Ve 0 bi ouput

erampe
U A 110

A bit Panallel birauyodd Cn S 0 0010-five. bits


44LS83

O
Couk 10 0 10
e n oih his Ci scwUb
n Jne
OC
paralle q dd ens discusSec above, 3he
Jhe Cav- Oule
Cay-Oul
stage is Comne.cred to
SEage Jhe Cauy.in, 06 Jhe e t Stage.Jhe
each

Sum and he
Covy-bits O any Stage Ccun no t be produ ced,
unb Some ime afte Jhe
Jhis is due to Jhe
Cauy-im 0 Tha Srage occUTS
pop ogabon delay
dlelay n the
he logic CircuFauy
uohich le acls to a ime
delay in Jhe addi hon
A each Stage pro Ce S
Ohe Sum bi is nok valicd unkL a6te
Jh Covuy bits in all Jhe pse ceding Shages are Uald.
9n effec Cavuy biks must
PTOpgate o ipple Thnugh
a s
tages
sEages
s
befoie Jho
befove MSB Valid- Jhus type o addens
also Catled RIPPLE CARRy ADDER
tA0DULE -3 CARRY LooK AHEAD C CLA) ADDER
To poedict
O
the calculakedd
CanMY befose F
achucll
Let us Consicen table

A
Cin Co
O

O
9 Can wite CAB+(A08)Ci

A0 e).
o

A:B Cdoen nok depend om Cin Value

Co AB CA B) Cin
CUuy pmpogar
L Cwwy enevao

us Call AB G
(AD8) P

C G + P.Cin
Le uS
genenatize it

we wil use Jhis e to preclict Cauuy


CoUly
A-
Ap A, A Ao

C
L
P-A2 A
Co

P AsG B
Cs
Co
5 S
P A,
Cho Ao B Co
Po A E.lL XCheck tho CCk diagram rom beok
Let i O, Cobi+PC
C G,+C C-is
ininia Couruuy ue
Put Value oE Co in esuahon
hode taKen

C ,+ CG+ P C.,)
C G + G +RO C, -(11)
Cs depenclonk on C not o. Co
Similaly i- 2 Ca Giy + C
C G +
C C is dependloak n CC 0t Co, C,
Let us
Consicd en 2- bit Comparatod

A CA, A) A7B
2- bit A B
B(B,9, Compara to
A B

irs mu mber A =A, Ao


Secord humbe s B B, Bo

Foom here to Shaut Comparing MSB « LSB|


NOre

For e. how and 198


to
Compayve Jha mapn o6 200
We i Compaye MSD ivst e 0 o and )&
he 2 sZ|

200 I98
FY e ho to Comba ve he masn Of 200 and 20

MSSB O

bom euol

go to 20 Mse

2 .0, 2
boh ant efuad

go to 3Td Msg

2
o , 2 o(1)
201 200

Same logic We wi0 apply to


magnihud Compa ate
uc
take One bit hese oil be Jhree possibil1ha .

A B A 1-bi t A >B
A26
A<8
B Compay -A D
A =

INPUT OUTPU T
A B A8 ALB A 8

O
O
O

Outpu ogical expoessi on


Az e AB
A<B AB
A B AB+ AB-AO B

- AB (A7B)

Logic diagam) AB (A <8)

AOT logic

AO (A B)
A A, Ao AoT logic
B B, Bo A
Az

A
BA,E,+(A®B,)Ao.B,
A <B
A,B,+ (A0 P,) A B, X x XXXX

A CWRONC)
B (A,oe) (Ao O B,)

Let uS
Considen a 3- bit Comparator:

Az A Ao
A
, 8
B B
, ) (Ao6)
(A,0 6,)
A,0 (A, B.)
(AO6,) (A, B,)
CA0B,) (A,8) +
A Ba +
(A0 6,) (A ,0 8,) (A B,)
A7B
+ (Az0 B,) (A,6,) +
AB,
(A0&)
A <B

A- B (Ao E,) (A0B)


MODULE- MULTIPLEXER (MUX) and DE-MULTPLExER(DEMUX)
Mulkplexens Dan Seleclovs
Acceprs Seveinl dala inputs and allowsonly one
one

o them at a time to get Jhrouyh


ouwput

only one. OUlput

MUX Y ((ouput)

(21)
(21 no. of Seleck linas
2"no. ot inp th
SH So
select inpuBs

2x1 MUX
MUX 8x1 MUX
o
2x1
4:1 8x1
4x1
So
Y-S,To + S So

Y55o +5 S2S
ts,s.T2 t S, S 3

+S2,So7
line aUe Yequre
NOte 1 Seieck
Yo have 5 Input lines how many
a e Tepuivee
Selec inon
y o u have 7 inpu linen
linen, how many

2 Selec
lino=2 4
taka
() 5 inpu ue Can not

3 Selec line Svch has


We dilu eru e Line, we
w e
ow of 8 inpu i n ,
2 8 Jhu
5 inpuu u n
Can use
w i be Yeued
(b) ipay Sele c inpub
Hen
T al so
also, 3 e

CA, B) o,1,3) usin 4:1 MUX

1 To Same Osden

4:1 -y- AB + ABI, + ABT MUX


AB+ AB+AB
1 Ta

oi Come at Selp inpus


A B -->Vaniablen

4 MUx
= (°,,3 imple menke usiny
CA,8)
8:1 MUX
fCA, 0,c)= 2 (0,, 2, 4, 7) using

1
Y Aee + ASCI,+ ABe T2 t ABcI+ AgCT
11 ABC+ Asc
YABc + ABc + ADC +
Y
1
S So inpuks.
S 3hv Variable, at Selech
AB

Samo OTden
MUX
Le us cdo Jhe Orclen MUX
Same u e s h on ih owen
A,8) ( , 1, 2) using 2 MUx lowen ovden

Table
A
A wiul be 2:1 Y A
adyuslicl
hew

S A Can also Come hee )


A ,y
A , 6, c) £ (o, ,2, , 7) using 4:
MSing MUX
MUX Osden
Couer

T T
To
6

C Loil be

adiunad
L C
he
So
AB

AnsV

AB

NOTETo implemen Co,1,2,4, 4)


usin
usin MUX, Onc exha
be Tesuive.cl
NOT ole
A,e,c) Co,4,4,6,7 uSins 4:1 MUX

To 1
2
T 4 Y A O 3

A A
A A

wi be adjlLLo
in tho inpuh

. Use a.
(4x MU to A
imple mon BO C. Alse oh 8x
A A

2 Y. , 2,
O

To

2
A
S6
Leh w A A A A
8 C
odj A
A
A
-Y
A
BC
. VSe a Jha
muihplexen haing 3 deurelec inpus
m ple mon
Cogic fev Jhe. uncha
5)
m 0, 1,2,3, 4, 10, 11, ,

T
A S
:1 Y A 8 9 12 1 (
A A 11 A
H

Ler wo
BCD
adjun A in
heinpu 1
1 8:1 Y
A- MUX
0-

BCD

TOPIC (MUX As A UNIVERSAL GATE

NOT gate AND


2:1 A 21 -Y- AB

A<--Inpub

AND Chate inpu A, B


a AND COk ABY
Ym(3) 2

B
NANDNAND GATE
A Y 1-T _Y A+ AB

Ym(o,1,2)
A

Table AB
(AtA) (A+ B)
B At8
3 AB Na are

To PIC DE- MUX


DE- MUX s s a Combinc1honcd Civcuit havin (single input
ine
Unen and many 6Upu ines. On The basis o 6
Selech inputs inpu line sis tsans fead t One OG
ovhpu ine.
Jhe
e Yo S I
Yo S I
1:2 I
:4 -Y1 =5,So T.
De-MUx So.I
De-Mux-YL S S I
So -Y, SS
S So
9. Desa
in Hghen orden MUX from Cowen 0vden MUX
(a) Desing 8x1 MWx using 2x1 MUX
a)Desing
(b) Deslgn
Design 4x1 Mux usin 2x1 MUX
DeDesign 8x Mux vsin x Mux
Ans a)

To
21

So
T2
2x1
2x1
Y.
T3
So
S
2x1

2x1
16
2x
I S

SS So
So

(b

21
2x

Y
2
S3
So
(C)8x l ustng 4x MUX ad OnA 21 MUX

So
De-MUx (1xe) usin (Ix2) domux
Desing highen orden

12 Yo
Y
1So
lx2
S
-Y3
So

Ix 2 2
Y
I2
I2 N
S
So
Convets binay
Decode Jt is Combinah ona Cixcult whi ch
Ophpu Gne s
rom m-bits
infosmahon
Genenol diagsamn

input n:2 oUput lines


lines Decoden

24 Decode uih ENARLE HIGH Inputs Oupus


E Enable. high PiN E Y Yo
HYo X X X
0 O
2:4
*De cod en 2
O
3Y 3

2:4 Decoden ih ENABLE LoW


EErable ow PiN
Inpus OUpul
E
To Ya Y
x Yo
Yo
2:4 0 O
Decodey -Y2 0
O
O
3 8
DeCoden oim Enable Hig Inpub Ovhpuli
E
Y YYsY Y Y Yo
Yo x
-Y O
1
Y Y
O O 1
1 o O
I 3:8 O

O o1O O
Decode
Y
Y
1
28inayto Ochod
taloelo
Intana Civcut o Decale
Aec
ABC
AB
A
A AB V ABc
B 3:8 ABC
AB
clcad A Bc
B A BC
AB
- A Bc
. Design Ful adeden usin Deco den
S(2,44)
Co
8
£(3, S, 6,9)

A
3:8 -S
C
-Cou
Nard gale usint Decode.
. Desig
PICEN CODER (NOdule 3
EN CODER Se
ODER St is a Combinahona Ciscut havins many
having Convenks
inpub (n a") and many Ovlur Lingn (n). St

Ohen Co den into Binay Code


Chenenal dag1qm

Encoden

inpuine 2:m moutut line

Ler :
: 2 ENCODER
Tu h Table

D.
YY
To Yo
:2
I2
Encodea

NOTE
wih 4inpu, 16 Combinahon
T 3
Y 0Upub
Possible but esk Combinaken (12
aA not used, dont ca

nouw an Encwden Crcue oich is


we have Shudied Just
only time One hpuk ishi
a
nosmal
in Ohi ch ccut a . Ihen is
encode
e n Coden
Called aoioihy Encodens in Och
anohe Class OG m0fe
Can be high aat Je
Can
Jhe Sama
Sqme hme and
Jhen
0ne inpu
ghon
Ihon
dhich input hao nghet priomy
wiu decide, entoden.
Callad prion
and Jhah why i is
2 Yo2
0
-Y-?
8x3 NOma Encoden
Combin. Co Vlícd
8x3 Only 8
Y2 Y Yo

T3 - -lo0 0 0 0
O0 0 0 O O.
8:3 Y
D
Y2 00 o_00 0 0

0 0 0 0 0 0
O 0 000

Y T2 + ttI bupu o gic expYesion


Y2 Iy t I tIat
x3Poic Encodes
Highot Piomby
To
8x3
o
0 0 0 O O 0 X
o o Xx
0O XX X O 1
83 O
o o X X
Oo
O
XXXx x
XX XX x xx

Loweu Pmon C
Module-4: NTRODUCTON To LATCH 4 FLIP FLOP
OASBorage elemen-in a digital circuik Can maint oin bin ry
State. delivenen to he Cireyih), unti
indeini tely (as long as poo i

clireckd by an inpu Signal to Suoikch Stmles.

Stosage elementS Can be operate ol oih

Signal lovels LATCHES


Signal Transihon FLIP- FLOP
Cedge)
Jhus, Latches ate Sen sihve to Signa Dovels ohone as Fip- fog
to
(U1e Sensihve Signaedges.
Signal ovel >
Posihve Level triagerod.
Con ne Inpuk
IS Enable Signa

Negaive Level trigsgenod

Signal edae
CConrod input
Posihve edge triggeing
is CiocK Sig nal)

Negakve edga trigserig.


SY MeOLS H IDenhfy
o u t p u

inpuk

CLK CLK

gnpuk Oupu
us Study Latcheiys

SRSR Latch and D Latch-> can be Nos qae.


designed using Nand o

Resek

R ouput

invered oukput
S-
Set LOGC DIACRAM, of SR Latch Vsing
NoR gae
Explanakon of above i scus Set Condih on
LetS= 1, R- O 1=11 cond
0 a She ady State
Nouo, Le us
pu NO change
S- 0, e-0 1 and o a Stecdy Shafe

No
change from pveouo Skate Memcy
pub Reset Conclicn

S-0,S 0, R1 @-0 oard ak Stecdy Shate

S- 0, R- 0 :0 are =1 ar Sheady state

No chcunge rom pYeiow Skate Mem0 y


at
Steady s Fare
Jhis is NOT Poss18 LE
Ovenall Cumouy
FORBIDDEN)
h a t is Jhe

S nt Qnt Remanks
O oln n NO change Memony
O 0 Reset Condihen
1 0 Se Condi hcCn

INVALID s tafe
XSR LATCH Jsing Nand Giate
Seb

- ouput

- in venhe.d aupu

Logic düagson o S Latth Using Nad te


Explanghon Ot above Circut
Re se CondiHon
L e s-I, R O
at Steady Skate

lat S , 1
G0, -1
at Sheady Skare
NO Change om preious staü > memooy
S O, R- 1
1, : 0 otk Sheady Shalk
Sek
Conclihons
Sl, = - 0 at Steady Shate
No Chanse from pethos
memony
e S0, RO ( @-1 a Steody dal
Jhis is NOT PossigLE> (FoRBID OEN)
oh is he
oallSumoruy
Remank
1 1
INVAD State
1 0 Sek Condi hon
O 1 Re ser Candihen
Qn NO Chonye Me mory)
9 Should be SR Lahh to agvee uoi npu hamn
IMPostant Note
0 Sgna Ho chone
Nand 9ate based SR Latch requien
its StaBe 9 is Some Hrmes vefens an s'R Latch add1 honal

This operakon Can be modi hed n by poduding


Sgiven
Conhoo input Signal (Enable. Signal) O hidh is beloo
gven el

S
9dea L Q
EN
x

Tau Table

Enable S R n Remanis
Posihve eves Latch ( Lakcl (,No Cchanje
iggerno
Laleh
) Latch ()No chore
0 Laleh0 Loleh (0 No chonse
Lach" Lach No chon

LabekLalch y No chony
Reset
Set

Summa _
INVALID
SR larch (NOR) SR Lalch CNand) SR Lakk CNond)

EN -

S
S-
EN

R
R
No
NO Let us COME o D-Latch. (D Stend S) for Dnta
t o anspasent lakch
a l s o Catled

D
Q
DD
EN
EN D na
No change
EN
OReset
1
1 Seb

EN EN D m -
NO change
O EN -

O 0Rese
I 1 seb

PRoBLEM oih LATCH


Ihey aneLevel taiggered)
When Larches a1e used for Storoge elemenks. a Seniouo dilh cultj arise
The
Jhe Sate oonsihons o6 Jhe latch appe an S ak Jhe
sh Gchve owput erte +
Dttse as Soon ClocK pulSe
as

new Siate
o
of a Latch appeans a Jhe
Change to
ogic-1. Jh
Oupu while the
Shl achve Jhis OUpu s Connecteð to Jho pulsSe is
Jhrough Jhe Combin ah onal Cicuul 9 ohe inputs 6O he lalck
The lare
hile th Clock
input applieð
Appled to
to Jho
Lotche Change
ne pulse is Sh a Jhe
Ihe latche w to
6esponð to new Values and a ogic-
logic- 1 ved
Qved
occul, Jhe besult me
stale mcuy
Jhe S tate Ot Tho Lachen
an
unpsecGc feuol Oupu
Ouput
Sihiah on
SinCo. my Koop
ClOck pWe Slays at Jho changing
achve. Quel, for a
HOW FLIP FLOp SolVes his poDblem
tve
he
Jhe problem oi h Latches Level Taigged Ve
he Key o he
boopes op erahon o a Flip- flop s Jhat
tetaiggen Jhe Ciscut only a
(SI GNAL EDGE of TRANST ON
A clock pulse g0es Jhroug h tuoo oan sih ons

>Posikve edge mggenud


CL
ymboe

Negaive edpe hipenad


CIK

Symbo

Deresmine Jhe Q Dulput o awefosm i6 The inputs Shoon below aro


applied D- Larc h. , Ahich is ini haly Teset

D = O inikally.
LEVEL TRIEROED EN

DA

EN

TULTL
INTROOU CTLON to EIP=FL

eote oina o Let Know

C C
R
SR Fup Flop JK Fip flop
D Fip Flop
LOCaiC SYM8OLS of PoSITIVE EDGE TRahERRED

R K
SR Fip flOP D£lip flop JK fp fop
LoCic SYMBOLs of AecATNE EDG6TRG6RLE
Let us
Shudy One by One fotowing Jhing for each
flip-flo P
Y Y

SR TK

D LT

(1 Cicuit Biaaram Nard Logic )


Five. p0ins e . hawe to
ouh Table
Study for eah fip-flop
Charachensit tabl SR
D
. JK
ExCi ka,hon table
T
a c h Ce
limin cli Qgram
Let us Shudy S
VPosiHve fip-HOp
EDGETRIGOERED SR FLIP- FLOP
negahue

S
S
D na
R CIK

(a) Logic Symbol


D
Cb) Ccuuk dtagram (Nand ogtc)
ouput
next output
9nPU+SS OuHpur Kem
CIK S R
nt Gn
X & No chonge/Memo
No change/emony O.
0 Reset
O
1 Seb
X
2 NO yalid
Cc) Tsuuh Table

a ) Characletshc Table

(Chava clenshc e)

0 0
0 x
O H S + ,R
X0
(e) Excitahon. table
9 Jhe wavefoom Shouon
Fia be low is applied to a posihve edge

toiggeTed SR lip- flo p. SKerch Jhe. oupuk uwe fom:

CIKLFL Let us assume ini hall


- I and @-0

Kepeat Jhe above


queshon oih egahve edge tgge med fllp-flop
Posihve
EDE TRIGL1ERED D- Fip 4lop
Negakve Special Case 06(SR fip-fup

D
DD
- Q

L CLK
C

(a) logic symbol Minoy change Cb) Cisuùt dllagran (Nand toio)

CLK
Input Oupus
D nt On D
NO change
X o memsn

0 0

nt ,D+pD
Chaxa cleu D
CC) Tuh Tabe Lejuaer_d) ChayackeiHea dable

n D

(e) exci takon talha.


(e)
EDE TRIGERRED JK FuP- FLOP
aexha Connechhons
for Solving iwAUD Sute

CLK
CIK

K
(a) togic ymbol
Cb) Civcik Biagram (Nand)
next ouhpu
On Onti
CK Inpuks Ouhpu Remank
JK Gnt
XX NO dunge /memey
2
y3
TL00 QnNo change/nmemng
Reset
Set
n TOLE
Characevisic
equav Onan J + , K
=

(C) Tsuh Table


Chayacteishc ab

O O

Cn+
(e) ExGrai on Táble
The wavefoxm iven below appied to a edge- tiggevmed ip-fop
JK. Draw Jhe oupu 0 avefoDM
ler iniially 0
legakve
CLK M
edge

Liming diaqyam wcwe form


for JK flip- fop
>Toanl1E)
EDCE TRIERED
Fip-10P
CIK
T
CI-

(a ogic ymbol
D 9

b)Cixcwt Diagram
CLK T
T Gn
X n reou
o
1 1
O 1
Togg
choyac e": On+ ,
e)Tuh Table d ehaY ac leisht
T
able
n4T
O
1

(e)exdilaien tabte
Nastes- slave UK fiplop
Let us doad he circut diagram and
gie Sym boL f JK fup-flop

Touh Table
K Qn Remanks
Prevos State
CIK 0
n
Reset
K
Set

ToCCnlE

Disaduantage of TK Hip- flop


Patblem RACE AROUND
CoNDITON
OCcUYS en J=l, K=1
During Kace 9cund
Condihon Jhe
many times n p Lo change
Singe Clock

Level rggerd

'nput is chon_ing input is not


K 1 chegi

NoE Race
arourd Condi Hon Rao aound
Condiw en

-0 ini ally
his is
not
S is Rocingtoggs
ON
ON
How to Solve Rae nound Condihon in JV ip oP

Edge tigjevved JK fip Jtop

Masten slave JK fip- flop level nggered)

Masten- Slave flip-lop


Mastey
slave

J
CLK

Circuit diagrom

Maste lawe

J Q
ClL
K

Logo symbo
Masten- Slawe
tip-f®p oTKing
+is a
basically Combinah'on o thoo
in
TK
K fip- fop
fip- flop
Sesuen
Conneced togehe
One acks
Combinah'on Ou
Out ok
ok these
these
Masten and ohon
act a a
Jhe oulpu o Slave
Masten s
O he uootwo inputConnected
Slave Jhe
ovpuy o6 Slave input
input OFMasten isfed back to the
flip-ftop. Jhe cio CW
Clo C
Connecled fo Masten Lohenea, pulse
pulse is
Conne cled to Slave
invenred Cloc pulSe is
Tmina diagsamn Masten- slave fiip flop (T1, L-1)

CIK

&

Hene Raco
Hene, Kaa around Condiin s eliminateed
0
loPLC RE GiISTE RS
egisteys te uSed to Sove goop ofbis
1 bit Memo cell
egistens Qvte Can cading of (flip- flops)
To incvease have use
Jhe
sBosage mpacily,
Storage we to
roup ofp-ap
Gisoup f fis Knouwn a Registen
fos 4 bils dala Stomge 4 flip- Flops oil be used
for
for 8 bis dala Stovege 8 fip flops oil be used
Sn gene.v,
or n-bit stosage N gis FF s1s Tequ red.

Classikicahon og Kegistens
iDeperding upon inpu and output
SI SO 'Seuial In Seriad Out
SIPO Seual in Pascullel Out
P IPIPo Panallel in panalle out
PI{0 » Panallel in Seyal 0 ut
SISO
SIPO
Daa out

Data
Dahin Out Dob in

Pi Po PIsO
Datla dut
ZZ Data out

Daa in T 1T
Da in
Depending upon Applicah ons
Ohan You udont Your daBa to shigt
Shit oe gi sten s

6 Srosaqe TealstenS 0hon you un wonk your dala lo sloUe

Let us shudy Applicahen para format

OSHICT REGIST ER (Senial in Sevial Out)

Seual in

Senial
Din D D Do Out

FP2 FFO

CIK

we haue use fouv D- fip flops, So We Can SoYe 4 bis o( daa


and ClocK C) s
appliedto al
Simultaneouly. Smihaly Cak
assume Q o = 0000 and 9 anF to Store thne

mumber 1111 in the Shi6 egistest.


Step-1 ue iL put the Lse at D st
MST LSB
and input Values íL be
Nex
Da D
10 . 0 1
110o 1
11 1 0 1 shihnA
1 1 1 1 1 1 11
Timing dagsam

DIn

l
o 000 lo00 o0

We need 4 Clock pulses to Shore 4bis o 6 data.

|T R
Singte conduetr Seal in Sealal out

Louo CS

Move example: let


One us Store LOo
0Ol
daka witL be entered in us dir
D2 D
ini hally 0 0 0 0 0

1S CIK 1
0 O

grd CIK 0

Cl 1 O 1
*Sn Serial In Senicd Out, g O Q,interad Oulpuls
tex 4 Cloc pulse e uoil gek only n extennal oukpula
tWeneed Move Clocu pulse to ge my dala out
dnadback
Can be Solved by

(2)(SHIPT REGISTER SERIAL N DA RALLGL OU+)

Da Do
9
FF F >
Ffo
CIK

Panallel bulput>

SHIPT REGISTER (Panallel in panallat Out)


Panall inpu

03 Do
Ff FF
T Pfo

Parnalll oupu
XOnly 1 CloC puhe s
Yeruived fast dala Shoveuge
(SHIPT REGISTE R C Panalld IN SERIAL
Panalls Out)

Panalll in
Bi
Shit/Load

Do Seniad
FFo t
t oup

CIk
Thee aJo too mode in uohich this C Can wOTK

Load Mo do for Bt Locdiny the daa,


2) Shi6 MOdo for shithn tha d ecra.
aa

Locd Mode Put ZERO o'


Shi Mode Pu ONE
OPiC CoUNTEE
Countevs Can
no. Cluv
To COunt

oeuenay divide
Time1s
lo e n e nte

Some Impos anF pointS


hen
used,
6 n no. oFlip-flop
Counte
stretes-> Modulus o6
N og

usedin Counte is (a (lod as mocdel o


Slahes
i-eNo. Of
Jha Counten J 000

3, no.
o t Gip- ftop= 3
max imum 6 Shtes N 2 84
Sates

Mod- N
Countenn
Ovhpul 0ovefom
inpu requne)
o appied tawefom

Mpd-N Mod-P
Counte (oLn NxP
Depending upenn Clock plses pplied Countens (UC 6
C6

Aype
ynchonous Counte
A synchonou Counten

CLOCK

SYNCHRONOvs AsyNCHRON0US
.
Aflip-flops applied oih
DilenonF FFs ae appl'ed
Same clocK ih difforenF ClockKs
Faste Slooes1
Any Coun Sequen Con hixed Count Senon ire
be
designed Up and doon Counrex
e RING CoUNTER
RIPPLE CoUNTERs
1JoHNSON CoUNTE R
Jhus2we ae
going to S
tudy
to all flip-4loy
> cleck is no
ivcn Simullaneounly
O. (3 BiL AsyNch donous UP Counte
om 00ej to
Stant Ccuntea
we oit
Count fon highen

LSB) Counte oWpw


(MSB)

(A)

KA

Fi
Fig. 3 bit
Asynchwnou Up Counte.

iming diagsam: Ja= I, a = 1)

CiK

1s dong

w Jub o
A iS done
A
L
000>001 0 l0 o

imad
O 1
ival 3 4 5 , 6 P
M3 N 8 to to SBate om 0 to
Maimum Count
XWe
4 Bi AsyNCHROnNous CoUNTE Rs (UP)
Can usc. T-fip-flop also inshecd o JK fup-floP
(LSB p (MSB

1- 1 1Te 1To
CIK

R.4 bi ynchOr Up Canli


c UU

Oo00
Oo00 (00 oL
0L00LO 0oI 0 10 0ol0l OL II00ollooo lood LoLo lo i(loo.

01>2 ,3 S6
67 89lo1 23.
14 15.

N-4, N a a 16 Stue.
Ymaximun Coun vpo a-I »
- 15
pom hiqhe to l0we
MOD-8ount 3 Bit As Nchono DoWN ounlet
Counte
Jheie ae 2
pussible waus o design DOnN Countes trom UP Counte
1 ay Counte outpuls

TA
CIK Te Te Ge

OR
2rd

TB Te
CIL

Counte oupus 7

CIK
UUririi

ee

10
dOun COunfes
Asynchroun
. Design | MoD- 6 Counte using 3 bit dipple bunten

So MOD-6 no. o6 State 6


Count 6-1 5
,Maximin
Counte it Court 600>0
Oun
Ous MoD- 6

O10 2
sae
LO1- S
t design he Counten
Qc(MSe)
1 -JA 1 6 1
CI
Ke Ke
CiR
eLA
Qc
3bit Asynchrow (sippl
Counte) wi Count

Shas
0 9 don 0Cnl Jhis Acte
How Desig
Design YNCHpoNoUs Couen s

GPueshon Design &bit Synchm nous Countes (up)


So cus aKe.JK fhp-bpP nd 10. 06 6lip- 6lop
dvquired oitt be a

Synchoncua
Counten
CiK
XY have. to follow 4 s eps to nd out mput value
ExCitahonm table f Ff Stae Diagoam
GnGn+ JKK up tountest
X s sep 00
X

xo 3ra
st
( 2 bit

Civcuil tri lakon labe

4K-MA P
NexF Shok inpu inpud
Prenear 24
shrul
O x
1XI
1 O

2- 1 k=|
Fincd CiYcit iaqoam

CK
1
Note: O6 tha above
Yo You want to desia doon Counte
example 3hen Jus Chongethe di in S a e diajre

(00
(2 bit
Stat
(o1
10
doon CounBes1*
Note 1 Yo Oant to design 3 bit up or down
Synchronou Covnte Jhon folo Jha sama Po Cod
pruod
000

oo1) Up coun tes


do
CoulL (3 biy
(I10
(010

- ou)
No,
Now, we wi shudy tudo Specia oynchronDs Counte
RIN G CouNTER
OHN SON COUNTER or Toisted Ring, Swich tai Counten)

(O RING CoUNTER 7

tis applicakon o shåt degistei (uoir eedhuK)


0 i nTing
g Counten only one FF o/p is logic 1 and I
uoill 0 Ieute.
No. o6
amon all Loith clo c
Sate, N m (no. o6 6tip-6to p)
4ip-top is wed 4 Stale o Let
eaback

PR
D2

Cl L
Oveniding
inpul
ORI CLW
&,
oU X 1 0
O1 00
o 1 00 unique Stun
1
1 O

1 O
(2 JouN SON CoUNTER
s also appli cahon O6 Shi egiste
NO 6&
Shate (N): 2 n 2x10
2 of fip. 6tops

D
Do
CI

CLR
La
CLRCLK
0
1

0
1 1
1
8 States.
1 1
11
O
1

O0 again Stanteol
S

You might also like