You are on page 1of 45

1.

Number Systems bS

C b SI , ornmon Number Systems


Used by' hu m an rs?
_ 1. ,._ '.J

System

Base :1.0

Symbols 0; 1, ... 9

Used in computers? No

'\J"

res

No 8 Hexa decimal
~.:.,:_.!iift

Yes
No No

0; 1; ... 7 0; 1; ... 9; A :; B',;.. .... F"


....
-.

No No

],6

.·.· j:C·.ountmg (.....1' 0'[.".: 3··....)-..... .. .• ..•.... ,-'.•.. Quantines/


Decimal

Binanr
0 1

O'etaT
0 1

Hexa-d,eCl1TIH 1 · ..
0 1 .2

o
1
2

10 11 100 101 110


III

.2 3 4
5

3
5 6 7

3 5

6
7

6
7

.. uantities/Ieounting (2 0"f---- 3-) ..•.• · t. ',•••••... ,. Q


I

Decimal
~.. .

Binarv

Octal

Hexad,eCl1TIH 1 · .. '8
I"'~ .

'8
9

1000
......

10
1.1

1001 1010 101 1


1100 1101 1. 110
11 11

9
A
I

10
,

12 13 14
IS'

11 1.2

'8
I

C
-

13 14
IS'

D
I

16 17

E F
I

.. uantities/Ieounting (3i 0"f'-', 3-) ..•.• · ·•.••..•',•••••... . ,. Q


Decimal Binarv Octal
",_,'

Hexa-d,eCl1TIH 1 · ..

16
17 18 19

10000
",_,' ",_,' ",_,'

20
21

10
II

10001
1nO"10" U"-_" ",-_"

22
23
24

1.2 13
14,

10011 10100 10101 10110


101.11

20
,21 ,2,2 ,23

25

15

26
,

_ ,: 27
_'

16
17
:Etc·,

,. .~··.····mong" ases "B"' , onverSlon A···· .. C

'Decimal

Binary

., Q
-', "',,<:-'

kE x,amp,,.,e U},CI:.', "- .. , 1


',. . ..,' ".' ''' ,',,' "'.'" ,,",

25
.~' '. ::~:

..

,·t·"

10 _

'1-,00-1 '2 1
. '. : ".-.". : ".-.". '.

_,

-'I 3
~'''.• ", -'j ,

,,'

_,

"19
: ",.-. '. ",
,"

16

Base

Decimal to Decimal Gust for fun)

', -' · DJecima! 1

Octal

'Binary

'Hexadecimal

5'" ,12····· ·····-10

-> - ....

5 x 10° 2
X X

5
20 - 100 125

101 10.2

Base

,
'B"

'·'·,'l·n'"~···a·"·ry'.'.. to:. _.'

~ "D'

·····e··c···}·m·'·_' , tal /' ", . I, I,:.

'Decimal

'Binary

'B"

'·'·,'l·n'"~···a·"·ry'.'.. to:' _.'

~"

D'

·····e··c···}·m"·_' , tal /,", . I, I,:.


.. 11. IS
th- . e '" weight ,,' .. h '.

.. Technique
'1b .. by Z", h ,_,M u,'lt],P,,'Y' eac 'h.brt b 211 w" ere of the 'bit
i, ,=,

The weight is the position, ofthe bit, starting from 0 on. the right

,~, dd the results A

Ex" 'a'-m"" . iple


"'~ _' 1,.,.. ... '•. ', ,'-

',I +t· 8,

' "' 0· .. .."

.1 x 2 0 .1 x 2 1 0 x 22 .1 X 2 3 0 X 2 ,4 .1 X 2 5
.

1 2

o
8

I-

o
.

32·•···

10······
.... _ ...

····.··IC'-'t·-._ .... :

:_ I

al t Decimtal
__ ._.:.... :_

·0····
..

"_.

':'1

..'

__ '

' ...

::'

._

...•

1._._

'_ .. _ .....

'Decimal

'Binary

10······
.... _ ...

····.··IC'-'t·-._ .... :

:_ I

al t Decimtal
__ ._.:.... :_

·0····
..

"_.

':'1

..'

__ '

' ...

::'

._

...•

1._._

'_ .. _ .....

.. Technique
._.Multiply each 'bit by .§.n, where of the 'bit
.=.

11.

is the "weight"

The weight is the position. ofthe bit, starting from 0 on. the right .~. dd the results A

Ex" 'a'-m"" . iple


"'~ _' 1,.,., ... '. ,', ,'-

7248

=>,

4: x 8° 2 }C, 81 -

7 x 82

16 4: 48 4: 6 810

'Decimal

'Binary

.. Technique
,-, Multiply each 'bit by 1,611, where n is the "weight' of the 'bit The weight is the position, ofthe bit, starting from 0 on, the right ,~, dd the results A

,=,

Ex" 'a'-m"" . iple


"'~. _' 1,.,.. ... '•. ', ,"

c x 16 0
_,
.
,

,_

B x 16 ]. ,_ ~~2 A x, 16,.. -

- .12 x - .1 1 x

.1 12 _ 16 - .176 ,1·IO~.i ,x 256 _ '_.... . :.-, 2560


.

D '" . ecnna.l: 'B'" to Inary


.J

'Decimal

'Binary

D '" . ecnna.l: 'B'" to Inary


.J

.. Technique
,_,Divide by two, keep track ofthe remainder ,~,First remainder is bit 0 (L'SB, least-significant bit) ,~,Second remainder is bit 1 ,~,Etc~

Ex" 'a'-m"" iple


"'~. _' 1,.,., '.. '. ,', ,"

12 510
_ I',

_ -

? ,2
I~'

I 2I 2I
2 2 2 2
~ ~

2 I 12 5

62
~ I .. ::.•,

.1

31 15
7

0 1 1
1 1 .1

3 1
0
I

1251Q

,_

1111101.2

1'"""",1

.....1'" .1nary O eta. to. '.-B······" ."


. "'.' .•. . ..-

.. , .,...... ' ,..•.•.

'Decimal

'Binary

1",",,1

.....1'" ' '·'·' .' O eta. to. .-B'·.1nary


. ,'.'.•.. ..-

.. , "... •.•. ".,', '

.. Technique
,_,Convert each octal digit to a 3... equivalent bit binary representation

Ex" 'a'-m"" . iple


"'~. _' 1,.,.. ... '•. ', ,"

111 000 101

!!!
7058
,_

1110001012

'H" .

" ..... d '" 1'.to '..lnary ,exaeClma " B'" ., " "
_"

'

..

'.

'".--_

,"..

..

,",

,"

,".

'.

".--_

-_-

'

...

"

'",

".--_.

..

'Decimal

'Binary

....

" ..... d '" 1 ," ..lnary ,exaeClma .to 'B'" ., " "
'H" ,
_"

'

..

'.

'".--_

,"..

..

,",

,"

,".

'.

".--_

-_-

'

...

"

'",

".--_.

.. Technique
,_,Convert each hex,adecimal digit to a -l-bit equivalent binary representation

Ex" 'a'-m"" . iple


"'~. _' 1,.,.. ... '•. ', ,"

10,AF16

?'2

0001

!!!!
1 __'

0000
I.

1_

1010

1111

10,AF16 - 0001000010101111 --.--. -

.2

' eel.ma" to 0·····' . ..',.' ,D'".... .. l: I..··.·..··eta1 ·.


,." " ...."/1

'Decimal

..

",'.

'Binary

' eel.ma" to 0·····' . ..',.' ,D'".... .. l: I..··.·..··eta1 ·.


,." " ...."/1

.. Technique
,_,Divide by 8

,~,Keep track ofthe remainder

Ex" 'a'-m"" . iple


"'~. _' 1,.,.. ... '•. ', ,"

8 8 8 8

I 1234
~

I I

154 19 2

2 2

3 2

12341Q

,_

2322.8

H" deci D· , 'eClma,I',to ,'",'e,x,a'e1Clma,1,


.. ", ," ,." ·"t· '.
"'-'0' ," .",. ," ", .'. '"._'. ," ", .. ". ," ,."

·"t·

'.

",',

'Decimal

'Binary

deci .. D · I' H" . 'eClma.. to .'.,,'e.x.a'e1Clma 1


. . ", ," ,." ·"t· '.
"'-'0' ," .",. ," ", .'. '"._'. ," ", .. ". ," ,."

·"t·

'.

",',

.. Technique
._.Divide by 1,6
.

Ex" 'a'-m"" . iple


"'~. _' 1,.,.. ... '•. ', ,"

16 11234 16 I 77 16 I 4

2 13 4:

. ..lnary to .eta .
'-B' ",,~, , .. '
' ........, ", . ""I

0·:'···· ."
..... ',.,,'

'Decimal

'Binary

. ..lnary to .eta .
'-B' .... ~" . ..'
• ........, ", . •• .• 1

0··.····· ..' 1 .
..... r .•.. '

.. Technique
._.Group bi
8.

in threes, starting on right

,~,Convert to octal digits

Ex" 'a'-m"" . iple


"'~. _' 1,.,.. ... '•. ', ,"

10110101112

,_

?8

1111
1 3 2
.

1 011 010 111

10110101112

13278

'..·.Inary to ..... d ecnna 1 B"'" .' 'H'" exa .... .


..' "."i " ..:" .,' . .... '.. ." '.'. '_ .','
'! ..."""....

'*'

":

'Decimal

'Binary

'..·.Inary to ..... d ecnna1 B"'" .' 'H'" exa .... .


..' "."i ' ":' .,' . .... '.. ." '.'. '_ .','
'! ...,"....

'*'

":

.. Technique
,_,Group bi
8.

in fours, starting o:n right

,~,Convert to hexadecimal digits

Ex" 'a'-m"" . iple


"'~. _' 1,.,.. ... '•. ', ,"

10101110112

'?

~,16

!!!
3
B B

10 1011

1011

10101110112

,_

2:BB]_6

'Decimal

'Binary

.. Technique
._.U'8 e binary' as an. intermediary
1

Example
10768
?

~16

001

!!! !
I

0 00

111

110

3
,

10768

,_

23E16

deci ....:· · eta ",'e,x,a'eCI.ma" I': to' 0·····.' 1


'H"
", ... ' ".___ ,", ,"' ", ," ." ," t· '. ".___ . -._. ", ,"' ". _

'Decimal

'Binary

deci ....:· · eta ",'e,x,a'eCI.ma" I': to' 0·····.' 1


'H"
", ... ' ".___ ,", ,"' ", ," ." ," t· '. ".___ . -._. ", ,"' ". _

.. Technique
,_,Use binary' as an, intermediary

Ex" 'a'-m"" . iple


"'~. _' 1,.,.. ... '•. ', ,"

I_

0 001 .1

!!!
111 1 7
1

00 00
_ ---'

I_

_I

1100

,_ 174148

You might also like