Microcomputer Data Specification

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 825
10
to hex.
51
16
825 R=9
3
16
51 R=3 339
16
0
16
3 R=3
therefore 825
10
= 339
16
to convert 339
16
back to our base 10 number,
339
16
= 9x16
0
+ 3x16
1
+ 3x16
2
= 9x1 + 3x16 + 3x256
= 9 + 48 + 768
= 825
10
To show the relationship between hex, binary, and octal, lets convert
825
10
to octal & to binary and then back to hex.