You are on page 1of 7

Bata Repiesentation Page

Data Rprsntation
O CompuLers use dlalLal represenLaLlon
O ased on a blnarv svsLem
(uses on/off sLaLes Lo represenL 2 dlalLs)
O ,anv dlfferenL Lvpes of daLa
O daLa (no maLLer how complex)
musL be represenLed ln memorv as blnarv dlalLs (blLs)
Dec|ma| Number 5ystem
O @he declmal svsLem ls a base10 svsLem
O @here are 10 dlsLlncL dlalLs (0 Lo 9) Lo represenL anv quanLlLv
O or an ndlalL number Lhe value LhaL each dlalL represenLs depends on lLs welahL or poslLlon
O @he welahLs are based on powers of 10
O 1024 1*10
3
+ 0*10
2
+ 2*10
1
+ 4*10
0
1000 + 20 + 4
Where 10
0
10
1
10
2


10
3
are Lhe poslLlonal values or welahL Slnce 1 carrles Lhe mosL welahL of 4 dlalLs lL
ls called ,Su (,osL SlanlflcanL ulalL) and 4 carrles Lhe leasL welahL lL ls called Lhe easL slanlflcanL dlalL
Su
8|nary Number 5ystem
O @he blnarv svsLem ls a base2 svsLem
O @here are 2 dlsLlncL dlalLs (0 and 1) Lo represenL anv quanLlLv
O or an ndlalL number Lhe value of a dlalL ln each column depends on lLs poslLlon
O @he welahLs are based on powers of 2
1011
2
1*2
3
+ 0*2
2
+ 1*2
1
+ 1*2
0
8+2+1 11
10
Ccta| Number 5ystem
O cLal and hexadeclmal svsLems provlde a shorLhand wav Lo deal wlLh Lhe lona sLrlnas of 1's
and 0's ln blnarv
O cLal ls base8 svsLem uslna Lhe dlalLs 0 Lo 7
O @o converL Lo declmal vou can aaaln use a column welahLed svsLem
12
8
*8
3
+ *8
2
+ 1*8
1
+ 2*8
0
3914
10

O n ocLal number can easllv be converLed Lo blnarv bv replaclna each ocLal dlalL wlLh Lhe
correspondlna aroup of 3 blnarv dlalLs
12
8
111101001010
2

nexadec|ma| Number 5ystem
O exadeclmal ls a base16 svsLem
O L conLalns Lhe dlalLs 0 Lo 9 and Lhe leLLers Lo (16 dlalL values)
O @he leLLers Lo represenL Lhe unlL values 10 Lo 13
O @hls svsLem ls ofLen used ln proarammlna as a condensed form for blnarv numbers (0x00
00h)
O @o converL Lo declmal use a welahLed svsLem wlLh powers of 16
O Converslon Lo blnarv ls done Lhe same wav as ocLal Lo blnarv converslons
O @hls Llme Lhouah Lhe blnarv dlalLs are oraanlsed lnLo aroups of 4
Bata Repiesentation Page

O Converslon from blnarv Lo hexadeclmal lnvolves breaklna Lhe blLs lnLo aroups of 4 and
replaclna Lhem wlLh Lhe hexadeclmal equlvalenL
Dec|ma| to 8ase
N
Convers|ons
O @o converL from declmal Lo a dlfferenL number base such as cLal lnarv or exadeclmal
lnvolves repeaLed dlvlslon bv LhaL number base
O eep dlvldlna unLll Lhe quoLlenL ls zero
O Dse Lhe remalnders ln reverse order as Lhe dlalLs of Lhe converLed number
Dec|ma| to 8|nary Convers|on
n Lhls meLhod Lhe number ls repeaLedlv dlvlded bv 2 and
each Llme lLs remalnder ls Laken ouL and placed on Lhe
rlahL slde @he flnal blnarv value ls obLalned bv comblnlna
all Lhe remalnders wlLh Lhe lasL remalnder belna Lhe mosL
slanlflcanL blL
ueclmal Lo lnarv 1492 (declmal) ??? (blnarv)
8epeaLed ulvlde bv 2
(1492)
10
(10111010100)
2

Convert|ng dec|ma| fract|ons to b|nary
@o converL a declmal fracLlon Lo blnarv Lhe declmal fracLlon ls successlvelv mulLlplled bv 2 and Lhen all
Lhe numbers Lo Lhe lefL of declmal polnL (lnLeaer parL) ls collecLed aolna downwards Lxample (014)
10
Lo
blnarv
roducL nLeaer parL
014*2 028 0
028*2 036 0
036*2 112 1
012*2 024 0
024*2 048 0

@hls sequence keeps on aolna Lherefore Lhe exacL blnarv value cannoL be Laken ouL or Lhls conLlnue
onlv Llll flve places and aeL Lhe answer (00100)
2

@o converL a mlxed number such as 2314 Lo blnarv flrsL converL Lhe lnLeaer Lo lLs blnarv equlvalenL and
Lhen Lhe fracLlon le Lhe answer would be (1100100100)
2

8|nary to Dec|ma| Convers|on
blnarv number svsLem can be converLed Lo lLs declmal equlvalenL bv addlna LoaeLher Lhe producL of
each blnarv dlalL wlLh lLs poslLlonal value or welahL
Lxample ConverL (1101000101)
2
Lo declmal
1*2
3
+ 1*2
2
+ 0*2
1
+ 1*2
1
+ 0*2
1
+ 0*2
2
+0*2
3
+ 1*2
4
+ 0*2
3
+ 1*2
6

Bata Repiesentation Page

8+4+0+1+0+0+0+1/16+0+1/64
13+00623+0/013623
(13078123)
10

Dec|ma| to Ccta| Convers|on
n Lhls meLhod Lhe number ls repeaLedlv dlvlded bv 8 and each Llme lLs remalnder ls Laken ouL and
placed on Lhe rlahL slde @he flnal cLal value ls obLalned bv comblnlna all Lhe remalnders wlLh Lhe lasL
remalnder belna Lhe mosL slanlflcanL dlalL
ConverL (233)
10
Lo cLal
8emalnder
8 233
8 31 7
8 3 7
0 3
@he ConverLed value ls (377)
8

Convert|ng dec|ma| fract|on to octa|
@o converL a declmal fracLlon Lo ocLal Lhe declmal fracLlon ls successlvelv mulLlplled bv 8 and Lhen all
Lhe numbers Lo Lhe lefL of declmal polnL(lnLeaer parL ls collecLed aolna downwards
Lxample ConverL (0373)
10
Lo ocLal
roducL nLeaer parL
0373*8 30 3
00*8 0 0
@he converLed value ls (030)
8

n case of value where Lhe sequence ls conLlnued le conLlnuouslv Lhere are lnLeaer values comlna Lake
lL upLo 3 places afLer declmal polnLs @o converL a mlxed number such as (233373) Lo cLal flrsL
converL Lhe lnLeaer Lo lLs cLal equlvalenL and Lhen Lhe fracLlon le Lhe answer would be (3773)
8
Ccta| to Dec|ma| Convers|on
n cLal number svsLem can be converLed Lo lLs declmal equlvalenL bv addlna LoaeLher Lhe producL of
each cLal dlalL wlLh lLs poslLlonal value or welahL
Lxample ConverL (246)
8
Lo declmal
2*8
1
+ 4*8
0
+ 6*8
1

2073
10

Ccta| to 8|nary Convers|on
Bata Repiesentation Page

@he converslon of ocLal Lo blnarv ls done bv converLlna each ocLal dlalL Lo lLs 3blL blnarv equlvalenL
slnce all elahL numbers ln ocLal can be represenLed ln 3blL form
cLal ulalL lnarv LqulvalenL
0 000
1 001
2 010
3 011
4 100
3 101
6 110
7 111
@herefore uslna Lhese converslons anv ocLal number ls converLed Lo blnarv bv lndlvlduallv converLlna
each dlalL
Lxample
ConverL (463)
8
Lo blnarv
4


6 3 3
100 110 011 101
(100110011101)
2

Convers|on of 8|nary to Ccta| @hls ls slmplv Lo reverse Lhe prevlous meLhod le Lhe blLs of blnarv
lnLeaer are arouped lnLo aroups of Lhree blLs sLarLlna from leasL slanlflcanL blL (S)
Lxample ConverL (110011)
2
Lo ocLal
110 011
6 3 (63)
8
n case Lhere are no proper aroups of 3 blLs one or Lwo zeros are added Lo Lhe lefL of ,osL slanlflcanL
blL (,S) of Lhe blnarv number Lo make proper 3blL aroups or example 1101 ls equlvalenL Lo 001 101
and Lhen form 3blL aroups from S @he same process applles on fracLlons buL afLer declmal polnL
Lhe aroups of 3 blLs are made lefL Lo rlahL
110010
110 010
6 2 (62)
8

Dec|ma| to nexadec|ma| Convers|on
n Lhls meLhod Lhe number ls repeaLedlv dlvlded bv 16 and each Llme lLs remalnder ls Laken ouL and
placed on Lhe rlahL slde @he flnal hex value ls obLalned bv comblnlna all Lhe remalnders wlLh Lhe lasL
remalnder belna Lhe mosL slanlflcanL dlalL Lxample
Bata Repiesentation Page

ConverL (326)
10
Lo hex
8emalnder
16 326
16 32 L
16 2 0
0 2
(20L)
16

Convert|ng Dec|ma| fract|ons to hex
@o converL a declmal fracLlon Lo hex Lhe declmal fracLlon ls successlvelv mulLlplled bv 16 and Lhen all
Lhe numbers Lo Lhe lefL of declmal polnL(lnLeaer parL) ls collecLed aolna downwards
Lxample ConverL (003123)
10
Lo hex
roducL nLeaer parL
03123*16 03 0
03*16 80 8
@he value ls (008)
16

@o converL a mlxed number such as (32603123)
10
Lo hex flrsL converL Lhe lnLeaer Lo lLs hex equlvalenL
and Lhen Lhe fracLlon lee Lhe answer would be (20L08)
16

nex to Dec|ma| convers|on
hexadeclmal number svsLem can be converLed Lo lLs declmal equlvalenL bv addlna LoaeLher Lhe
producL of each hexadeclmal dlalL wlLh lLs poslLlonal value or welahL Lxample ConverL (20L23)
16
Lo
declmal
2*16
2
+ 0*16
1
+ L*16
0
+ 2*16
1
+ 3*16
2
(3261233)
10

nexadec|ma| to b|nary Convers|on
@he converslon of hexadeclmal Lo blnarv ls done bv converLlna each hexadeclmal dlalL Lo lLs 4blL blnarv
equlvalenL slnce all slxLeen numbers ln hexadeclmal can be represenLed ln 4blL form
exadeclmal ulalL lnarv equlvalenL
0 0000
1 0001
2 0010
3 0011
4 0100
3 0101
6 0110
7 0111
8 1000
9 1001
10 () 1010
11() 1011
12 (C ) 1100
13 (u) 1101
14 (L) 1110
Bata Repiesentation Page

13 () 1111
@herefore uslna Lhese converslons anv hexadeclmal number ls converLed Lo blnarv bv lndlvlduallv
converLlna each dlalL Lxample ConverL (483)
16
Lo blnarv
4 8 3
0100 1000 0011
(010010000011)
2

Convers|on of b|nary to nexadec|ma|
@hls ls Lo slmplv Lhe reverse of prevlous meLhod le Lhe blLs of blnarv lnLeaer are arouped lnLo aroups of
4 blLs sLarLlna from leasL slanlflcanL blL (S) Lxample ConverL 911001101)
2
Lo hexadeclmal
1100 1101
C u
(Cu)
16

n case Lhere are no proper aropu of 4 blLs one or Lwo zeroes are added Lo Lhe efL or ,S of Lhe
blnarv number Lo make proper 4blL aroups or example 11101 ls equlvalenL Lo 00011101 and Lhen
form 4blL aroups from S @he same process applles on fracLlons buL afLer declmal polnL Lhe aroups
of 4 blLs are made from lefL Lo rlahL
01100010 (62)
16
8|nary kepresentat|on of |ntegers lnLeaers mav be represenLed ln Lhree dlfferenL forms ln memorv
1 Slan and ,aanlLude form
2 ne's complemenL form
3 @wo's complemenL form
5|gn and Magn|tude form nLeaers are represenLed bv Lhelr slans(+ or _ and a seL of dlalLs whlch
represenL maanlLude or example +2017eLc n slan and maanlLude form Lo represenL slan of a
number mosL slanlflcanL blL ls used 0 for poslLlve and 1 for neaaLlve f Lhe word slze of compuLer ls
8 blLs Lhen +6 wlll be represenLed as 00000110
,S ls 0 for poslLlve number 8emalnlna dlalLs Lo denoLe blnarv equlvalenL of value 6

6 wlll be represenLed as 10000110
,S ls 1 for neaaLlve number 8emalnlna dlalLs Lo denoLe blnarv equlvalenL of value 6
@oLal numbers whlch can be represenLed bv n blL word 2
n
n 8blL word can be represenL 2
8

236 numbers le 127 Lo 0 and 0 Lo +128
Cne's Comp|ement form ne's ComplemenL represenL poslLlve numbers bv Lhelr blnarv
equlvalenL and neaaLlve numbers bv Lhelr 1's complemenL (replace 0's wlLh 1's and 1's wlLh 0's of
Lhe blnarv equlvalenL value) or ex Lo represenL +8 and 8 ln 8 blL one's complemenL form
Bata Repiesentation Page

+8 00001000 (blnarv equlvalenL of 8)
8 11110111 (1's complemenL )
We aeL Lhls ln Lwo sLeps
1 lrsL aeL Lhe blnarv equlvalenL le 1000 and make lL 8blLs bv puLLlna 0's Lowards Lhe lefL hand
slde le00001000
2 @hen replace 0's wlLh 1's and 1's wlLh 0's le11110111
@oLal numbers represenLed bv n blLs are 2
n

@o's comp|ement form for a poslLlve number Lhe Lwo's complemenL meLhod represenLs lL as lLs
blnarv equlvalenL @he neaaLlve numbers ln 2's complemenL form ls done bv addlna 1 Lo lLs one's
complemenL form some of Lhe blnarv addlLlon rules are
0+0 0
0+1 1
1+01
1+1 10 (where 1 ls Laken as carrv over)

or example @wo's complemenL of +9 00001001 (@hls ls blnarv equlvalenL of 9 wlLh empLv
blLs replaced wlLh 0 Lowards Lhe lefL hand slde)
@wo's complemenL of 9 ls done ln Lhree sLeps
1 lrsL aeL Lhe blnarv equlvalenL of 9 le 1001 and make lL 8blLs bv puLLlna 0's Lowards Lhe lefL
hand slde le00001001
2 @hen replace 0's wlLh 1's and 1's wlLh 0's le11110110
3 @hlrd add 1 Lo lL 11110110
+ 1
11110111
@hus Lhe Lwo's complemenL of 9 ls 11110111 @oLal numbers wlLh a word of n blLs are 2
n

8epresenLlna CharacLers ln ,emorv
1 5CII (merlcan SLandard Code of nformaLlon nLerchanae) Lhls ls Lhe mosL wldelv used
alphanumerlc code for represenLlna anv alphabeL dlalL or speclal characLer L ls a 7blL
code Lherefore lL can be represenL 2
7
128 characLers @hls can represenL all kevboard
characLers
2 I5CII (ndlan SLandard Code of nformaLlon nLerchanae) common sLandard code for ndlan
scrlpLs or ndlan lanauaaes ls made whlch can be used on compuLers called SC @hls ls an 8
blL code for codlna 2
8
236 characLers @hls reLalns all SC characLers and has codlna for
ndlan scrlpLs as well
3 DNICCDL @hls ls a 16blL sLandard code and lL can code 63000 characLers L ls used for
represenLaLlon of LexL of anv lanauaae of Lhe world L asslans each characLer a unlque number

You might also like