Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Convert a number in binary, octal, or hexadecimal to a number in the decimal system.

Convert from (integer) binary to decimal

(101)2 ==? ( 5 )10

1 0 1
22 21 20
4 2 1
1*4 0*2 1*1
4 0 1
4+0+1 = 5

(1011)2= ( 11)10

1 0 1 1
8 4 2 1
8 0 2 1
8+0+2+1 = 11

Convert from (Fractional) binary to decimal

(0.11)2 = (0.75)10

0 . 1 1
. 2-1 2-2
. 1/2 1/4
. 0.5 0.25
. 0.75
.

General example

(1110111.101)2 = (119.625)10

1 1 1 0 1 1 1 . 1 0 1
6 5 4 3 2 1 0 -1 -2 -3
2 2 2 2 2 2 2 2 2 2
.
64 32 16 8 4 2 1 . 0.5 0.25 0.125

64 32 16 0 4 2 1 0.5 0 0.125
.
64+32+16+4+2+1 = 119 119 0.5+0.125 = 0.625
.
119 0.625
.
(1A)16 = (26)10

1 A

1 10

161 160

16 1

1*16 = 16 10*1 = 10

16+10 = 26

Ternary T ={0,1,2}

(11021)3 = (115)10

1 1 0 2 1
34 33 32 31 30
81 27 9 3 1
81 27 0 6 1
81+27+0+6+1 115
Convert a number in the decimal system to a number in binary, octal, or hexadecimal.

(12)10 = (1100)2

1 3 6 12
1 0 0

(125)10 = (1111101)2

1 3 7 15 31 62 125
1 1 1 1 0 1

(125)10 = ()2

512 256 128 64 32 16 8 4 2 1


1 1 1 1 1 0 1

125-64 =61

61-32 =29

29-16 = 13

13-8 = 5

5-4= 1

(0.625) = (0.101 )2

0.625

*2

= 1.25

0.25*2 = 0.5

0.5*2 = 1.0

You might also like