Motorola M6800 User Manual

Page 23

Advertising
background image

MPU-23

Therefore 758 - 111101 which is the same pattern of 1's & 0's as we

got from converting from base 10 to base 2. What this really says that it is

easier to convert any base 10 number to base 8 by continuous division, and

then convert each digit of the base 8 number to base 2.


Let's look at another example. Convert 18310 to base 8 & to base 2.

22

8 183

R=7

2

8 22

R=6

2678

0

8 2

R=2



91

2 183

R=1

45

2 91

R=1

22

2 45

R=1

11

2 22

R=0

101101112

5

2 11

R=1

2

2 5

R=1

1

2 2

R=0

0

2 1

R=1


2678 = 7x8

0 + 6x81 + 2x82

= 7x1 + 6x8 + 2x64
= 7 + 48 + 128
= 183

to convert 2678 directly to base 2, we convert each base 8 digit

separately.

Advertising