6 Application Instructions API 00-49 Program Example 2: In 32-bit BIN addition: When X0 = On, the content in (D31, D30) will plus the content in (D41, D40) and the sum will be stored in (D51, D50). D30, D40 and D50 are low 16-bit data; D31, D41 and D51 are high 16-bit data. X10 (D31, D30) (D41, D40) (D51, D50) Remarks: Flags and the positive/negative sign of the values: 16-bit : Zero flag Zero flag Zero flag + - -2 -1 0 -32,768 、 、、 、、 -1 0 1 32,767 0 1 2 、、、 Borrow flag The highest bit of the data = 1 (negative) The highest bit of the data = 0 (positive) Carry flag 32-bit :
Zero flag Zero flag Zero flag -2 -1 0 -2,147,483,648 、 、、 、、 -1 0 1 2,147,483,647 0 1 2 、、、 - + Borrow flag The highest bit of the data = 1 (negative) The highest bit of the data = 0 (positive) Carry flag DVP-PLC Application Manual 6-36 DADD D30 D40 D50