Microcomputer Data Specification
MPU-28
825
10 =
1100111001
2
= 1x2
0
+Ox2
1
+0x2
2
+lx2
3
+1x2
4
+1x2
5
+0x2
6
+0x2
7
+lx2
8
+1x2
9
= lxl +0x2 +0x4 +lx8 +1x16 +lx32 +0x64 +0x128 +1x256 +1x512
= 1 + 0 + 0 + 8 + 16 + 32 + 0 + 0 + 256 + 512
= 825
10
Or taking 147l
8
and representing each digit by its binary
representation, we get 1=001, 4=100, 7=111 & 1 = 001 which when put together
equal 001100111001. Notice this is the same bit pattern as when we converted
from base 10 to base 2. Now if we group this into three groups of four bits
and then convert each group to its hex counterpart, we will have the number
of 825
10
represented in hex. 001100111001 = 0011 0011 1001 = 339
16
. Notice
this agrees with the result when we converted directly to hex from one base
10 number.
In summary, lets take the situation when an MPU 6800 8 bit register
contains all 1's.
11111111 = 1x2
0
+ lx2
1
+ lx2
2
+ 1x2
3
+ 1x2
4
+ 1x2
5
+ 1x2
6
+ 1x2
7
= 1x1 + 1x2 + 1x4 + 1x8 + 1x16 + 1x32 + 1x64 + 1x128
= 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128
= 255
10
or
11111111 = 11 111 111
= 3 7 7 = 7x8
0
+ 7x8
1
+ 7x8
2
= 7x1 + 7x8 + 3x64
= 7 + 56 + 192
= 255
10
or
11111111 = 1111 1111
= F F
16
= 15x16
0
+ 15x16
1
= 15x1 + 15x16
= 15 + 240
= 255
10










