MPU-21

1011112 = lx20

+ 1x21 + lx22 + lx23

+ 0x24 + 1x25

= 1x1

+ 1x2

+ 1x4

+ 1x8

+ 0x16

+ 1x32

= 1

+ 2

+ 4

+ 8

+ 0

+ 32

= 4710

 

 

 

 

 

In general, converting from a number in any base to a number in base

10 is accomplished as follows:

(A0 B0 + A1 B1 + A2 B2 + A3 B3 + A4 B4 -- -- -- -- An Bn)

where B is the base of the number system and A is the particular digit in the

original number corresponding to its position to the left of the decimal

point. On the example just completed, (101111). A0 = 1, A1 = 1, A2 = 1, A3 =

1, A4 = 0, & A5 = 1 and B = 2 (base 2).

Another base which is very convenient in digital computers is base

8, since base 8 is really a convenient way of representing base 2. Lets

illustrate by converting a base 10 number to base 8 & base 2. Let's convert

61 in base 10 to a number in base 8 and a number in base 2. By continuous

division:

8

8

2

2

2

2

2

2

7

R=5

 

61

 

0

R=7

758

7

30

R=1

 

61

 

15

R=0

 

30

 

7

R=1

 

15

 

3

R=1

1111012

7

1

R=1

 

3

 

0

R=1

 

1

 

Page 21
Image 21
Motorola M6800 manual