| Uwit t- Review oF NUMBER systems
| Number Systems :
a
| * Number ayplem ip a. basis Jor counting vorous ilims
| + She decimal number ayytern Aro» 10 digits + 0,1.2/3-4-57 b,
18 and 4.
+ Modern commputins communicate and opiate swith bina
‘numbers which we only the digits 0 and |
When decima) qualities ont neprusertad In tha bchaxy fovny
| ope sboingg and thookere they de
Mocking nih nang bow. Se fut got a
Feb sys
| Pedmal (BCD) -
— Numbers of Bipfrent Radia :
| Besimal Nurnbser eSystten » :
|
r dq Aumann an we con pres any ain
ane
| * Sho deutna) number 5678-9 «an
‘hee the 10 suber Indicales the aadia ot base
also be sotitien 25 5678-Io,,
|
[
|
|
L
|
|
|
|
* The. Aeptmest Aigit, which hos tha goctast weight 1 called i
the matk significant digit and the sightmest digit, shich| has the ost aueight, f called the Joast signiicant lugit
| athe table shows the decimal digit ond is weights eapressedl
25 2 power af lo.
2 ' 7
0. 0 © L je!
EE ee
in power ch lO sxio® Exio*| 1x10" Bx ioe axtol,
Map isp
BINBRY NUMBER SYSTEM :
| * Binary system autth fb tivo digs is a bose shoo ayztor
|e The two binory digits (bid are [and 0.
| + dp dino aysto weight 2 eapersed as a pour of 2:
[+ The Magram shows the sepresenation of inary camber
| Lol tol dn power 2:
| # Py adding 2ach digit of a bincryy number tn a. power of
9 we con find the Accimal aqpiialent of the given bina
ramber +
|
|
|
|
|
|
|
|
Ne 1H? FRE FORTS Leo? FD HORTA FLD =(I3- 625) 4g
|
|
|| OCTRL NUMBER SYSTEM :
number system ¢ 0, 112/3/4,5-6and 7. As ck ses 8 digifs,
8° 8? a's” a
sys! axe’ | + | axel rs? is
Ne sxe? 6xe™43xs'4axe? + 4xs 47s 4 xSP =(2170°
611328) 0 |
[ 5x3? | 6x8”
HEXADECIMAL NUMBER SYSTEM !
4 The hexadeuinal number systam Aas 2 base of lb rowing
lio chonactons + 0, 12 4,6,6,7.8,7,4,B,c, DE ~and F-
| Besima) | Binary | Octal Hexadecimal
} Oo | s000 | 0
|_000)
0010
cou
0100
|__O10]ForMAT OF A BINARY NUMBER +
ie A single digit in the binary ruumben & called bik -
| Roun .0. byte, sateen binary digits foun a werd sand thidy-
Line binary digits Joo a double werd.
Nibble » 4—biks can represent elo Aictincd values
Bujte + 8 bibs can seprsent 28 = 256 distinct value
| Wed > tb-bibs can suprwsent 2'* = 65536 values
| Double word : 32 bibs can represent 2°* = 42994967996 distine
values.
COUNTING IN RADIX (BASE) ¥ :
|g Boch number aybimn has y sab of chanadins Jer anample,
| ft Ascimal number syster v equals te 10 as to chanadors :
Pom 040%, in binary number system y equal, tp 2 Aas
2 chanaétens 0.and 1 and so . 16
* Jn general wx can say that ,.a number represertnd
yn nodixy, Aor x chaxadins in it sot and yon beRadia (Basy| Charade tm xt |
2 CBinasy) or}
3 Oe
i 4 OV
| 5 Op 2, B04
|
| & 0,1, 21 3, 495
| qT 0, 1,273741576
| 8 (octal) 0, 1,2, 34 51 b, 7
| 011,213, 4151 6,1, 8
i 10 (Beeimal) 0, 1,2, 34,5, 6, 7 & FI
| itHeadeammal) | 0,12, 3-45) 6,7, 8/9,
|
Se Ae GS epee |
Tind the decimal sqpstwalent of (231-23)4 ¢
N= 2X 474 3x4" 1K 4° 2K4 TE BAG?
= 32 +124140°540:1875
=(45- 6875)...
| Conversion OF NUMBERS FROM ONE RADIX TO ANOTHER RADIX!
Rinaoy tp Oda) Conmeuton +
|p The Jase for octal number is 8 and the base 4or inary
jnumben 2 2.
’ The Jase for celal number is the thiud power of the base
| gor dinavuy numbers. Thewejore by grouping 3 -diges of binary
| numbers sand then converting ach oup wligit to its ockofoqpivolenk ne can convent Ainany number to its octal
pivalent- :
“y Convent lolol tol. oll! 5 -ockal zqpivobent
Sotution :
| Sep 1: Make group of Shits atmeing fom isB for stlegen
| part and MsB for fodtonal part, by adding 0% ot the
nd xdpbeed |
| Slep 2+ Wile equivalent octal muumben for rach group of 3~bits
| Sept» -5f oly Jol Lol oft {+o U1 0/0} Binoy Urase 2)
Steps | | aoeeete aa tT et a0 (
Adding 0 49 make Adding 05 5
a. qacup of 3-bits make agrsup of 3 bibs
(lol oliol O11), = (255-44) g
Octal Jp Ranany Conversion :
# Conveutin from octal to binary i a reveual of the pocorn |:
fn the pawdous action Each Adjl the rota!
punber Zs individually conwetted Jp its Anany equivalent to
apt octal to binary ceonuenaion of Ahe, number .
Convert (125-623 to binary :
| Sduion 1
Step 17 Unie. aqprivalent 32-bit binary mumbsen 4or each ocbal
Noth -
Step 2: Remove any tending or drailing sores .
Sepi Ty [2 [5 [few a Ockod (Base 8
Siep 2* laoh afi ol fee] i
| Wor ofoti ji dout (pict
oe Lo. ading ous Trailing are“: (125-6215 11001)a
10 01)aiBuhany to Hosadacimal corwevion +
| # Tho base por hexadedmal number tr (6 and the base for
Moony numbers is 2°
+ She hare yor Aonodecimal numben 2s the fourth power of the
| base fer inary numbers - Tharajore , by grouping 4 digits of
Arexadzciinal aqpivalens -
Solulion +
Coat OL DINO. 1o0t10l 4 Aemadeimad aqpuirolent
Stop |: Make qoup of 4 bits Atoaling pom 1sB 4or inlagon
port and Msp for padional pod, adding 04 ct the end, |
| 3B sequbed
“Shep: ignite aquvolant Auaadacimal number gor aach gpoop
|
| 4 bil -
sep) > fofofih Joli [iol ilo] Tilo 1 oto
Adding 0s tb make Adding 0s to
a group of 4 bide make 0 goup of 4bile
© (MOLLONIOs LOOITON2 = (36EIA)e-
Hexadecimal 45 Béhory comonion :
# Consesion pom Aanademal to binary ts 2 raveucl ofConvert (8A4- B4)), to binary :
Step * Waite equivalent 4— bik Binary number of zach
| step 2+ Remove any tending o boiling eres -
Ag le £
sept | tojolo ot oj iojot). iid tia roo
| step? |t]o]ofo] ijo}tjolrfofolr |» |i loft) fof)
(844-84), 9 (100010101001, \ouo a
| Odo! 4d Hexadecimal eowenion :
| The enti sey to seruert aca eure 30 Atodecinl
|B gben below - _
) Convent ockal humber to 3b binary equivalent
)) Conuert diary number to its ¢rexadecimad eqpivalerd-
© Convert (615-25) g to ite Areaadecitnal equivalent .
| sept: Unite qptualant 2-bik Jbchay umber 40 tach octal
| digit
Slep 2 Maka group of 47bils etazding from 1SB fen iitagen
potk and MsB 4 padional part ty adding 04 af
the ond, if reqpired .
| Sepa tue agent octal number gor each group Ad 4 bits5.
The Lefmest Aik( sign bik) An the number te
the umber:
The sign bo Bd Jor posilive numbew wand it is 1 por
sogalive ma os ot 262 Br Bo
LI
| Sqo Magritte
ptnaRy ARITHMETIC!
| Binoy Addition :
| She aaaifin ontsls of 4our posse tlemanieny operation
| sta pak staan opercttons -pardca-o. sum adheie tengis
ee
| Aig
ty higher aigeiticant tk of this sasuke 25 called 007g
and Jorn significant: Bit i called sum
Such 0 operation bs Ancun -o» half additzon «
She mponaiton ashich poxfouns addition of 3 bite (2 signifi
ee
Inputs | Outputs || Addition method : oe
) Add bits column-wie abasting Jom 1s6 with casey 3 any, |
2) ut the sum ot the bottom of the same cobumn
3 Pat the coos 3h AY on the top of nant eetura,
fenforrn addition of (1001100)2 «and W1011010)2 *
|
+
1 il
[Ut fo;
Add (28) and (03)10 doy converting them inte shin aay :
(28) 0 = [0NlO0)2 -and CisDio = Gti),
eae C34
aagneslouce-[2 © ju. el Bina equuaont ef (28) 0 2),
+ 0/0/0/1 11 TW Bmary eqprivedank of 5) 0 HIS) ©
tfoltjojrp Rett + Binary eqpivabont of (430 (43) pl
”
|
i
Sign | 0°
BINARY SUBTRACTION :
poration
In old oparctions , zach aubbaced aubbahend bit
pobtracked Jpom tne miurnd ket dn case of second
operation are ménuend bee 2 smallon than the. subbrahend
ic, Aung 1 dp beroued,
|
|
|ei Octol (Bare 8)
Ceo e|
Seep |: Hilo fel leila fa Binary (Base 2)
| sepa faethe ethan -{o} tfalt fot [of ol Fas
bes eee ee eon ee
Step H
ee Adding Os lex (Base 16) |
agioup of 4-bib make agroup of
| 4-bik
Hexadecimal to Octal eorwenton :
# The conitat away to sonvort hesadecimal umber 4 cal |
number is given below.
) Convak Avsadecinad number to 2a binary, eqpslvalent
2) Convert -bénary number bo its octal eqpriivalent -
Convert (BCE AF) iy 0 ab ocd eqplualent
| Solution :
Slept! Wrikd zquiualink 4-Lie binary number for each
Avaoduimal digit
Step 2! Mobs qpoup of 248 Aouling fore ise de ingen
past ond mse go fadtinal font My odllng oa
Shep 3: Waite apes _ ae
lee a jae 6 Fr Her (Base 189}
| {jes Taare smytoe
Step: fol afufe Ws Oo Nia? iotoult
step: Aol it uneobt eit [fo torinieie inoay (Bose?
le “Te Ts [eos caus
Adding, 0 46
on
make. 0. goup of 2b make a. roup of 3s| COMPLEMENTS +
| Vs complement Representation :
j The i's complamant of a, -binaxy number ts the numben thot soul
shan wwe change all tho V's tn jena and pret tp ne
Fund U's complement of (11010100).
| lo
ne oft | ot fo fo | Number
PeLe] eRe MLA) m0" apna
fetal Oftjottyte Us complement of number .
The 2's complorent representation J» the binary number that
seaults when we add 1 te the Ls complement» $k i given
2/4 complement = l's complement + 1 -
Fahd 2's complement 4 (11000100)2 :
Li Jo To To 71 Too] Number
eae oy
Fololi itt oli fil Vs complement of number
Lf Add 1
| ” fereritiiifete 2's complement of number
SIGNED BINARY NUMBERS :
dy prockice , we suse plus algo Jo naproxen povilive value
dwar Jimitalions , in computers , both
|
|| Subtraction Method :
) Bubbrock bits gotunn -awise sbeatting From 18@ swith bernovw)
9) Puke the difterence wot the otto of the aame xctumo
2) Toke the eves, reqpied from the rent cotumn .
Fosfor (ot 10d)2- COI O010)2 + |
10 |
2 al alee |
Oo} Number 1
possetae
[ x ir N
= oO} 0/0] 1) O| Number 2
ejoh p feral
Note : (tod2-(2 = (2
Howe , the subtraction technique we Fave just aoe I
aie So dinplement wa. computtn - Thus, computor tases
. nepsesenbation te “emplemerde negative rumen «
BINARY SUBTRACTION USING 1's comPLEMENT METHOD :
Jn a 1% semplement gubtraction , negative cumber bb
nepoasertad Jo the Us complement form sand actual additzen
& peered to gt the Auted aesult-
jor enample, peuction A~B PD arjormed suing 4eboweg
ops
D Take 2's complement of B:
2) Resulk <-atits complement of
2 ceoy & gerorattd thon the aault B -poiibive ond
Jn chue foun.r
| Add cov, ce the auult to gk athe hel erate
4 Sh ceoorg Be net generated , then the adult & regalive &
| in Ie complement oun
eee aubbadion of 1-4 sing \" ‘s complement -
te 1olo
caroty e-[]} 01 0 |
L_—+ 1 Add enchaxound carcry
o1llo +6
tonwogeru
1o lo > Us complement of 5
Bee ptt wl ane cory
| OF tO eee
4 15-28 using |'s complement :
Ot ae
4 DOO 11 > Ie complement of 28
| ocoto 2 4ayoue ¢ 133
| Rajoun operation using Us complement cane rad
Fetes 01100 Tee)
te a o. 1 = V's complement of (00 |
(eesase ete Ch cay
P| Add end veround «ary
a
lorrtlo le
fe ' one fing [lg complement = Crt 01 d)2~ C0004)
Gael o 1
° t
loood
| +o 1 tl | | 9 Vs complement of Coorg
ae \
ie 1 ee
» 1 Ad and oxeund cory
o 1 © lo
perjemed te get ane dnbad see ;
ee s
[PF gine a sampbrank of
foulk
nary ais
jet rambo and Satins of Bre -alphabcly ag svell as many
ieee
eee © 18 8 eeeNumode odes exe wed te sopreeont numbers -
“eden vane awed bo represent: chonactens 2
alphabetic lations and pumerals -
ICLASSIFICATION OF BINARY CODES *.
7
| i J J T .
i Nene Reyes aoe lo Sa fe
| codon
(|
| £ L a Be 8421 oon
es 3 B sie a
oxi 1
Hasnming
WEIGHTED CoES °
fy satgpind sabes, ach Aight pion the Tues
pupaanands Ae pice WAghE”
Jor -enamphe » th dedma) code, 3p cumber in 567 then
avcighte of 5B 100, weight oF 6 1o-and sweighk of 7 |.
fifi imp ate b 8 e
toch Accimal Augih & sopwsentad Jy -< peup ef 4 bibsPositional Br prari AAfr 24]
neigh dYovavy Ve evel
oo !'1
Non -aseighitd eoder vane not assigned with any seh te
leach digit position , 1e» each ~Aigit position swithin the number
ed
Refledine coder :
A sods ts said to be vuftedtive ashen dhe code for 14 the
ceomplement 4 0, the code fot 8 4s complement 4or UT for
2b fh Band 5 for 4- }
Pesitimal 9 + 4 +
wights | yi f
code 42h 49 7 7
defer o jo °
|
Non-aweighted pades : |
|
|
|
|
|
|
|
|
o fo)
|
i
\
|
|
|
Sequential codes + .
fy aaqpertial coden 2ach auccatbiog code bone binary |
A ic codes
|
|a si ie ww
Tha mest commeny sued volphanumenic codss ere + ASCII |
CAmmican Standand code fot Information Srdechange), EBCDIC |
(Eatnded Birary Coded Bedmal Jntwuchange cede) and
| Retloith code.
| de oanay change to 1 vice versa, Aue tp presence of noise
die maintaty he Join, sAtepity Aenea amen a
| ecoter, zara Bik ct moe than one tik cane added in the
Ghose ak osha bits -allows the detection vand sonnetines
| exrechion ol exci ah the dota
ie a. walong with the entra bit/ iby foums the coke
\adoding de sand codan hich lime omer dation and
| i
| omedoon one called over detecting cond wtonding odes
| cp (Binony Coded Decimal Codes
Bep an -abbeviation or behary coded dacima)
f pep ub 2 rumatic code inushich ach diget of -a decimal
‘number 2p aaproserited by va acpanetta gacup of 4~ bil The
\
j mate common BCD code is gx 4-2-1 BOD.
\ nn4A ts called 8-4-2-] BCB Lecorue the sence cowocicted uéth|
dod are S-4-2-) Aromn Aeft te subhe This means that, 4ib3)
[Aor svcight 8, bie-2 Aros aweighk 4 bet! Aas aweght 2 and
bik-0 Aros snelghe 3 -
Boainal
BCD code |
Digue [ 3 42a
| oO ° ° o |
| he er ree
2 ° ee |
3 ° ° t]
4 | O | o lol
5 ° i olf 3
i 6 ° ce
| a a
| | i
| ee eee
eagle calc peer
| adad with 8-4-2-1 BCD codes,
Beutnal [ ge |
3-2-1B9[0] le] | ole'e|
Advantages i
Easy be convent Hetuoean Ht and decimal. |
|
|
| Disadvantage +
Bier ik nequriues mmete Jira digit, bo seprerenk multi -
Aigit number then bthaxy number aystor - St is tose -2fficant .
(Fer aaample , to represent the dame cumber (68.19 binary :((Jo10),we reqpioe oly 6 digits -
Arithmetic cpuations o7e mete comploa
| Bep Additon +
The addition of tino Bcd numbers can -be best undowtood by
sanasdviing Ae Amen casen thot con shan Lire Bcd digits
ere odded .
Case 11 Bum equals 9 ot Los with cavoy 0°
| 1 | Casory
| 6 OF t Oo Bed 4n6 5 o 1 O 1 BeDfers|
| 436 Orta Beo fer 3 tite Oo 0 | & Bidfery
| a6 | 6 0 | Borg Too 1 1 i |
comy cyt
‘ J) —_ Volid e@ep
i Numbers
Cosa 2+ Aum grantor Ahan 9 with corey O°
{ & Gt (0) Bto ion. 6
| 43 1 0 © 0 Bep fer 3
lap 0 1 1 | © Srwalid Ber number (111004
|° (io Beco for 6
+68 l 0 006 Bep se 3a
\t el Casey
t ot 1 0 Srakd Boo number
4+ DL tL © Add 6 fer conncition
Gayl oe 8
foootfo'l o of Berga 14
a
fio |e Becta
After addition 6} & caomuy J grocced Jrethe second .Ascinal
Case 3: dum aquals 1 or tow ash covery
aq oe 1 0 0 0) pep s
7 (One O.ail Ber 4 4
cooy [J 0 0 oO |
yoo 6 0 0 1 Sreeteck Bcd result
Add 6 for crvedion
60 010) 0 Neato
Bo Oe a Ben day
t 1
gn this case , rest (p00! 0001) & valid Bop number , but st
fncoveck . To gat the code Bop result comredion fackn of 6 tos
fp be added to the loast significant diget auonr| Procedure of Bop Addition :
Apoing trough hose Awe cases of Bcd -addatton wwe con
summanie the BeD addition puredue 5 follows +
| DAdd two BCD rumbew 4ning ordinary Ainory eddition
2) gh foun bit auan Js zqual ye des than 4. oe covedion
neded. Tre aur 2 Jn -pcopan BED {own
98 tha Aur ike Aura Js agpantin Ahan 4 ov Ya sony Ze
4) Jo sooect the siwalid sum, add & (Ole te the foun bit
neu from thi addition, odd it An the nonce
aur. Sh a.
Kaighor- otden Bed digit
1) Ream Bey addition wseng for fotlousing spestions *
pore
| 10 +> cool 0000
5? eco 00 (yeaa (
[ees OeeeeL
oo ol oO
~~
——
4 s
li) 12443
loa ae, On Onion. b000 oolo
| 42 0000 Ot o0o oot]
| 145
| cool OglnOnOOmteO sal
; geen | eee aa
' 4 See ee :
W) 24452 ° i
ee colo Ol 0.
eos POT Ond oo | 0
16 to fe
ST ce
al 6
Ww) 46426!
46 otloo Oe eee j
#26 pO lO. Cae (a
| 12 Oo} t oO th Oo trwalid BD
~ ©6060 Oi] © > Add 6 for
eornedion
Of lo OS
oe eT
| 4 ai |
WD 6 eres!
ae olto Clio
i Cai GusG: stage Ose aaa as Oca ata) ae
| (32
! 1100 Ll © 0 gnabid Bed rewh
i 1
| Oe Ow 10 Add 6 for corrects
1
| ° fo Olt OOO 1
) 3 2
|
‘vd 5at4g :
| ne o' Ol lIeoe0
| t+4e PO OO] tO OlOa eu.
| is a ee
(06 SweltAbe 1 Db > BOO o
i tt 000 0
\ Add & 4ercomector 0 oO 5002
| ey eee ee eee 8 D2 MO
mae ON
Cie ol Oto OO Oe oc.ee
fen ee q's complement rnethed !
Aabbradien of BED numbers can be pefouned by agpwsenling
negative. auumbens Jn the 415 -coroplemant form -
Sh 4's compart ofa aeimal uumen 16 ue 19
aalrating zach digit So fon of swmier sper 4.
The Ms complarant A ach of MMe dual digit as
q 4
011 j2 (81415 |6/7/8 [9 | Beamal dig
lalah tels iets ahi TE ab competent
Find the 1's complement H (249 D bg
Aa |
4 97 (B4DeED
o 2 Q's complement of 849°D peo
Steps for aubbiaction of Bcd numbers sing 1 complement method :
| step Find the 4's complament of negative sumber
| ctep2: Add Sve numbers 24ing Bcd addition (Minuenad + 2
seormplament® of ankbeahend )
2: comm io ook quoted salt & negaine and find Ne
98 complement of dhe rast, othouwie xault Lb foddive
wand cosy to the result.
w 2
>.
om
wt= eiciseaun <
fecforrn (46) GD o> - BoD austng ale complement .
Step 4: “ind Qs complement of 22-
4'5 complement of 22 =(94-29)= 97.
Step2 + Add 46 wand 9's complement of 22.
! i |
ee Ol © C46) Bed |
ol
| eo Oey 1 (4% 12)
a lo |
ee ee
tort VI Ol “gruralid aco members
ONTO C110 Add 6 tr each digit
Mooto 601,
-___.——_? | Add and crcound covery
oo lo Clo~o
——
a 4 Result
Refer (2M.0-C%o in wep sing ft ;
Sep: Find @' complement of 56
9% complement of Sb = 14-56 =42-
Step 2: Add (240 and 12 complement of 56.
Smee cory 4 0, the anaver negative |
CFO Oe 6 | 6 6 624) acs
j 20] lOO © © 1 1 4's complement ef(S6 ep)
Ol OO]
ee ae
cory efoJot to ot 1 7 GDBeD
| Step: Take 4's complement of answer 67 = 19-67= 32
| Gare - G10 = 32) 0,1
|
| Redoun [8Dio~ (4010 in Bep asing 4b complement -
pp 2:
|
|
{
|
|
!
|
t
|
I
\
Find 1's complament of 409 49-409 59
Add (aang 9's complement of #2 40
I cax0ug
[02 O80) 000\ CBD Bep
(OO! 1 oot 9's comploment of Go) BeD
eee
trol 1 © 10 grwalid BD numbers
+ O&O LILO Oto Add 64n ach digik
| j Payer — dn BCD -usthg Te
{sop
Sind 4s complement of 81> 44-81 + 18
lotep 2: Add 40 and 4's complement of 81.
|
I
|
|
|
|
Onn TOrrO! 0000 Go) BCD
5 6 0 | Ia ooo a's complement of ()
ee
Ct on | 10 Oo 5
effdo t o1 ios 6
cI uw 8
ror Take complement ane 58 5 99-58 9 4
(40) to- Bie = CH) joLt
| BCD aubiadkion aaing (0% complement methert »
| ubtiadion of Be® numbew can wale -be podormed by
| sqpoasting ragalive numbers in the to's