Chapter 6 Applied Instructions Example 2 Finding the two’s compliment of the negative value: 1. When the value of the 15 th bit in D0 is 1, M0 is ON, and the value in D0 is a negative value. 2. When M0 is ON, the NEG instruction finds the two’s complement of the negative value in D0 (the corresponding positive value). Example 3 Finding the two’s compliment of the difference between two values: When M0 is ON, 6_ 1. If the value in D0 is greater than that in D2, M10 is ON. 2. If the value in D0 is equal to that in D2, M11 is ON. 3. If the value in D0 is less than that in D2, M12 is ON. 4. The value in D4 is a positive value. 6-97