Chapter 6 Applied Instructions D10 (16-bit binary number) Conversion D10 (4-digit binary-coded decimal) D20 ( ) 4-digit binary-coded decimal Transferring the digits Conversion D20 ( ) 16-bit binary number Suppose the number in S is K1234, and the number in D is K5678. After the instruction is executed, the number in S is 1234, and the number in D is 5128. 4. When SM605 is ON, the data involved in the instruction is binary numbers. 4 digit th 3 digit rd 2 digit nd 1 digit st D10 ( ) 16-bit binary number Transferring the digits D20 ( ) 16-bit binary number Unchanged 4 digit th 3 digit rd 2 digit nd 1 digit st Unchanged Suppose the number in S is 16#1234, and the number in D is 16#5678.
After the instruction is executed, the number in S is 16#1234, and the number in D is 16#5128. 6_ Example 1 1. When SM605 is OFF, the data in S are binary-coded decimal numbers. When M0 is ON, the instruction transfers two digits of the decimal number starting from the fourth digit of the decimal number (the digit in the thousands place of the decimal number) in D10 to the two digits of the decimal number starting from the third digit of the decimal number (the digit in the hundreds place of the decimal number) in D20. After the instruction is executed, the digits in the thousands place of the decimal number (10 3 ) and the ones place of the decimal number (10 0 ) in D20 are unchanged. 2.
When the binary-code decimal number is not between 0–9,999, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#200D. 6-143 3 10 2 10 1 10 0 10 hanged Unchan 3 10 2 10 1 10 0 10