N e w I n s t r u c t i o n
F U N 5 6
G → B
G r a y- C o d e t o B i n a r y- C o d e C o n v e r s i o n
F U N 5 6
G → B
56DP.G->B
Operation Control EN
S :
D :
S : St a r t i n g o f s o u r c e
D : St a r t i n g a d d r e s s o f d e s t i n a t i o n
S, D o p e r a n d c a n c o m b i n e V、Z、 P 0 ~ P 9 f o r
i n d e x a d d r e s s i n g
WX
WY
WM
WS TMR CTR
HR
IR
OR
SR
ROR
DR
K
XR
Range
Operand
WX0
∣
WX240
WY0
∣
WY240
WM0
∣
WM1896
WS0
∣
WS984
T0
∣
T255
C0
∣
C255
R0
∣
R3839
R3840
∣
R3903
R3904
∣
R3967
R3968
∣
R4167
R5000
∣
R8071
D0
∣
D4095
0〜FFFFH
or
0〜FFFFFFFFH
V、Z
P0〜P9
S
○
○
○
○
○
○
○
○
○
○
○
○
○
○
D
○
○
○
○
○*
○
○
● W h e n o p e r a t i o n c o n t r o l " E N " = 1 o r " E N ↑ " ( P i n s t r u c t i o n ) c h a n g e s f r om 0 → 1 , i t
w i l l p e r f o r m t h e c o d e c o n v e r s i o n ; w h e r e S i s t h e s o u r c e ( G r a y c o d e ) , a n d D i s
t h e d e s t i n a t i o n ( B i n a r y c o d e ) f o r s t o r i n g t h e r e s u l t .
● T h e c o n v e r s i o n m e t h o d s h o wn a s b e l o w :
1
1
0
1
0
0
0
1
1
1
0
1
1
0
1
1
0
1
1
1
1
1
1
0
1
0
0
1
0
0
1
0
XO
R
XO
R
XO
R
XO
R
XO
R
XO
R
XO
R
XO
R
XO
R
XO
R
XO
R
XO
R
XO
R
XO
R
XO
R
9-81
N e w I n s t r u c t i o n
F U N 5 6
G → B
G r a y- C o d e t o B i n a r y- C o d e C o n v e r s i o n
F U N 5 6
G → B
E x a m p l e 1 : W h e n M 0 c h a n g e s f r o m 0 → 1 , i t w i l l p e r f o r m t h e 1 6 - b i t c o d e c o n v e r s i o n
˙ C o n v e r t i n g t h e 1 6 - b i t G r a y- c o d e i n D 0
i n t o B i n a r y- c o d e , a n d t h e n s t o r i n g t h e
r e s u l t i n t o D 1 0 0 .
D 0 = 1 0 0 1 0 1 0 1 0 1 0 1 0 0 11 B
è D100= 1110011001100010B
E x a m p l e 2 : W h e n M 0 = 1 , i t w i l l p e r f o r m t h e 3 2 - b i t c o d e c o n v e r s i o n
˙ C o n v e r t i n g t h e 3 2 - b i t G r a y- c o d e i n
D D 0 i n t o B i n a r y- c o d e , a n d t h e n
s t o r i n g t h e r e s u l t i n t o D D 1 0 0 .
D D 0 = 0 0 11 0 111 0 0 1 0 0 1 0 0 0 0 1 0 1111 0 0 0 1 0 1 0 0 B
è DD100= 00100101110001111100101000011000B
9-82