Motorola M6800 manual

Page 26

MPU-26

To convert any base 10 number to hex (base 16) you may convert it to

base 8 first, then represent the base 8 number with its binary

representation. By taking the binary representation of the number and

grouping the bits from right to left in groups of four which are then

represented in hex per the above table. Or one may convert any base 10 number

to hex by our continuous division rule as before. Lets convert 82510 to hex.

16

16

16

51

R=9

 

825

 

3

R=3

33916

51

0

R=3

 

3

 

therefore 82510 = 33916

to convert 33916 back to our base 10 number,

339 = 9x160

+ 3x161 + 3x162

16

 

 

 

 

= 9x1

+

3x16

+

3x256

= 9

+

48

+

768

= 82510

 

 

 

 

To show the relationship between hex, binary, and octal, lets convert 82510 to octal & to binary and then back to hex.

Image 26
Contents MPU-1 Introduction MPU-2 MPU-3 MPU-4 MPU-5 BIT N0 Function MPU-7 READ/WRITE R/W Data BUS EnabledbeMPU-8 Valid Memory AddressvmaMPU-9 NON-MASKABLE InterruptnmiBUS Available BA THREE-STATE Control TSC Address BUS AO/A15ADC ABAINS INXPage MPU-14 Summary of MPU Operation Reset Sequence IRQ Sequence NMI Sequence RTI ExecutionSWI Instruction Page Page Page Page Page Page Page Page