494
Appendix 4.1 BIN (Binary Code)
(1) Definition
Binary is a numeral system that represents numeric values using two symbols, 0 (off) and 1 (on).
Decimal notation uses the symbols 0 through 9. When the symbols for the first digit are exhausted (a digit
reaches 9), the next-higher digit (to the left) is incremented, and counting starts over at 0.
In binary notation, only the symbols 0 and 1 are used. After a digit reaches 1, an increment resets it to 0 and the
next digit (to the left) is incremented. (The numeric value becomes 10, which is equal to 2 in decimal.)
The following table lists the numeric representations in BIN and DEC.
(2) Numeric representation in BIN
(a) Bit configuration of BIN used in the CPU module
Each register (such as the data register, link register) in the CPU module consists of 16 bits.
(b) Numeric data available in the CPU module
Each register in the CPU module can store numeric values in the range of -32768 to 32767.
The following figure shows the numeric representations for registers.
A numeric value of 2
n
is assigned for each bit of registers.
Note that an unsigned binary number (0 to 65535) cannot be used in the most significant bit position since the most
significant bit is a sign bit.
• The most significant bit is "0"...Positive
• The most significant bit is "1"...Negative
DEC (Decimal) BIN (Binary)
00000
10001
20010
3 0011
40100
50101
60110
7 0111
81000
91001
10 1010
11 1011
Carry
Carry
Carry
b15
8192
Bit name
Decimal value
Most significant bit (sign bit)
A value will be negative value when the most significant bit is "1".
16384
4096 2048 1024 512 256 128 64 32 16 8 4 2 1
-32768
2
15
2
14
2
13
2
12
2
11
2
10
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0