0 ratings0% found this document useful (0 votes) 42 views50 pagesDLD 2nd Part - UNIT-1 - BINARY SYSTEMS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
yn
VOANT- T
wut
Buon -Qerens
x Ligilel qleeos =
=> A syslin which | handles digttal or discselé information
that we called digital systenn.
> Disenete information és pestricted 0 a finite nucnber
of elements. a
2 tinuoes or disenefe
rafornation % > etther Con
= Genenalte
ox continuous oF iofinile
in natare-
— & systero which handles analog
information that is calle — analog systero-
ifect systems ane
= Compare Wilh analog systems dig
more. | -Plextble because 9b Cited nuaber of element.
Prdvantages
= as
5 Easier design.
—> Infornotion sic
> More accenac¢-
— Aigikel civeetls
Arpplicatians =
> Agitel systems are used
transactions » traffic: contol ,
monitoring , Jnlernet ete:
> Ke have digital telephones » drgital television , digital cameras,
and digital computers °
— In ctigikel syste genenatt diceneté elements are digits:
$
_> tome we use two disaneté elements called binang¢
digits + ; tig Uy
=A ph has two values & 1.
> Aisunete elements of information are represen teal coi
groups of pile catlect binary code.
C5 tatnis chapler we cao study the
concepts -
wv _ Dlurnbes Syste,
fol in cigiteel compu lexs
—> Number systruus aye use
_5 the knowledge, of digilal systems is necessary to peurforcn
easily understandable cesithette ope dections .
— man, aigiter( syslams are veguired wilh various ctigikel
codes to handle. fhe cata which ts — $9 the Poven of aumbers
)
alphabets and — symbols -
e, 1s ensyp
less effected noise -
are
Sn communication , bustnes $
medical treatment , wealKer
binary digit caltect abit.
various binaryom * XN
es “8 aie syste there\is aD ordered seb of syrobols
o> theneane two lppes of number systems - -
Uy Pocittonal, nurber systerns
ww Non Positional oumber systems:
—> Tn a positional number sysleny the position of each
digit of a number indicates the significance ‘to be
attached to Fhat ctigik-
non - positional number system » adigit of a nunber
significance of ite position.
number system is FOMAD
nc
len evo ts not present. So,
Ine
does nob tdicate any
> Example -for 00- positional
numerical syste. tn this sys
ie is diffrcalt to use:
-= most wicely usec system is positional number system.
-> A ouenber is made eup of a collection of aigits and ib
has two pants - integer and fraction. Bolh ane sepenated
by & radix point ()-
-s A positive. qumber
N= Aya Una. > ~~
N can be vepresented be
- YA, + AYAy ---++ Am.
a note of ctgile io fokeger pant
ms ney Frattional part.
—> Number systerns coush conkato a waclix or base . This
defined as He” weight of a digit which clepends on ifs velativ
position wttBin the aunber.
dix of @ nuenber system 1s the. number of syenbol
— Aloo, wa
usec in he number system:
= posttive. mucnber to the posttional nunber s Sle
, ~”
with “base b can be vepresented by
Np= Ob" 0-2 t - 7
Oe oa 4 Ana BM We Ab Hb + abla a.bi---
were Qn % called He leash Signiftcank + Qin 5?
Cry lame wee past ee es
°
Recirnal ntusnbes SySIeeO
> -In clay to cay tife, , we can use. dectmal numbes
system. “Et is ‘a posittonal. number system. :
tue. base ox waclix of His s slem’?s 10+
—s The system contafo 10 unique symbols to represest
@ a number 2 they ane. 0,1)213, 4, o6 e,8,9 P> All tye. numbers iy the system ave \
asi hese. digits. J are represented ©
swe can express any clectmal number % unile , ters,
hundreds , Hrousands and so on-
— Afler seaching- 11 the. decemal nucobes sysken , we
fore combinations of decimal digils (ike 10, I) ines
> far example a dectmal number 56°72 can be
vepsesented b
faa ¢ 3-1 3-2 33 a a (on
(456-78) = YxIS + SeIO + EXIO + BKIO + AK
1
eee O Omatg Sot b+ 0-9+0°028
ied (78_, wadix pow:
Hene omsp ts 4
isp ts &
—> Belous fig shows Me aogils ands weights Tepresen~
ted as a power of 10 ; i“
' °
>
lo to fo P10
ot GLE
(——yadltx poinr.
Bioary Number LYSE ay GE
ea nunbes sys 25 enataly used 10 clegital
computes and % Aegikel electronics « :
_> rh requires only 00 digits tart Ov a |
> the base oF radix of the syskem roemrgs
positional number system
7 the pasiton of 4 ord, 19 & nucober @ndicates IF
weight or value. willis the. aumber -
7 for example. a binax aunber lean be st presented by.
lotlo-tlol » te walue, can be. caleu lated by powers ot
Qe bey
5-1 S-2 a3 5-4 ss
(lono-ior), = 1x2 +Or> + x2 pix D +OKD +
3 ixat
tele ie Dt ork
le : 0-062S
a loros Yt otl + Ort 2ST O 1254+ 62
2 (83-8875 doa J! —
--- 22 2S 3 Py DB ---s
[TTT LI
Octal surnber System
CR Ua
7 Te base or radix ok the octal system es etghb-
> lal symbols axe 0 to # Howie num 8 GI never
appear + “Ate F we will vepresent 10 & I! ancl so on.”
> Tn he octal number systero, each number wekght Ps
expressed aS a power of B-
--- gr gl Pa z Rae eee
msp | [ | usp
oe
toager pare froctiod pash
CEH (93:3Dg —7_valicl octal aumbey r
i ba toatial ocla! VUMHETY Peles .
WA anit tee “cher aro used to UNIxf LINUE fdes
Here decimal nore SYSee 6
ite. base or wadix of this sysGm % 16
yt 2134) S16, FB IT A,B, CDE FF
wic ounber system because.
— Syrobols are
so called as alphaaune
(Las numbers:
> It ® al
4k contains beh all habets as wel
> Each auonber ,weaghl fs expressed as a power 00 16
wo ge 1816? 6 iB”
oo [| [UL [i
Exir BQH of \ADE- pie
nucobeo. syslems used %o microprocessors
= ais type of
an entero contgolle rs:
Relating befw2er decimal , binary , octal & tHexadecémal }—
I Binary | octet] [Hexadecinal |
Recemal
° 0000 O S
' ooo! l t
2 e010 2 z
3 ool 35 3
4 0100 4 4
Ss O1ol s S
6 allo 6 6
* Ott w -m
& (ooo 10 8
a 1oo[ tt ¢Obst number sys
numbers can be represented as
~e In ang number syste, Any
Np = Arab
Here nt Ba quobese
chosacter(syrobols)
@ (bina) oot
3 C erenon) ore
G Quinary) ol?
5 0, Ue 34
6 . Or aS
e 0 (e131 Sy §
8 (octal) 0, te BME SY VF
q 0218 USO HE
10 (dleezeatl) 0 try U7 91 18D
0) 1%) By He Hy 6y BLY HK
p11 73) Hy 96, 3
Le(ueraacel ory 6,30 ee
Alvebe_ Syslero_ConveSED a
Talely wa use binary number S75
> In digital syste wh
Ly -- 22+ Mob"
bis we base or taclix
> Tn our eveayday (ife-
vepnesent— quantities «
wy thenefore » ‘it fs necessary to convent dectmal number ‘als
4 smoay and —_ ice Wer7rse *
ee a pa applications we use oclal & hexadectmalalso.
for This 9eason qunbe® sxfstero COMIeRSEONS ABS Necessary .
© Brnasy —tencecten! CORRE
> Any gtsen broase nuober can be convealad into as decimal
equdualear by adding the products ofeach bik and is
wetghe-
= O pepresentation of a binasd number ts
-{ ~
Nio= Ania + Onan 2 me -- 140) 240 24 a d'+
ase ---? SeQuno
40, Bl4---- Amnb™
wwe use decimal number systeNip if o& dectenal oumbet
as digit valve Ces thes a
n-> number of digits io integer pan
m-> aveber of AigilS fo -froxtional pant
OX Convent he bincry number abs dae ra@ad 10110 ts dectnal
Given bioady- nUMbew 10110428 1 ©
Covres ponding. eet ghts ane A2AQRA 2
=> ateint (2x0) +(x) +C2'x1) + (*40)
> [E+0t4t240 =(AVo0 - . .
XB convent tre binas numbes 11016 11 ale dectral
Given binasy venbes Mole tl ayo el
corresponding. woeghts ane LALA? AQ cans
2 (read) Cre) + Cond) + Coee)-+ C1e3') +E)
ged otig PEO => (13-F52)t0
) Binasy- to-_ octal Conyersied —
A ——_—oow .
OE te Schal number &% 8 and the base fos bioas
homber %% Q+ Thus te base for octal avenber &S the thind
powers of ttre base -for binary ounber-
> for soleger pant divide te binasy? number ‘ole group of
to
Inver bite starting. Prom the LSD & moving.
Then eplace. “each group of 3 bits by th oclal equivalent
> fr Psactional pant Gnouping. of 2 bile ‘is made. skart2ag-
som the nadlix poink & enowrng. towands nights
Ebr 1OllL + [Olo
, ae ayaa 2,
£Or Convent jue binary aumber 10110 + O! Mle ‘Octal -
Given binary nunbey 10 110-01
Grouping eb bits 1 11g + 210
Consent each group inte octal Ons
O> lo = (iar) trea!) +(o2t) = 1t2+0 26
@®D tO = Creot}+Core)s 20>?
OD ol0= @Exer)+ Cryst) 4 Cox) = Ot 20 =.
octal number) = (26°28.
) Binasy - te - Hexadecimal Conweosco0!—
arene —“* eeaREe Sa
> We base or hexade&mal amber ts 16 & the base tor
inaky nonber % Q. The base for hexadecimal numbers is Me
founth power of the base or binasy nuonber -—> for ioleger part divide Hie binasy. umbes tints group of
four bits stasting from the Lsp § moving -towends msD-
quen meplace each group of u biIs by iS hexadecimal sumber«
-» for -froctional pan grouper; of abily is made stanting
fro he radix point & mowrng tounnds orig bt:
Ex- Convent & biaady number 10111100110 + 100 ‘als hexadlecEma|
Given binasty number 10111100110 = 1100.
Grouping. eb 4biTS for Ilo OLLO + L109
Ser &
Conuersio) 86- eachgnoup into hexadecimal
05 oo = (380944 Gla tExo) = 44226
@> ito = ewe (2eds bly) +@xo) = 8tUte= 14
©> 4 th hexadectenal, equiva bf ©
D ool = Leng@lrode Vays yrort=s ©
OD 100 = xe ey +(e!x0) +E = 8+ $= 1
hexaclecemal eguivalent fs @C-
=) Hexadecimal aunbey SE6- BC
Rectenal = > Binary» Coneemeiey
S For me process oh decimal to binasy. conuesswt LIE Use
double — dabble method -
-—7 Zn this metod, succesive
tion by decimal number 2 ts cone or
past sespectivel a :
guccessive division Yor tear pest
> Here we mepeatedty clivide Mme fotegex pam
the quotient (Q) &5 zexo.
Ls Then Hie Bemaiodenss ane. taker in Hye gewoarse order to
-fornn & binasy number - Stan)
Rivide bya °
The given nveber,
Record BGR
division os successive eultiplica-
integer oy feactionad
t by 2 until
woalves in reve’
orcler
Flow chank for, iotigen positEX Convert adectmal number a5 tnls binary.
Given dectmal nunber QS
Use Suceessive. aiviseon by 2 & role B | R Calves.
R tf 870 slop fhe process
ao & Record R Valves 19 neverse
a order feo
! Binary number = (ool),
1 |msp
Successive multiplicelive fox fractional peak conversso =
-S Heme we use succession mattiplication by 2 for fractional
pash convensiod . .
> By mattiplying & decimal number (-fractionad pank) ty 2,
a product %s “produced. and if has integes poak @ fractional pant.
~7 the sobeqex pant cary) of the pooctuct becomes & bit ig
we binaay umber.
—> he fracttonat pank %& again outtiplied by 2 & mead corny
until — fractional pon becomes eso.
Ex'- convent (0656259 Ste base 2. 5 @
Biven decenal aumbes 0- 6562S ~ -
use successive. outttplicalieD by 2 & note carry values
ordas
0: 65625%% p> O-3128%2 onG2sy2 prDr2SOK> pr OS
—_ .
325 0-625 1+250 Be | ° stop.
4 A 4 L Fi
1 ° { °
Binasy nucnben E410 /
Sete Coven a decimal number (35° 45)0 & binaay num.
Given nvenbes™ (BS*U5) 9+ .
Tr consists bole integer pant & fractional panh-
Tnteges park Convenstoo~
iokeger peni- = 3S:
ose successive etivisi by 2 & note 6, R values
TF 60. slop the process F
Record R values in nevense order
fox infeges pant bina qumber
fe 100011froctiona2 park _conuemgen0
Given fractional. pant (8 0-45
use successive multiplication by & & nole carry. valves io
order
OrUS KH py OIOKD 0-808% 5 0-60K2 > OD
O-FO onee (7 1-60 [-20 Ory —>slop Me
a 4 v L ‘ process
\ I
Poactione® pork bin equivalent = (ONO »
shen — Biaowy equivalent -for dlecienal nurmbeor
(254, = Uoootl + o1110)
6) Rectmal— to cchal Cenyeansia0 *
“> For Te convemsien of decimal to octal weuse octal
dabble mefhod- ;
_> Inthis method we use successive divisioQ or successive
roultiplication by 8 for nages pant Gor Fractionad pon
ses pect ved :
eo convent (!60)\9 ‘ots octal = nucobes*
Given avmbee (16010 consists only. tre’ fotagen pant.
Use successive oivisioo by 8 g note 6,8 Valves
af G=0 slop Me. Process and
note R valves th sevense order .
msD UED:o = 408
ee conven (10-20) © ints base -& quenbe rm ;
Pauen aunbes? =(U0+2010 consiste both infager § foactionas pant
Toleget_ pank conuesscoo
: Tobeger port walue 10
civen Pag ay by 8 % note GR walrus
lo JSR EP @=0 Slop the. process & nofe R
10/8 |i} . valves in. wevens® ovcler-
[Ms o\l Inger poo eguivatent “s Cle.
fractional pant conuenseo'—
Given fractional pant 0.20
Use successive routhplication by B & note carcy values orcler
oF oni ae 0:20 x8 p70. 60K8_ 70-8028 0-40 x8
vee 1B ey 0 1? 60 44-80 arin: 3Be20
¢ v v, v3 step
¥ g fractiona2 pont eget cle
Pe eee ceed are Palenieaey Conic).6) Recional— to- Hexadecimal Conveersioo!-
r > ~ —
a ere eeeet to hex dabble. melhod. Means successiv
ativiscen os multiplication by 16 —for Te conwersion oF
integen past ox ctional past respectively.
_» th Integeev part use successise- divesion by (6 and, necorch
co
Remoinder waltees fh wevedse- order
ive multiplication by 16 and
factional post use successt
downagch orcler
decimal. aunber
—7 Bn
note cos, watues
Bx — Conver (gs00) 0 Dts tHexe
ven nvobes -(3s0)0
ucce sive» aaseeo ty 6 ote QR Calves
abl. DF B20 > Record Rualues
pease over:
m AL
re
Le decimal nvobes = (DBS
7 D ea lon (ES)
use S$!
ex - Convemk (95S )i0 olo Cw -
Sion (95S) Consists bolb integer F Fractiona2 pasb-
Tolager pas &s 95° ,
Dse succecsive, driswo by 16 £ nod 8, Realues:
af Q>0 5 Recor pevatues to
7 vevarse oxcler
t Egeeiealont ioleger past value= S5FH
Kmetional post ts aS
guce eSSiUe outtiplica hoo by 16 note carry valves.
leak fractional pask valve
= 0-8-4
oumbes 4s (5F+8) 4
use
O-SKIE_ p> 0-00 slap — eastiva’
8-0 J” *t
‘
8
» Oclal— to- Dectmal Cnvessioo'—
-» Te consent & octal ovmbex Dlo
each octal digit by its positional woetgbt and atid the
vest ting peo ducts - _- gra) 8° 3! fi --
> cll posi tionaG woekgh 8 age (itl I
Ex Convent (4F#5+AT)g to tte decamal eqeualent-
Given octal number C4#s- 958
Posttional wetghts axe a's. gle>.
Equivalent Hexadecimal
decimal oumber, muttiply(Noo) =
(4x8y + Ce B)+Gx 8°) + (2x84) + (Se 8>)
256 + 5645401254 0-078125
= (3I7- 3Q825)i0*
\2)_ Octal — to ~ Binary. Conversio'—
> TF a nevense pwcess eb bined
— Hene each oclal tigi converte
bineng. 7 puenbens eS Brbo -
— for CONVerSHD) we USE
values nevesse osclen-
ex change octal number 6S Stole bina
Given numbed (658.
Each atigit- concen
for age B
=
1}
vfor to 10»
then (65) 3 = UIO1ODa-
ex Convenk (42-43) Sole binagy. equivalent.
Given qucobes: , (72-43) tt contains 4 argils:
€ach digit converted ints a binary number Using uspby 2.
51 ati ‘fy 5
O-1
(Dg 2 UID, (A, OO, (100), (3}= (OD,
sien = ( Fa-43)8 eguivalent binary au@bes is (I11010- 100011)
1D _Oetat— to - Ht Heeadecienal Conversion } —
Ser the Conversiod 9b ‘octal numbes “nts hexadecimal
number we can uce two phases:
LD Conver octal number to ate binan equivalent -
then convent tHe binany. ounbes to itt
equiva lent-
> We have es mel
bey
_oclal conversion -
TH codlesns & igits -
‘ole BbIF binary. mu
\
for digit a |
gla—)
==
o—t
for (5)g> WOl)z.
hexadecimal
thod -or octal- te - heer conversa)
convent octal— te - decimal and then decimal~ to
—hexadecmal .
hs 4h egueicalent 3bit
ea LiC-D paocess and nob &
be ustag (SDly
a.Ee Convent ABD ge Sole hexadectma(.
Given octal nuenber IQBY.
-Rrst Convent octal — te — binony- number. Tbr This process
use Leo ab each cligit and each digi conveatad inte
3 bik biome -
ale Q(z a3 ala
= = 5 a)
min Yip Hp Hp
HCO (Qa(O10). PHY, = COD,
> (1234) g = (Coolorootiiot).-
hen conven binary. -to— hexaclecimal. form @ g of
ubits & each group conventid ‘inte hexadecimal avmbex).
OOld lool, 1109
OL daald adie
®D ooio — weighls ane LLQA
> Con22) ort) HU x2) HORE) #2
© 5 i000 =) (Suter = 448
© 0 w+ Ee = tl a7
> W234)— = 2IVD6
Exr Convent = (88-8 tole Hexaclecemal number
@iven oclal nucnbe™ (3ade
ask convent — ocal - te — binang.
ah spp ale yn oe ;
203) alee n° IW (Bai)p = @1LQO001), .
que convent binary. to hexadectmal -
eco, 10190 + C019
So er
05 wim = Pa) +ldeD = arg 2 lorA (
@®) ooo, = zr = |
©) oo1o = ant = &:
D> (aaie = UA
Wo, tlexaclectmal = te —_clectmal Convensiorn '—
—> In hexadecimal, cach aigih position Corresponds tb a power
of 16+ EE Tee
jae e¢
v5 % convenk hexadecimal aumber to decimal, nunbe® 5
muttiply each decimal cheb by it weeght ancl add the.
pesuutting. procucl3-
Bx Convent (3A-QP)6 to io.
Given exadecimal umber BA-AF-
as
Posttiona2 weoghts ase elle» eé
Nig = (axte) +(AK 16) + Qx 16) +(Ex ib) -
Here ASI 5 FAIS
= UBHIOF O-125+ O- EBRE OSESIZIS
> (6B: (B16 io
nu) Hexadectmal — te — Binary Convers@
36 binary to hexaclecimal converstor
STP te sevedse process
hexadecimal number % conveated ints ate
7 Hese. CUedRe re
LUNDEN-
equivatenk y-bir blnosgy 9
ex Convent (28D)1% to brary:
Given heradecemal nunber (e8D)6.
Convent each atigib ints abit biaary casing 6D bY
9 a z Bell 2 p=l3
gn alst pn 2
o-] a (ae {
Bg= Ol), \B.UOID, (Dg? WO
t
Broary avenbes = Cro rolmtol)>-
2) Hexaclectémal - te -_octal conuenste)
Doak convent Hexa clacimal number ints binany. number
a Ten convert the binavy. number ints IB eguiwalent octal
num ben» .
5 tres melo. is to convent hexa to decimal & ten (6
oclal ovenbes>
Bx Convent (ABE Bie
Given Cae 13) 16°
Convent — -Hexa dectmal to binany number using Le Dby
Be
a
ae y wan st )
o-l
‘ote octal ounbes-\Ae Woo = \ B,=GoID, (O,> Lolo), (D7 (0001) (32,= (910),
> (ase. 3), = (lalolotrol LO-OOO1OO) s
> Ten Braaxy— to — octal converse ve
een lace grout ob 3 bis & convent each group ioto octal
~) lol O10 M10, Jlo +200 109 IO,
~~ Se 6 6-9
O ior = coe aeeen = artes
3) Olo= Bey = 2
Blo = (Pun afd eye = Utdeb
a 000 = 0
D lo + 6 p
= bes ts
® 100 = ays 4 => aa’ S oee. ous)
® io = (ute 6 8
1D Ofer Radix) Base system —lo — Rectal Convensing ~
> Ani base. systim numbes can be conveated ints dectmal
system by couttiplying tue. each agth by ite positional wergh
ancl adding. the resultiqg produch-
EX Convert —=s- ( 23) y ls decimal.
Given numben LaDy.
Positional weigh y! g
' = SS
Aros leaders) = 843211 P(8B,=
1) Hecrmal—to - offer nadix/base systim Convenscon —
—» The integen part ofa decimal number Can be Conventid
into i equivalent Radix syslrq by successive. diviswin by-
rand note xemaincer values in nevense orler
> he foactiona port ofa decimal number can be converlad
Into its Cgutuvalent madi syslemn by successive muttiplica tion
by ry and note ca wales 1 ovelen-
oer Convert = @Q+ 1p ints base-3 syskm-
Given (8&-Ds0 «
Shteger pant 88. divide by 3-
note R valves in nevense oreler-
2%) 10 > (a.fractional pask On|. multiplied by 3: @
On1x3 0:3%3, 069%. ODKB On1k3
ee i i a! O38 slop
v oP”
° ° y Q oO
[ODie = (0.002%) 3-
Then (BANig 2 (AU + 0022)3.
* Binasy Axtthmetic_Cpenations!—
= Aigital systems can hanclle only binary ouenbens «They.
do nok poocess Hie. dectmal numbers: . .
7 thesefore IE %s necessary to leagn the binary. asilBmetic
cpesrations - They ane Binany. adalition :
Sobtattion
Mu mutiiplicatton &
Binary Additioo'— ee
Te 6 & B ane Atwo one bit binas numbens + Then
tue vules for addition of ALB one ‘shown belaw:
A B wun =| canmy Here. Sum & Ca
} ° ° ° ane. nesulte aflar addition
0 | ° when boy inputs ane 4 Meo
L we will ger carry +
\ j oO | a €
-> Df AGB ane morse Tan one bik oumbens hed OF wll
follows we retles chown below:
suc [Canyout] gp a sun 66 & LSD
bite canny. genemate
ib ts added tp maxbh
sucn 6 ean nexb
aQoificaor bit.
& this nepresentad as
Carsy-10 +
~o-0-0-9/8
°
!
U
°
l
°
°
I
w--8-S80a
Ex rd (101029 4 (OOD.
Given two numbens ane to
iw?
Bray addition rrld = UUD, |Ee Add (10-012 and WlOD»:
Given numbess 1011-011
vy blot
JOool-I] = (l000l-111D,:
Bioasy. _Sobtiaction-
Sie can pesform sobtracttoo 96 two binary numbers by using
tipo methods: They ae Ad, ecttee melho
oo Ww Complement method:
Ataect sobtaaction-
AN
Te AGB Be too one Bb binary nucbeds-
gobttaction ose given belew
peo-form ng the binas
§ B difference] boreO! phen DEB Than only we will
a 6 get borrow -
o
qhe nules for
°
°
|
oo TO
t
I
t ( oO
Sopect jrolet for si0!0l
t
T binay! a negative
aunbed presen
!
i act by extia msp bikas 4:
vv op
sTroto = (loo
ee Sobtrack joal-10 fon Olle. _ Bee
yf? f
ortt-tt !
1001+ 10. sim Vo
Wo aS
1168-0! zOillo-o! —l aA
oan ed o1lo-o1 fom 1010+1!
HOlO+tJ
to OO +01
O00+10. = (loo+l0) >
Complements =
to ataital syslems for sinplefyiag the.
complements ase used
cobtjaction openation -
Bor oe c) Wit of complements for each base syste -
\
ww wu) complemeal- . . /
» xs complement heae ve base| dix ba slimw yEy's cormplement > @®
complement of a positive, oumbevw A is defined as
wos
where T= base
N= positive nunbey
: > 10 of digihe + Fretional a3
For only woleger part na eee tager an
m=0 “
2 ywils complenent oh N= /p-I-N/.
| fe
\@ o's complement? . .
vs coenplamenF oka positive number N ts obtained just by
adding A to (rps complement of N:
0 =)
2 o's compleenent- ob N ~ /[v-v -NI}t!
ene 19S added to us.
Complement 6b complem eat :—
Complement of complement e) original aan
ore wos coeplemear of A eLFON:
' I f 9 9) 9 =m NJ
Crys complement = vee [et
t
wns comp leenent of
= AK en
= N= original numben
iD bIFe
Complements Cd Binadye quenber sy.stero—
> the base! radix of binary qumber system is 2.
> too types eb complements ave becomes
LW Uryls complement of binary vests = i's complement
w vs " Gs “e = a's complement .
_ils_ complement _systemo_representation'—
=the 1s complement of ang binagy nucaber 4 pevformed by
sieply changing all Is ple 0's and ods ilo I's.
—7 or here we usc formula -#-F%N 2 aan.
ex ts complement of Ole:
Given number = JOT)
hese n= 4 m=O N= l0U
‘ 3
hs complement = &-A-N
= gt 3g 101
= 6-l[-— oll
= 15-101)
Convent 15 dectmal numbes ints binaky eishog cltvtsie by 2.ae s UD = UNDa.
af [3|i\f then “Ss complement = I~ TOU)
a PT ruts
[ze ae w toll
}oo t's Coenplemen ECE 1-8
Sreoplef mlerchagge faso Goad:
Gwen toll by sol@rehanging. we will geh
t's complement = O100 .
As complenent _ sobbia.ctin method —
ae Heme instead ob Subleacting- a number » jus add, I's compleme
of He nuobev-
> Horne we have two cases:
casety'- Sobttaction of smaller nuanber
Proce pine I's complement eb smaller number.
5 add 1's complement of smaller number to lasges number.
3) Result must be positive
w BP cargy genesatect eis called EAC (end around camry)
add enc to The zesulé -
From lager number:
x Sobtiack 1010 From III! sing ils complement method.
Az too Aciut peraem B-A GA cased.
Perform i's covoplemeat 0 A=1010
=> plz O10l.
add eB B > tts
O1o]
(wv
epcM 0100. add EAC to result [Ladlel to usd
a lit).
— I ( = )
O10 > B-A = (010),
ex: gupGack 109.1 fom = t1ro+0 USI ils c method.
B=1ll0.0 Be 1100+] perform AB A>B case).
fad its complement 86 B= 1100+]
B=) 001l+0
(
adt @ & A 2 1100-0
Col lo
Se
EXO DEO!’ O add enc te (SD
4) => [abe fl).Case SobGaction of loxgex aumbes foom Smaliex number @®
Psocedure —
I ad ts complement of taages nunber
add i's complement anal smaller unber
\3) added vesutt f$ i Complement form. So isd 1s complemed'
of added result and aceign -Ve St90 because 66 resv(F
negative -
exe Subbsack 1110-01 fom lolo+ It Using 's ¢ meffiod.
Ae idio-ll B= 10-0! — peaform A-B A Th takes” veug less time:
Awadvaotage'-
—> Hardware
Ae ficeett
a's complement systenn_vepresentation
> the als complement of any binary number % determfoed
by adding 4 to I's complement of tat oumber.
os simply use -forenula [oe a A+!
ey as complemenF 66 (loll- lla:
ls complement 66 given aumber & @100-00
feoplementaticn a6 I's complement oethod Ps
add 4: te Usp a
1 2100401
ee sc ob 10) using formula.
Given 101 N23 N=lo] m=0
at aM ye Io!
= 8-)-l0] = #—-I0] -
Conver \ io tola binaxy using division by2.| Pro = WIDa-
ae (
fement = [SS AJ4)
= Olo+!l = 010
\ e
adsceb lol = Olt
s_complement subtraction mettiod
fer sobtaactioO 0 2 numbess we have & cases.
cased Subtraction 66 smaller nunbes from laggea number
Procedure
un Find als cocplemen pb smaller aucobes
5 add — tagges® numbers to a's complement ob Pxmula [8-8 N+!
Ex find gis complement 0 (42-Dg
ds complement is 39-3
wp ae
ose Ss
adc 4 +
sé.
Et find — ag complement 56 (8D_ Using -formula.
gis complement = [er a At)
7s complement = 92 ¢ Dw n=&® m20 NzaS
= gt} (25%
= (649-1 -@S) 8 oe
Convedt (6W) 9 into cctal number using division by. 8
2 (100), -1- 2X
= (00— &6
= BO’
Qe t
2s @ s'scomp = 52
ook add +
Sh comp ~ 23
als complement subbaction method!
lex nurobex from laxgex nuanbea~
Case Subtraction 9@ smal
Procedure i—
wAnd $s complement eb smaller nunber
bea
Toler als complement & lige 200. / .
° rf Pe genesated ignoke. that - CaBkyy- Result is positive.
er Sobbact 2 Uitte to AR A De
D=1a-2Q Bere A>eb case (U
B's complernen eb 6 =
3} scecoplemest = 73 >
3072
als comp femeol+ tcase) = Subtraction "
Psocediure - ee eseg oe Toon smaller oumbkex
ty Find gis complement 6 (asges aunber
3 add gis complement to senalier ounber
3) adeted sosolt is 10 complement -foren. So, Find 8's complement
of added wesvltE assqo ve so
ek Sobtrack (4-36), from Ua. #Ve-
Re 18.3% B2Q7-36 (A-B) ACB case CO
a's complement pb B= 3S Complement +}
alscomplemeat = 939%
AF+36
add | S04!
+1
gis ce B Spe qa
add A tQ-9>
63-y1
adeled gesolt is i com lemeat? fore -
als complement a ack vosult = esl
3's complement met),
63°!
add | G36
Resolh *& -Ve ast
1-B= C1434 )Q.
1% cHHeya decitoal prithmelst Cpesakens'—
Bald ition
me sum o& two hexadecimal digits &B Me same as ther
equivalent decimal suc when it is less than I6 -
we BE Mies sud tS greater than oF ogual to 16 , then 16 must be
gubtractect from He, SU te cbiato tie hexadecimal sum,
and camy 4 ts produced 5
Er Pes form addition eb U2AD6 — BD 6
1 AF 16 12
54% 4 yo NE
TO Ta
C4F 2 O16.
“eh Perfor adcibion ob (456 9B)ig & (UP b)6
456-78 1 B u—76
AY + Ae wt6_ V216
capes te |)”Sebtraction >
SHene we use 2 ‘ty s ob ‘ :
\o Ainect method pes ob subbmetion methods. They ane.
es) complement method.
Atnect _sobtraction t~
5 EF is Slamilas to Hee decimal, subtiaction except that whenever
at ts bonowed Sle valve &s 16 and aol lo:
Ek aye — ICH
foro next digit 7
ER 376-4AH 36-B3H
t
Be HG UH Aw
3B le
(Ce a
ve 76- B32 ize
Ul 816 2, —$_
. F .
Complemenk Sobbactieo @ GS TH) 16
J Heme we ase & types 66 complements
to y's complement = iss complement
w vs " = és 1 ~
15's complement
= isis complement ofa aumber is obtained by subbractect
each ligih feorm FUisdecimal) » formula fa. (°LN]
rr (Baw. is's complement
isis coop pleenen = Fis Fe Fis
wo 3B Ae Bn
=. | = c54H:
| G26 05F ?
5's complement_subhmetion nethod
case Subtraction 86 smaller oumber From larger nunber
Pro cedure'—
w Find i5's complement 06 smaller auenber
w add largess nunber to !5'S complement of sralles aumber.
ealted Enc & addit to result
3) BP casey genesaled
cay Result is postEtve-
foro BB-IH — 4Yo-DH:
ext Fea
A= BB: B= 40.D D>B (4-8) casetty
ists cooplemenr 6 = RF: Fs
vw Yo: Ps
a
add A ae i a 23
wen Te 16
TF
cae O eAOS ke
+)
TRG)casery Subbaction
Procedure — ob larges oumbes from Smaller nunbex:
uw Find eS complemenF of
2 add cmalier avnber to
a) Adlcled wesult tS 1 conmp!
a added resol assign
larger avenber
15's complement ob (eager oumber
lemenk foro. & i
cor toe 0, Add is!s complement
Exe pe an- FESH
p> DEQ Be PEs ACB (A-B) casetv
S's complement ob B= PR. F
wo FES
oO |
add A D6 8
5U
Tat
0
addled osu(t i (0 compleme :
ists complement of added result = E+ Fe
wesutt & negative 28
= O-B= —a&3H- oe
t a
16S complement —
Pe number josh add 4 b
genet
~~ Te Finck 165 complement 0.
15's. coaplemenF ob tha _aveobed-
5 use forenutla [is 16 LA+!
exe Ler 26 tues complements nose.
isis com lament? =. FRSP = i
ij sg co = FRR
wo_FF a wy ABT
aaa 00 “Dogs
tes complement = 00+ © # cal acl
eS © PaDICaat
ies cemplemenF sobtracttro method —
case > Cobra ct 0 smaller nv
Procedure
igs complement of smaller number
ny add — laager number ‘to els complemen 6& smaller nueber
3) BR casey geneaalid 1 ignore TRab canry:
u) Result 7 posi€tue-
Ex = QB3B-5H — IFF> 6H
B= QB3°SH B=1PF-BH (68) caseti) A>B-
ber from lager number‘
1s complement 26 B= 15's complement + [
15!5 cooplement > oF FEE
wt ee-B
—— ee
add 4 B20 ON,
ws cob B= BOOTS
add A QBS: 5
YroreD 0 BSA
A-B= BZ-AH-
Caseti)” Gobtraction of (anges aueobe
Procedure
19 Find es eb lasger number
Yenalies ou@ber
a Proce smalless sunber
cocoplemen
ay ade tS complement to i
3) pdded vesutt Is complement foren- S, Fiod 16s complemeat
of added aesult & assigr -ve s(j0-
eee pag. 7TH- FBS.EH
A= BBQ5S B= eB3-E (e-8) ACB case CO
es complement oh B= sls complement +
isis complement . PRE es
add t ovB:t
+!
is cobe® * GB-2
add 4 4 BBQ1S
Aacled sosvlt tb ; f
KS to
f a 2 complement eon) +
menh > FEF: kB
nd 1eS complement
ists cocople
6a &
ResolF is we
a-B= -G&a.8)4
Canes _Binasy NucoPA6
ne P: magnitode (valve) oh
> unsigned nucnbeX sepnesent onl
nUMbEA - poheseas stjoert quenber” represents sj as well as
IKE
of a num bee +
eegned deeemat avmbed
5 Exh Tf we consicler &
+8 > 42, ~“F OF -Q ele:
_s Thee ase two ways 06 nepnesenting
magni lode
seqned binaty numbers.(oO s¢g- magn ilode, foren -
2) SG0- complemenk form. Theseare th
a earns ae too complement forse «
ab as complemenF form:
) Representa hoo ab stynecl. number using $090 - Mag nilode. fore '—
—7 In s@qa- magn itode- for, an additional bi called tie
sign-bfk bs placed 1 frook of te. oumber.
_> TP Me siqn- bet & a0, the number fs positive .
orp ik es @ +, he oumbes *°S negative -
Er +18. roagnitude = 1100 syn = 0°
{| Then mepresenta bin es
fepeiTele]- +
! i gyn 24 [o|
' ign enagm ocle-
titi Tete |= -2
Sgn magetoda. ;
Dri) Representation ab-_stynect_aumber using $90 1s complement Foren -
> TP the qunber S, postbive, rie magnitede ts sepoesented ray
the true binary foren anc a igo Biko & placed 1 front of msD-
“> Th te number % Ve» he enagattode * sepresenlad in ts
complement form & cod io front of MSD.
Exi- +1. mognitode, = loo st
was POLL Tere]
RAS masitede .
Aa 12 biaany = 100 » IS complement = OO!! > sign= |
sts negni!
-a- Prferet ti
s Te stqn ds ¢ t+ reo}
vy R entation of signet quanber, ostag. S09? 2 ‘omplement form
SEP tue oumber is tve te magnitocle is represe nled tn tb tue.
piaony form & & sign bik 0% placect. in front of msD- ;
> TP ye number is -Ve 1 He om nitude. ts reprcented ini als
onplement form & a sgn bir 45 placed 1 Froat of Msd-
oe +12=[ 0 ee eonte ‘5
iede = 1100 S9o=0 :
nage’ Saga magnified.
sei IQ er 1 binary. = 1100
a iS \ fF = 00
ai scomplament =
: =e =
con = ft aQgn magnitods.‘ Binary Codes ©
> Genesatl digital -gyslems uke computers , micropsocesiors
use binak walues means Dep can’ handle. dala %
for of ~ 1s and ds.
> Bub data consists numbers, alphabels , and some.
Special chasacters-
> So, all ese numbers, abhabel= & special chavactews
ave to be convestad Yts bfnasy -format. «
—> This pwocess of cone Sto ae Enouan as Binasy coden
> the combtyations of binak Bits that cepreseat non
alphabels & Spectal chasacters are called “ inary cocles”.
>for Te representatiooo® a” distinct elements ina
binary code — gequines a minimum of n bile
—> TP we consider n=,
Total combinations ane. 4. Theyaxe 00,9!) 10, Gl.
they represent a decimal nunbens farm 0 to @-):
Ces, Oo to 3
x ClassrFication of _binasy Codes —
Binary codes ane classifiect % diffenent ways. They we.
w werghled codes (2) Neon wetghtad codes (3) oeflective Codes
\W Geuential codes (3) Alphanume.ove codes & (6) errordetectieg
and cornecting codes.
\Y weighted ceclest— the mato chasacterestic ofa wetghled code.
fs, each binasy bit assigned by a weight and values
depends on the position of the binary bit.
> TE we, W, Wa ane te wetehts of the binays agile,
ond 0, %)) %- are the corresponding bir values , then te
deamal number N2 W242 +W,X+o%o Ps vepresented
by Dinaky sequence x5 %)%o & ah es called “cocle wood."
fer 161 ts a code wald then
Ne @xlt Brotdx} = Moty= Fe
Ex'- Binasy code , BCD codes
@_Neowerghled_odes~ Cunweighted codes).
> Here the LIF value does nok clepends wpon thein position
means each digit position within the number ts noe
assigned fixe walue-Ex Gray codes, Excess-3 code & 5-bit Bcd code.
(2) Reflective codes '— ¢ self cornplimenting. code).
Spceede % said tobe a veflective code , Hf Hie codeword
of 9S complement of AI can be obtained fom the code
word of N by interchanging all the Is asds Gosas'ts.
Ee sai), 4aal, 2aalets.
fos example. consider” BQ code» the code word -for
9 &s the complement ~for Mie. code o-
Hene 9 number ds comp 86 number 7 &s
i
and number J +S Comp becomes ou
9 represent Vidy .
Ss comp 0000 —rualue te ON
9, codeword fox q ts rue complement for Be code o.
Ww Sequential code '- Th sequential codes, each aeceedin
code f one binary number greater than ils preceeding
code
Ex Binaty codes, Ex-3 codes -
© Alphanumeric Cedes'- these codes ase mafoly used
repsesent numbers r alphabets §& some special characlexs .
> A set consist? 10 decemal digits , a6 © lethews ond
numbes of — S| pecial chasactess- .
—> Dt contains bekween 36 to 64 elements °F only Carpi lar!
letters ade included» and pelween 64 to 128 element
12 bol pres @ lowed case letters are @ncluded-
> fr g6to6y elements veguive 6 bit codeword
> uu 6yt 28 n ” 7 bik codeword -
GY- asc, EBcDIC & HollestIh code.
Asctt— Amestcal) Standard code, for information inlerchange.
egepic - Extended Binary coded decimal olerchange Code.
weerr detecting _conrecting Codesi— then binae
information (s tyansmitted rom transmitter to receiver,
there fs a chance of getting noise or errors Aue to
this error bray o may be chaqgecl as 4 orvice vers.
= % avoid of eliminalé this enor we jusk add exbor bit
fo binesy dala. these bile al i
; : " low the detection
times correction of errors. & ome.
GERM Poril7 (for detéctiad) , Hamming. code (for coreckoo). |©
suryshy
Garyv—
HUNWIW 09 UE
ae)
po hucwwo} p
(em)02)2P
Bre JUD )
&)ised
o>
bay Janay
4 Loyraap
LOZ
|
sjedixan
Fo Bpto BOP Jo
Inset
SI oan odious
“Seed f poyporqper Ur x
PA»
Say co |
oamagq V
GOTPORAYG!
psc
a
21044.
v1aega xa
nos¢ Ilehe
@poo ie po2
Qk! oO
: oydly pequmees
a
[tT
Gexgregys
[yz0—idexo a) -
ou yd a4 %
E-xX2
Wes
(8he
yvew
PP de09-28-
/2eupays?d
suonaerde
YAW) IFO
a rg] 290
a@ugsad Oh x
ap a2
49-8
opm g- AT
ape hao
“pa Booey
7“
l
STIQPAW HON
2 sxaqvyerjvp
sy Qp ppwnrep
0 joosaede wu *
~omqenuddy
LZhs
tone
[the
NE9
hs POS
s UBa
IG Ee
[sth
Ith? —d08
poo Feoug
= Sd
2per panbroct
Span Brug
Fo amp ypissuyo__ BCD code i
BcD — Binary coded dectmal
Sn Bed code deckmat adigils 0-9 Ae represenled by thelr
foes ene atee our bie, bey Bed &o Y ane ate
ode tn which eac! decimal digit fs vepsesented
inary code. ok -four bike. or" P Kd aaeae
The. mast common BeD code & 8-H-8-l coole -
in Ths cole weights ane 8) 41 2,1 from left to ateht.
%- Representation ob s} nunberr 14 info BCD.
Given — dectenal auenbes = I++ consisls 2 Agils
ak represented by -fouh bik binarg.
, Each dig
ale a
o-It [Q=b UDip = (0001 0100) gep
a =0f
oe
xi Convent (48-216).0 ‘albb «BCD.
Given decienal numben = 78: Ql6
eobens by using,
Zach digit consoled ‘inte 4 bir binaky 0
uccesside ctivise) bY a.
I
a Q (2 alien ae
abd
2a)
-
#8, 38
t=] =0 & U9
acai apeeq “ait
o=1 2
$F g - aA 16
Olt 1000 + 60100001 110 Jacp
cD Adlditrsn —
ae can pooform Bc addlitiny shen the. addition ob (wo
not exceect P-
Ligits @ does
, ollocing. oveobers (BYES) vseg acp acteibos
— Adel the
a4 = 1000 0100
LS = .o0ot oot
—— w
47 = ool tool
i Ade (9910 LZl2B)io USM
q 8 = 1001 1000
23 a) ool 2. thisnok a valich co addi ten .
Because sur ob adigits greater
126 = [1000000
Han 4.
gq BCD adel tir)# ORes 4-bit Be cocles /
_> offer u-biF Bcp cocles ane 4221 13321, SAI! , S4Ql
yal , 7497 BURT pee
, >
— Tm 428Q\ code , te wetghts ave 4-Q-2-| means bth AL
has te weight 4 , bire % bik 3B have. Re. same weight Q
ancl biku has Hie weight 4
Herne 2T one chifferwnt they. vepmesent negative cwong hls.
Beane | 4 Bal | 33 [eau suai lean eral \e4eT | 8487
oO 0000 |0000 |eoeo 10000 doco joooo Joooe [0000
' 0001 jeoel fecal coot}eoot joootjortt otth
2 o oto joote jootl jootojooll cotofottofollo
3 oot jeotl otot foottilo1oo jootl eroatiera:
4 otto oor fottl o10g}o tol joroo ele | eyac
o roof fotto|! eco ororfotrrjorol we tout
6 rotofortr joe! otto |io0o Ole : tllLo.0
Q es ree aout oes eee ortr {Loeoproot
8 retolrtropr tol rorrf{roll root f{lltt 1000
1 ee er frraoftreofforept tt ey tt | |
Non weighted ¢ Codes!—
Excecs-5 Code / Ex-3 / XS3'~
3 ce 3 a mod ek for Of @ BCD code -
othe excess~3 code. canbe obtained, foo te natural B¢ 0 code
ch codec sumbes ¢-e add 3 to each decimal
by adding 5 to €
qumber & (hen convent ots oy bik binaky.
_s> Heme no fice upeighTa ave assi'gnkeal «
pecimal
Bot Oa) aEx'> Find ex-3 && (BEI 10°
Given decimal number 36. Addl S to each digit.
433
Convent each digit ints 6 Bae binary.
(Bip = (OO LOOM ex-3-
EE fad Ge-3 code for Dio
Given decimal thumbed FX-1 jade a fe each cligiF
$-3-2 -3
E to S612
Convert each digit iol 4 -bir binary:
Ex-3eode = 10100101 - 1100
[ vetective cocle.
ov isthe €x-3
decimal nunber
Note Ex-3 code, fs self complementing
-5 Heme 1s complement of an ex-3 code ouambe
code -for the as complement of he nespective
exy— Consider ceedenal qumben = 4
ox-peode for 4 iS = tS =
ts complement of ex-3 Ob UNS
femenr 4fov yis = 9-H?S
ee-3 code. for GiB> StS =@-
(ol ints
number system to be conven
be convenrlad ald Doctmal and then
z= oll
= 1000 =
Noto foro digiF in any
—
Ey-3 code, Pash af should
to Ex-3 code anct vice verse:
Ex Convent (Or tate ee aes
Given bia aunbea? = lO,” ,
‘ te olectenal number -
convert ttS bined number 1)
e : wi) = Bt atl= rt
Pad Bena rE
K
totl *
= (ows = WDvw- add 3 te each Aig
aBe- convent each agit inte 4-bik bina
Cx-3 = O100 C100 -
Ee Convent ware ints rd cafe ig ; .
convent \35)6 inle decimal = 3 Av = (3x16) 2Qoxi6 = YRHO
@ cd 3 ty eachelgit 38 =(58) to
Govoak each digiints binary, “BN
€rx-2 = 1000 1011Poocedune—
io Bele the giver binadey numbers Using nules fos binoay addition
» Tf an HO cluceS a clecenal ~ ca ¢
pup: ey JmOtP peo 7 wry , add ool! to tuak
3) any group does aot proctuce. adectmal carry cublkact
Ooll feo tuak group: :
— teed code » FP we add decimal digits vabase sum Ps
an Ex-6 number nesulls - } pesdetam get Ex-3-forn
we must subtiack 3:
exi-_ Peorforro que -followiNG addition operations In Gx-3 Code.
9Q-6 + ISR
Ap ta-6 acid 3 te each clit
33 3 se
oe 4 convent each digit vals bik binary.
Er-3 code for A = 1010 alot + (oo!
2 15+
iW10 ol. 9(@0
cp Ott GOH”
Ot
ap toie tors = mea
case t0'- Fn Ex-3 code 1 TP We adc. decimal aligits whose sum
is gear thang, ade © 3 tadue- recat t set Spi
cr 48 use Exd patel Ceo) openatioo
pe F add 3 f each digiF a
= 443210 conueat ib To q bib blaasg-
€x-3 code. for 4 = 1010 -
5 add 3 +o each digit ex A = 1010)
e - ex-3 B FOlla
2 343 76 2 ait
ex-3 code for B= ONO 10000
adel 3 to dhe, nosuth to get €x-3 form
10000
Oo\l ©
oe tt
ToOOl\(
0er Add B&B & 36 using BCD addition -
A= QB
one
6 i - Ex-3 A= Olof Ill
6- 326
3 3 7
33. -3 B = Ollo 100!
exe te -
$100 Ol00
Glcimal sume I subtracroou va) Conctel oot Celecienal S009 >t
tt
1100 0100
—oott +00ll
Otl4
ex-3 added revit = 100!
x Grey Code
_. me cole which exhibils only a stagle Bit change Prom one
nunbes to te next f known as “gaay Code!
<> means Zn this cede befcoeen any two successive code words
ia only one position «
quene will be & change 1 ,
-5 This also calledas " att dvetance. code! oF Neyclic Cocle'.
5 No specific weight assigned to each Bit posttion> Se, fe is
a non weeghted cocle - : :
petlected code’ becouse n-bit
7 Gra, code % also called as
7, abletined by baron ae sePlecting The (4) bit code.
GUY code fs
quirpercore | sbitgeycede | abit fray code.
Jd do dx & do db hd Si
© o¢ o 0 ° o 000
a) o oO! eo oot
7 o'tott
: al o o1°0
\ ° o tto
" o tous
o tor
I eat oO 1\oo
© to 2a
toe i ieee arom
l oo aan tt cn thea
I roto
I o.4°o
foo 4
ipreeOurOne
{ oa0aro bo Binary Convesrs@O *—
Proceduse!— a
ww Abenbeor of bite Ma gnay ¢
2 The ™SB of te binany ovo
gory code, 80 walter , .
(gy To obtain she oext bina bik, peordorn exclusive og addition
Be actelitia coiT neglecting SONY bekveen fue jush written
down binatg bik aod que next gray code. bik). wnite clown
ode = no. 8b bIIF in binasy code -
ber % same as the MmsB of the
we copeat THe step § untill all gray code bits cdeyplelect -
=a eb 9o4n4-~- - Jide —» gnay code - {‘
ba boy - — -- bibo binady code.
Go = be: baa= Go-\ @bn. |
bo-8= Qo-2 bor ete =
Ey convent role ntl gad cole tate binary copes ine
til
Grey code, l R . ° Al ) ny
Lolels peel?
°
Bioasy code 3 0
we_Bioady {gray _Conveaso =
Poocedure —
number iB same as the SB of the
> The MmsB of binary
co gray code, So wile i dewn-
2 To obkain the gext gray code bik, peofore eel exclusive
ce additian bekween preset ORY code. @ next FRAY cocle bit.
voaite iF docon « ,
@) Repeak the step untill all bingy >!
Hese b= go Sn-1> ERG bo’
Qn-2= bo-1® bros TF
binany. code. inte grey. code
Ex’ Convenr 11001010
Bumyeode 1 L 9 9 fF © a]
id ad ld
Gray code i " ? bh NN
rrr Lh* Bib BCD codes ~
_> Sbik cedes also exist. Sbik BcD codes ane. useful toy
evsor detects. They ane SU Coce and shift counter
code. These Q five bit BcD cocles ane. nonweighled codes.
Decimal Sut | shiftesvoltr |
© ©0000 | 00000
t oooot aooo!
co oootl ooo!
3 eotll oot
4 oul oll
S 1 oooo Ji tits
6 1 1000 t( 110
3 tttoo | tt leo
8 1tttlo U0
q eit) 1000 cj
* Alpha numenio Cocles ~
ASCII Code
Ascu— Ameciica
= Pea widely
bit code: 5
Ss eral nucnbern ob diferent bik patteunns ane. Q'= 1Q8-
—> Bub most computers manipulate an g-bik ULantil7 as aye
siggle usit called a byte: So the. extia biE used for
other pumposes depending on the applications:
t) Standand code. for Information Talerchange.
usec alphanumerté code: This 1s basically.
Exr Simple printer recognise @biF Ascii chanachrs
wilh the msA sch too.
we foot can be titel fo convent both the u PeorCASe »
veg ce. Stehandict of alphabel® (26+a6) and numbens
and sera syenbols «
aye @ =64 5, space = 38;
Sha PSA) abet: SDwBL YG Lexwemncase. alphabets = 96+ y
pace =434+8= SS
cited ‘nts asct C+ bit bina)
= olotll.Px a
“ae “8 ney Oe eee 3)
=1 © 00000
S= 5470 | loy so
C=6F21 0000 | 4
cmese hood ant
e-69 _
@ scse nee cad oP et
= WOOGDDO IONIAN TO TAF! | LOGO oy.
280016 _code-
slancand fox Extéadect bi eopepe.
Seon to ee ees ect A Bae cRR Hak hinge code
> Dh 2 as6 bik patteraep ~~ &
Dh isa shandond code for | ;
follemtI5_ code — thik layge. computers. ~''°!01
— % Be code essential ; a
punched cands- To this each ch ge Usecl with the.
seguence 0b 1S & ols. This chonacter cs vepresentad asx
eed detecting Coctes'— Ba 1a-bik Code.
Posi Cocle'- i —
PN AX
> Pasily code tse exvor detectio, code. Hene
, adding, an exter BIE “called as partly bi
wipe woe eto teancstCing
ytiene ane wo types oF past (F
u Euan parcy
. WD Odd panily
Sven partly = fas even pasily » tue parity bit ts set te 0 oF 4
L the teansenittey io such away that tue total number o
sin the wha including the pot Fags an even oumber.
dd parity’ For odd panily, the parity Lppiigwsedls ootS
Eb rue toanenittery in such & way thal the Feta! aWembevoF
¢ im te. worl ineludiag, Hue iy bit Gao cold number:
odd & een ify
we can deéleck
t to each
in the 84a BcD code
adel parity x §oicamaly
1 - A
‘em,
O--—99-70--9
—e2-- 9-00
cmaG QEwp-s> when data & receboed , a pari
¢ 1, & pasty Ai CACcee
an eno squat if the. eel um isk sme enenales
pasity system or odd in an even- parity syslern- een 9 oeet-
= thes pail check can always cletecle a single. biternor
bub cannot detect tt av more errors wthhin the same
word : ;
> But ely sed odd parity syslem tan even parily shen
because en fe t% does not eteck the en fone atc
-seated by a short ecrcde or some oer frale
o's ASE
cond iGo -
eer Tn odet pols sgslem , wobich of the following words
conta an error
we) 1ornoull &) (00 11010 lo) U0 L0LO
Ble ia oui! = terel nom ah is € Leven] i ocd pail
syslimo So, this word has 29 error.
wy 10010 = stat um of ig et[even] - >, Ts word hos
an exvot \ ,
we Flore * total aumot 18 5 Codd] - So: this wore oes
nothave ony enor
eee once) parity echeme , which of the following coords
contain ener
1a) 1010lalo
tay tolorolo = total 2UM 06
tiiporte = tole nom o& 1S Geven. 20 error
6p, the. coord has an
errors
ow) rrp1allo o tot lool
US CUO eect lO SATO
by
'
© fotrool > to tel avn of 1s sg odd.
x Error Correcting Codes \—
Coe a er
~F Hamaing code. fs an exrot
o> Rash ib cee netect the exr0t and
from an erreneods oor +
~ >, Hacoming cocle
woe we
—y ash we will lsc Us $ abouk proceclune..
Procedame =
correcting code. '
the” correct the codeword
jue. cumbes 6& paxtly pits sequined From the
code Hat % obteinect by calevlattag ‘p’ value which
aatisfy He following expression -
2! > tp +l vohere pis 00 #6 panily bits
+
29 = number ab hformatioo/a
bls pal—> TR frad “p’ Hew we use trarl anfenor melhod
@ Ex -Frdout the no o6- tty ba eo ote
hamming code ~for rool Y BIS for constocting. tne
Sele Considem tral and ewor method
ler p23 Pp
1 8 Bim + Parl
Givendala toot
me4
P23 7
Qe utatl
8>8 (sectts Fred) - .
Miatmun oumber of partly bie ane p= 3]
@ the k panity checking bits denoléd by. P,, Pr -~-- Pe
located atk post ttans ak! trom left ave addecl to
foro an gtk) bik code word:
x Here 3 panily checking. bile clenoled by P,, Poo Po :
localed at positrons L'. 4 Poo lefF ane added ‘to
Povey 09 Cmtk)= Cuta)= # bir cocle word -
_> the bits checkect for panilg can be noted fom below table -
cthis. table (iste due error positions and corresponding values
of tre position number for 15-bik, in~bik & Pbib
Haraming cocles *
Exrot Kpaecbir code free 2-6r code] Fox 4~bil Cocle
Posteo Pg- Py Pa Pa Pa Pa Bo PA Py fa
Oo o ooo f O° 2 0,0 } a0.”
q cS eo at o eof o os
= o at oO ° o.uo Oo 10
3 ° o tl ° o tl o tt
4 0 1 oo © 1.00 1 00
s °} rot ° L oe toot
6 } 1 to ° Lt 10 U too
+ ° cig Oo 1wett rou
3 ' oe 0 : o 9 °
i i oo] t o of
aa 1 0108 TO
ay too tt
t otf
2 l 1 00
13 ' Loo
ie tol
(oO ?
t tooegs@ consider the. table having Bit location, bit desynatinn ,
information bits , panty bilt
Arilocoing. table is an example -for 7-bilk hamming. cocle
wilh dala — tool
aecnoy| al Galena enn
Bikdlesinalico Dz) Pe] OG & |23|& | Be
Du D. Di
Mes Sogehi
stegebit MF) ME) me Ms
Pool bits Py Pa.| P,
© Then Findout pornlG bit values PR, Po & Py
© Feo he table we observe that fer #-bik cocle- .
PS to be set to 0 ora | so Mat if establishes even parity
i be Da) -
bils t)3, Band + Cie) PB Dz De De
Pais ate set to Oor | SO Hak iF echablishes even pani ly
s é :
parity overt bit 213/644 ChE Pa Dg De O#)
% ty) be set to Cord SO tua th establishes even pani ly
fat Dz)-
over bite 45/6, %F CEE Py Ps D6 +)
@H theo in Hrs example
Tals lé
Bit (ocatiod ale fs [4/3 Ia}
pit deso ation| OF | eel Ds | Dy Ds [D1
message bils | 6 |S 3
Ponity bits Py Py | Pa
P, (even parity) t ° I oO} hao
at locations 3,54
P, Coven parity) | | o t lo P,=0
lat localtens 23/67
ye Paceven pail) itloleo|ll Rel
lat localions 4% 5767
Requinedt.cocde| | olo | lo fo
i) ee
Fidallg vepresenk hamming Code Dz De De Dy 03 DD):Probleo Finclece the.Hamnming cocle or the giuen lata ff)
Oloupl! [L euen
2 Guuen cata oformatiod “O1dildir *(ebik data)
checking bits foo0n the Follow ge
&
O First fad Pail
expresso0 of > Prt here 28
use Iaail ¢ ewor method
ter p=3 ads 3484!
. arin *
lee Pay a> 4484)
6>2 4% gactistied:
Minieucn umber ob- panily checking bile ane 4:
© Locate panilG checking bits fr k bis Py, Pa-- Pe
wilh ak locations -
for 4 ponity checkiqg bifs locations one
a. Bs ate 21 O
a4 1
die ge & &
wt. f4
mur #: 8 Pe
toaations for 4 pani checking. bits ane. Py PyPy and R.
@ Represent message. bile, panity checking. bits usiag ‘table.
a T T
[eit localien ihr | cw] 9 18 [Fé 514
3
Bit Resignation Dr} Diy | Dio | DF_]>B [P+ [D6] Ds]Dy | Ps
Message pile | M2] MU | M% [9 ony |mn |,
pasty bits Pg
@ Foom the table. ob error positions
for bit dala woe obsesue Tha
P, Cevenpanity) locations 1931544, '
Pp, Ceuen pasvty) locattors 813) 6) lO,
Ps (oat ponitiy) 45) 6,9
py (eed pant) B,F 110) 1 1
a fe
D, [Dy
2
s
=
=
FE
oy
P
°
o
°
°
°
°
}
}
t
t
U
t
OO FH - ~~ 8090
~9 QO
o-o~aly© Find A Pa Pu L£Pg using even and odd panily
Bit locations [i> Ju Tio 1 \8 |z b So 4 |3 [2] I
Aossqaatiod Dy}Du |Dio | Dy ]Dg | DF] De | Ps | Dy |D3 |p. | D,
meg bits |p| Mu [Mio [M4 m4\m6 |ms m3
foxclg bil Pe Py Po| Py
Giuen 3g
acevenperl | y ( t] Je} {ofa
HBS FFU
, (euen parity)
1B; 6, F 10,1)
Pig Cocker parity)
*ocitions | i [ee | Re |
4) S) 61 FNI
Pa Ca@dal parity)
locations
8,910, 1
ening code
oO
°
9
9
oP
°
3
So
°
°
Hanning codl® Mp, My, Mio Mq Pe Me ME Ms Py 7 Pa P, ts
Ugitporlgoo Lypanty pate + gdata bik]
Problem & Fbik even panilF paca code % 100g: &
Rolemmine tue enor detectioo and comect the date -
Sol Given Hamming code ts O100011
O-Find numben eb panty checking bifs usiag. expresscon)
ge Prem Given Pym=F bile
leh p22 ghd F4
42a Xx
leh p=3 g snl
BEB uv Gatisfied .
Auber 66+ partly bis io gtuan hamming coole. ane ©
© Ppeoity checking bil lecatsons ane. P,, Brand Fy.
then message. bits “1 ne Mam ME MFGruen Hammigg cocle, = 73 Ms P4yMZPs Pf
43P>P, is
o1oooll-
—7 Feo dhe table enor positans coe
, (eunn pasy locations
W3iSi>
Ps (enon panily tocattons
2)31 617
PuCeuen par 4 81 619
5 Arow the table
= = +
(Bt locations >\6 sla
Aergnaliod Dy | D6 | Ds | 4
Hama og. coole- © 1 | o/° |
m3 \me | Os} _t
Py
oO 0
Oo; |[° 1 POR Rent
oO ‘i o ' bonoexor
o}|1jo|o L> error
present
> Fron the. obsesvation [.cocmon bit location bekeveed
P, and Py checking. tits dhe]. error detected ak laxation 5:
—> So, change the 5 ik with comect tnformalon:
then MD becomes AC
— then correct aad Hamming. code %& OLlooll -
fafa 7. o1lo.