Delta AH500 — 6.13.2 Explanation of Data Processing Instructions

Chapter 6 Applied Instructions D101 Parity bits Example 2: 1. When SM606 is ON, the working mode of the instruction is the 8-bit conversion mode. 2. When X0.0 is ON, the six pieces of data in D0~D5 (eight bits as a group) are added up. The sum is stored in D100, and the values of the parity bits are stored in D101. D100 D101 Parity bits Additional remark: 1. Suppose SM606 is ON. If S + n -1 exceeds the device range, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003. 2. Suppose SM606 is OFF. If S + n /2-1 exceeds the device range, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003.

6-281 S Data Sum D0 Low 100 = 0 1 1 0 0 1 0 0 D0 High 111 = 0 1 1 0 1 1 1 1 D1 Low 120 = 0 1 1 1 1 0 0 0 D1 High 202 = 1 1 0 0 1 0 1 0 D2 Low 123 = 0 1 1 1 1 0 1 1 D2 High 211 = 1 1 0 1 0 0 1 1 D100 867 D101 0 0 0 1 0 0 0 1 D100 0 0 0 0 0 0 1 1 The parity bit is set to 1 if the number of ones is odd. The parity bit is set to 0 if the number of ones is even.

0 1 1 0 0 0 1 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 S Data Sum D0 Low 100 = 0 1 1 0 0 1 0 0 D1 Low 111 = 0 1 1 0 1 1 1 1 D2 Low 120 = 0 1 1 1 1 0 0 0 D3 Low 202 = 1 1 0 0 1 0 1 0 D4 Low 123 = 0 1 1 1 1 0 1 1 D5 Low 211 = 1 1 0 1 0 0 1 1 D100 867 D101 0 0 0 1 0 0 0 1 The parity bit is set to 1 if the number of ones is odd. The parity bit is set to 0 if the number of ones is even. 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1