Справочник Пользователя для Mitsubishi Electronics QnUCPU

Скачать
Страница из 630
2
 
-
 
38
2.4.3  BCD (Binary-coded Decimal)
(1) Definition
BCD is a numeral system that uses four binary bits to represent the decimal digits 0 through 9.
The difference from hexadecimal is that BCD does not use letters A to F.
Table2.5 
shows the numeric representations in BIN, BCD, and DEC.
(2) Numeric representation in BCD
Each register (such as the data register, link register) in the CPU module consists of 16 bits
.
Therefore, the numeric values can be stored in each register are those in the range between 0 to 9999 in BCD.
Table2.5 Numeric representations in BIN,BCD,and DEC
DEC (Decimal)
BIN (Binary)
BCD (Binary-coded Decimal)
0
0000
      0
1
0001
      1
2
0010
 
 
 
 
10
3
0011
    11
4
0100
  100
5
0101
  101
6
0110
  110
7
0111
  111
8
1000
1000
9
1001
1001
10
1010
1
0000
11
1011
1
0001
12
1100
1
0010
Carry