You are on page 1of 19

Ms Sandhya Rani Dash

"#$% &' ()*+,-./,)-.0 (,1(",/ 234,5-




4%678%769

S.1 Intiouuction
S.2 0bjectives
S.S Coue conveitois
S.S.1 Binaiy to Excess-S Coue Conveitois
S.S.2 Binaiy to uiey Coue Conveitois
S.4 Paiity ueneiatoiCheckei
S.4.1 Betection of Eiioi 0sing Paiity Bit
S.4.2 Besign of an Even Paiity ueneiatoi
S.4.S Besign of an 0uu Paiity ueneiatoi
S.S BCB to 7-Segment Bisplay Becouei
S.S.1 Besign of BCB to 7-segment Bisplay Becouei
S.6 0nit Summaiy
_____________________________________________________________________________________________________
&:; ,#%6<=78%$<#

In uigital system a laige vaiiety of coues in binaiy foim aie useu to iepiesent a given
uatatextany laige no. giaphics. Some of these coues aie BCB, XS-S, uiay coue etc.
which we have alieauy uiscusseu in eailiei units. The coue conveision is iequiieu foi
secuiity iegions, foi simplei haiu waie implementation to ieuuce switching activities,
anu also it is neeueu to use the output of one system as the input to anothei. Foi
example: The complementaiy opeiation will be easiei by using the XS-S coue anu also
the haiuwaie implementation will be simplei by using this coue. The giey coue is useu
to ieuuce the switching activities. Theiefoie, coue conveision is a stanuaiu opeiation in
uigital systems. Foi this opeiation a coue conveitoi ciicuit is inseiteu in the systems.
Foi this opeiation a coue conveitoi ciicuit is inseiteu in the systems. It is a logic ciicuit
that conveits the uata piesent in the one type of binaiy coue to anothei type of binaiy
coue. The vaiious coue conveitois can be uesigneu using gates, multiplexeiue-
multiplexei. Bowevei, to peifoim these conveision opeiations some NSI ICs aie also
available. Some of the most commonly useu coue conveitois anu theii uesigns
pioceuuies aie uiscusseu in this unit.


_____________________________________________________________________________________________________
&:> )?@98%$A9B

Aftei going thiough this unit you will be able to:

i) Explain the piocess foi conveiting binaiy to X-S anu binaiy to giey coues

ii) Apply EX-0R gates foi conveision between binaiy anu giay coues

iii) Explain the concept of piimaiy anu implement a basic paiity ciicuit with Ex-0R
gates

iv) Besciibe the opeiations of basic paiity geneiating anu checking logic

v) Besign a logic ciicuit of BCB to 7 segment ue-couei.

____________________________________________________________________________________________________
&:C (<=9 (<#A96%<6B

Theie aie two types of uiffeient coue conveitois.

&:C:; +$#D6E %< 9F89BB GC 8<=9 8<#A96%96

Let us uesign anu implement a 4 bit binaiy to XS-S coue conveitoi

The block uiagiam anu the tiuth table to XS-S coue conveitoi is as follows




Tiuth table of coue conveitoi is as follows:

INP0T Binaiy 00TP0T XS-S Coue
bo b1 B2 bS eu e1 e2 eS
u u u u u u 1 1
u u u 1 u 1 u u
u u 1 u u 1 u 1
u u 1 1 u 1 1 u
u 1 u u u 1 1 1
u 1 0 1 1 u u u
u 1 1 u 1 u u 1
u 1 1 1 1 u 1 u
1 u u u 1 u 1 1
1 u u 1 1 1 u u

The K-map to obtain a simplifieu Boolean function foi each output oie uiawn in the
figuie given below. These Boolean function aie simplifies in sum of piouucts methou.
Each of the 4 Nap iepiesents one of the foui outputs of this ciicuit as a function of the
foui input vaiiables.

i.e
eu, e1, e2, eS = f(bu, b1, b2, bS)

ThemeantermaremarkedasIsandthesixdontcaretermsaremarkedbyx





&:C:> +$#D6E %< 56DE (<=9 (<#A96%96

Let us uesign anu implement a 4 bit binaiy to uiey coue conveitoi

The block uiagiam of a 4-bit binaiy to giey coue conveitei is as follows. It consists of 4
inputs (bS, b2, b1, bu) iepiesenting 4 bit binaiy numbeis anu foui outputs (uu, u1, u2, uS)
iepiesent 4 bit giey coues.




The 4-bit binaiy anu the coiiesponuing giey coue aie iepiesenteu as follows:

INP0T Binaiy 00TP0T uiey Coue
bo b1 B2 bS uu u1 u2 uS
u u u u u u u u
u u u 1 u u u 1
u u 1 u u u 1 1
u u 1 1 u u 1 u
u 1 u u u 1 1 u
u 1 u 1 u 1 1 1
u 1 1 u u 1 u 1
u 1 1 1 u 1 u u
1 u u u 1 1 u u
1 u u 1 1 1 u 1
1 u 1 u 1 1 1 1
1 u 1 1 1 1 1 u
1 1 u u 1 u 1 u
1 1 u 1 1 u 1 1
1 1 1 u 1 u u 1
1 1 1 1 1 u u u

Fiom the tiuth table, the minteims foi the giey coue output can be wiitten as:

uS= (8, 9, 1u, 11, 12, 1S, 14, 1S)

u2= (4, S, 6, 7, 8, 9, 1u, 11)

u1= (2, S, 4, S, 1u, 11, 12, 1S)

uu= (1. 2, S, 6, 9, 1u,1S, 14)

The above expiession can be simplifieu using K- map methou as shown in the below.


The expiessions that we obtain fiom the K-map can be implementeu using EX-0R gates

as shown the figuie given below:


So the conveision can be achieveu by using thiee X-0R gates as shown above.

(H98I J<76 K6<L69BB ;

1. Befine a coue conveitoi logic ciicuit

2. Bow uo you conveit binaiy numbeis to coiiesponuing giey coues using a conveitoi.

S. Bow uo you conveit a giey coue numbei to coiiesponuing binaiy numbeis using a
conveitoi.
_____________________________________________________________________________________________________
&:M KD6$%E 59#96D%<6N(H98I96

Binaiy uata, when tiansmitteu to anothei is always coiiupteu with noise that can altei
its 1s to us anu vice veisa. We aie not getting the coiiect woiu at the ieceivei. So to
uetect such eiiois, an extia bit calleu the paiity bit is auueu to the tiansmitteu woiu. At
the ieceiving enu the no. of 1s in the woiu ieceiveu aie counteu anu the eiioi, if any, is
uetecteu. If the checkeu paiity bit uoes not coiiesponu to the coiiesponu to the
tiansmitteu one. The ciicuits that geneiate the paiity bit in the tiansmittei is calleu a
paiity geneiatoi. The ciicuit that checks the paiity in the ieceivei is calleu a paiity
checkei.
Theie aie two types of paiity bits:

i) Even paiity ii) 0uu paiity
3A9# KD6$%EN)== KD6$%E

If a binaiy woiu contain even numbei of 1s then it is calleu even paiity. Anu ouu paiity
means the in-put woiu contain s ouu numbei of 1s. A paiity bit of u oi 1 is auueu to the
massage bits such that the total numbei of 1s in the woiu is even foi even paiity anu
ouu foi ouu paiity uepenuing on the system. Foi example: 1u1u11 has even paiity
because it contain foui 1s. This woiu iequiies a paiity bit u in the most significant place
to give even paiity. It can be wiitten as
u 1u1u11
Paiity bit

The above woiu iequiies 1 in the NSB to give ouu paiity. i.e.
1 1u1u11
Paiity bit

The basic piinciple useu in oiuei to check foi oi to geneiate oi to geneiate the piopei

paiity in a given coue, is :

"#$ %&' ()*%+$,-+)*., /-++*$%0 12 -. $3$. .&'4$+ 12 5% *% -67-8% 9: -.) ;#$ %&' 12 -. 1))
.&'4$+ 12 5% *% -67-8% 5<

Theiefoie, to ueteimine if a given coue has even paiity oi ouu paiity, all the bits in that
coue aie summeu by an EXCL0SIvE-0R gate. It shoulu be iemembeieu that a given
system opeiates with eithei even paiity oi ouu paiity but not both. So a woiu always
contains eithei an even oi an ouu numbei of 1s.
&:M:; 29%98%$<# <O 966<6 7B$#L PD6$%E ?$%

At the ieceiving enu, if the ieceiveu woiu has an even numbei of 1s in the ouu paiity
system oi an auu numbei of 1s in the even paiity system, it implies that an eiioi has
occuiieu. The methou useu to uetect such eiiois is,
take the auuition of bits in the ieceiveu woiu
if the sum =u foi an ouu paiity system oi 1 foi an even paiity system, an eiioi is
uetecteu. Because the mouulo sum of 1s foi an even paiity is always =u, anu that
of an ouu paiity is always = 1. Foi example: summing of two bits anu summing of
foui bits can be foimeu by 1 anu S EX 0R gates iespectively, which is as shown
in the figuie given below


When the numbei of 1s on the inputs is even, the output X is u(Low). When the numbei
of 1s is ouu, the output X is 1(Bigh).
Now let us uiscuss about the uesign of a paiity geneiatoi.
&:M:> 29B$L# <O 9A9# PD6$%E L9#96D%<6

Let us consiuei 4- bit massage which has to be tiansmitteu with an even paiity bit. The
BW iepiesentation of a 4-bit even paiity geneiatoi is given as follows:

The 4-bits (bu, b1, b2, bS) constitute the massage anu aie the inputs to the ciicuit. The
paiity bit pu is the output. Foi even paiity, a paiity bit 1 is auueu such that the total no.
of 1sin the 4-bit input anu the paiity bit togethei is even.
The tiuth table anu the K-map foi even paiity geneiatoi aie shown in the figuie given
below:



The K- map consists of essential piime implicants. So the S0P output is

__ __ ___ __ ___ __ ___ ___ ___ ____ ___ ____ ___

0
= b
3
b
2
b
1
b
0
+ b
3
b
2
b
1
b
0
+ b
3
b
2
b
1
b
0
+ b
3
b
2
b
1
b
0
+ b
3
b
2
b
1
b
0
+ b
3
b
2
b
1
b
0
+ b
3
b
2
b
1
b
0

_
+b
3
b
2
b
1
b
0

_ _ _ _ _ _ _ _ _ _ _ _
= b
3
b
2
(b
1
b
0
+ b
1
b
0
) + b
3
b
2
(b
1
b
0
+ b
1
b
0
) + b
3
b
2
(b
1
b
0
+ b
1
b
0
) + b
3
b
2
(b
1
b
0
+ b
1
b
0
)
_ _ _ _ _ _ _

0
= (b
1
b
0
+ b
1
b
0
) (b
3
b
2
+ b
3
b
2
) + (b
1
b
0
+ b
1
b
0
) (b
3
b
2
+ b
3
b
2
)
_______ ______
= (b
1
b
0
) (b
3
b
2
) + (b
1
b
0
) (b
3
b
2
)
_ _
[C + C = C]

= (b
1
b
0
) (b
3
b
2
)

0
= b
0
b
1
b
2
b
3

1herefore, Lhree x C8 gaLes are requlred Lo deslgn Lhe even parlLy generaLor. 1he loglc

dlagram of Lhe above expresslon ls as follows

4-bit uata input 0ut
put
bu b1 b2 bS Pu
u u u u u
u u u 1 1
u u 1 u 1
u u 1 1 u
u 1 u u 1
u 1 u 1 u
u 1 1 u u
u 1 1 1 1
1 u u u 1
1 u u 1 u
1 u 1 u u
1 u 1 1 1
1 1 u u u
1 1 u 1 1
1 1 1 u 1
1 1 1 1 u


To geneiate an even paiity bit the foui uata bits aie auueu using thiee X 0R gates. The
sum bit will be the paiity bit.
&:M:C 29B$L# <O D# <== PD6$%E L9#96D%<6
Foi ouu paiity, the paiity bit P is geneiateu so as to make the Bu of 1s in the ip bit woiu
incluuing Pu is ouu. 0R
The up of an ouu paiity geneiatoi equals to 1, when the numbei of 1s in the uata bit is
even. To geneiate an ouu ouu paiity bit the uata bits aie auueu using X-0R gate anu the
sum bit is inveiteu.
29B$L# D MG ?$% )== KD6$%E 59#96D%<6
Let us consiuei a 4 bit massage to be tiansmitteu with an ouu paiity bit. The block
uiagiam anu the tiuth table of an ouu paiity geneiatoi is shown below



4-bit uata input 0ut
put
Bu B1 B2 BS Pu
u u u u 1
u u u 1 u
u u 1 u u
u u 1 1 1
u 1 u u u
u 1 u 1 1
u 1 1 u 1
u 1 1 1 u
1 u u u u
1 u u 1 1
1 u 1 u 1
1 u 1 1 u
1 1 u u 1
1 1 u 1 u
1 1 1 u u
1 1 1 1 1
__
The foui bits constitute the massage anu aie the input to the ciicuit. The paiity bit pu is
the op. Fiom the tiuth table we see that P= 1, when the numbei of 1s in the ip woiu is
even.
Now let us ueiive an expiession foit the ouu paiity geneiatoi by using the K- map.





Fiom the k map we see that no minimization is possible. The expiession foi the paiity
bit is implementeu as it is.

__ __ __ __ __ __ __ __ __ __ __ __ __ __ __

0
= b
0
b
1
b
2
b
3
+ b
0
b
1
b
2
b
3
+ b
0
b
1
b
2
b
3
+ b
0
b
1
b
2
b
3
+ b
0
b
1
b
2
b
3
+ b
0
b
1
b
2
b
3
+ b
0
b
1
b
2
b
3

_ _
+ b
0
b
1
b
2
b
3

__ __ ______ ______ __ __
= b
0
b
1
(b
2
b
3
) + b
0
b
1
(b
2
b
3
) + b
0
b
1
(b
2
b
3
) + b
0
b
1
(b
2
b
3
)
______ _____
= (b
2
b
3
) (b
0
b
1
) + (b
2
b
3
) (b
0
b1)
________________
= (b
0
b
1
) (b
2
b3)
__ _____________

0
= b
0
b
1
b
2
b
3

1hus we see from Lhe o/p LhaL, lL ls noLhlng buL Lhe complemenL of even parlLy generaLor.
8y puLLlng an lnverLer aL Lhe o/p of an even parlLy generaLor we obLalned Lhe odd parlLy
generaLor. 1he loglc dlagram of a 4-blL odd parlLy generaLor ls shown below


"#$%&' ()*+,*$

1he 74LS 280 ls used as a parlLy generaLor as well as a parlLy checker. 1hls devlce can be
used Lo check for odd or even parlLy on a 9-blL code (8 daLa blL and one parlLy blL) or lL can
be used Lo generaLe a parlLy blL for a blnary code wlLh up Lo 9 blLs. 1he nlne l/ps are A Lo l
andtherearetwoo/psevenandodd.Whenthereisanevennumberof1sonthe l/ps,
the even o/p is high and odd o/p is low. The block diagram of the 74LS 280 is shown
below



When this uevice is useu as an even paiity checkei an eiioi occuis uuiing the
tiansmission of massage bits, if the paiity of 9 bits ieceiveu is even, since the binaiy
infoimation tiansmitteu was oiiginally ouu. 0p of the paiity checkei i.e the Even op
goes L0W anu the ouu op goes BIuB, when an eiioi occuis i.e when the numbei of
1s in the 9 ip is even.

When this uevice is useu as an ouu paiity checkei the numbei of ip bits shoulu always
be 0BB. When a paiity eiioi occuis, the ouu op goes L0W anu the even op goes
BIuB.

3FDQPR9' 29B$L# D MG?$% <== PD6$%E 8H98I96 8$687$%

Let us consiuei the thiee bit massage anu the paiity bit is tiansmitteu to a paiity
checkei ciicuit. The tiuth table foi the ouu paiity checkei ciicuit is shown below

4-bit uata Receiveu Paiity
Eiioi
Check
A B C P C
u u u u 1
u u u 1 u
u u 1 u u
u u 1 1 1
u 1 u u u
u 1 u 1 1
u 1 1 u 1
u 1 1 1 u
1 u u u u
1 u u 1 1
1 u 1 u 1
1 u 1 1 u
1 1 u u 1
1 1 u 1 u
1 1 1 u u
1 1 1 1 1
The K map foi the function C is coiiesponus to the K- map of the ouu paiity geneiatoi as
given above.
So the function can be expiesseu with equivalence opeiation as follows
_________________
C= A B C P

Now let us uiaw the logic uiagiam foi the paiity checkei.




It consists of thiee two input equivalence gates. The above ciicuit can also be useu as
paiity geneiatoi, if the input P is peimanently helu at logic u anu the op is maikeu P



(H98I J<76 K6<L69BB >

4. Bow uo you explain a paiity bit checkei.
S. Besign a 6- bit ouueven paiity checkei using IC7418u
6. Biaw the logic uiagiam of IC77418u paiity geneiatoi anu explain its opeiation with a
tiuth table.

&:& +(2G%<GSG49LQ9#% 2$BPRDE 298<=96


A BCB-to-7-Segment Bisplay Betectoi is a combinational ciicuit useu foi uisplay of the
uecimal uigits, u thiough 9. This type of uecouei accepts a uecimal uigit in BCB anu
geneiates the coiiesponuing 7-segment coue in a uisplay inuicatoi. A numbei of NSI ICs
aie available foi peifoiming this function.
The op of a 7-segment uecouei is shown below



Each segment is maue out of a mateiial that emits light when cuiient passeu thiough it.
The most commonly useu uisplays aie LEBs anu incanuescent filaments. The seven
letteis a to g iotate clock wise fiom the top of each segment anu selects the
coiiesponuing segment in the uisplay uevice.

(Note: incanuescent uisplays aie useu in cash iegisteis anu othei line opeiateu uevices,
wheie powei consumption is not ciitical) The incanuescent uisplays aie light bulb
filaments as the segments. When cuiient is maue to flow these filaments, they become
hot anu thus glow.

The numeiic uesignation of the uecimal uigits is given below:



By illumination of vaiious combinations of segments the numbeis u-9 can be uisplayeu.
Foi instance, to uisplay 1, the segments b anu c have to illuminateu to uisplay S, the
segments a, b, c, u anu g have to illuminateu by piopeily foiwaiu biasing the LEBs in the
selecteu segments.

Theie aie two types of LEB uisplays.
The common cathoue type
The common anoue type
In the common anoue type, a low voltage is applieu to an LEB cathoue. This allows to
flow cuiient in the uioue anu light is emitteu.
In the common cathoue type, a high voltage is applieu to an LEB anoue; This causes the
cuiient to flow anu piouuces the iesulting light emission.


&:&:; 29B$L# <O +(2G%<GSGB9LQ9#% =$BPRDE =98<=96

A BCB to 7-segment uecouei can uesigneu using logic gates. The block uiagiam of the
uecouei with 4- BCB ip (bu b1 b2 bS ) anu seven ops (a, b, c, u, e, f, g) is shown below



The tiuth table foi such a uecouei is given below

+(2 ,#P7%B SG49LQ9#% )7%P7%B
?T ?; ?> ?C D ? 8 = 9 O L
u u u u 1 1 1 1 1 1 u
u u u 1 u 1 1 u u u u
u u 1 u 1 1 u 1 1 u 1
u u 1 1 1 1 1 1 u u 1
u 1 u u u 1 1 u u 1 1
u 1 u 1 1 u 1 1 u 1 1
u 1 1 u 1 u 1 1 1 1
u 1 1 1 1 1 1 u u u u
1 u u u 1 1 1 1 1 1 1
1 u u 1 1 1 1 1 u 1 1

The K-map is useu to simplify the logic expiessiuons coiiesponuing to 7-segments. The
entiies of the ip combinations fiom 1u-15 can be termed as dont caie combinations.
Now fiom the tiuth table, the logic expiessions foi the 7-segment can be wiitten as
a =
m
(0,2,3,5,6,7,8,9)+
d
(10, 11, 12, 13, 14, 13)
b=
m
(0,1,2,3,4,7,8,9)+
d
(10, 11, 12, 13, 14, 13)
c=
m
(0, 1, 3, 4, 3, 6, 7, 8,9)+
d
(10, 11, 12, 13, 14, 13)
d=
m
(0,2,3,5,6,8,9)+
d
(10, 11, 12, 13, 14, 13)
e=
m
(0,2,6,8)+
d
(10, 11, 12, 13, 14, 13)
f=
m
(0,4,5,6,8,9)+
d
(10, 11, 12, 13, 14, 13)
g=
m
(2,3,4,5,6,8,9)+
d
(10, 11, 12, 13, 14, 13)
1he above expresslons can be slmpllfled by uslng k-map meLhod as glven below.

Fiom the above k-map
_ _
a = A + C + 8u + 8u
_____
= A + C + 8 u

Slmllarly, lL can be solved for Lhe ouLpuLs b, c, d, e, f, and g

()*+, -./$ "$.0$*11 2

7. WhaL ls lncandescenL dlsplay? SLaLe lLs use.
8. Lxplaln brlefly 8Cu Lo 7-segmenL decoder
9.Designthelogiccircuitforthebo/pofaBCDto7-segmenL decoder wlLh acLlve low o/p

&:M "#$% 47QQD6E

ln Lhls unlL we have dlscussed abouL some meLhods of uslng comblnaLlonal loglc clrculLs Lo
converL from one code Lo anoLher called code converLor. Code converLors are Lhe loglc
clrculLs, whose lnpuLs are blL paLLerns represenLlng number of characLers ln one code and
whose ouLpuLs are Lhe correspondlng represenLaLlon ln a dlfferenL code. ln mosL dlglLal
sysLem Lhe probablllLy of occurrence of a slngle blL error ls very small. 8uL lf Lhe error ls
undeLecLed, Lhen lL can cause serlous problems ln dlglLal sysLems. So Lhe parlLy meLhod of
error deLecLlon ls explalned ln Lhls unlL. A parlLy blL ls aLLached Lo a group of lnformaLlon blL
ln order Lo make Lhe LoLal number of 1s elLher even or odd. 1he concepL of decoders are
also lnLroduced ln Lhls unlL. As you know LhaL Lhe funcLlon of a decoder ls Lo converL n-lnpuL
blnary code ln Lo a correspondlng slngle numerlc ouLpuL code. 1he funcLlon and deslgn of a
7-segmenL dlsplay decoder ls descrlbed ln Lhls unlL.


34%& 546 57*$+%1*

89 Besign anu complement a 6-bit binaiy to giey coue conveitoi

2. Show the logic iequiieu to conveit a 6-bit binaiy to XS-S coue conveitoi.

S. What is a paiity bit geneiatoi.
4. Biffeie ntiatebetween an ouu paiity geneiatoi anu an even paiity geneiatoi.

You might also like