64.6k views
2 votes
Complete the following:

a. sets flags as though subs was performed, but w/out storing the result
b. sets flags as though ands was performed, but w/out storing the result
c. sets flags as though eors was performed, but w/out storing the result

User Gordak
by
8.9k points

1 Answer

6 votes

Final answer:

To set the flags as though subs, ands, or eors were performed without storing the result, use the respective bitwise operators '-', '&', or '^' between the operands.

Step-by-step explanation:

To set flags as though subs was performed without storing the result, you can use the subtraction bitwise operator '-' between the operands. For example, if you have two binary numbers 1010 and 0101, the result of the subtraction will not be stored, but the flags indicating carry, zero, and overflow can still be set.

To set flags as though ands was performed without storing the result, you can use the bitwise AND operator '&' between the operands. The result of the AND operation will not be stored, but the flags indicating carry, zero, sign, and overflow can still be set.

To set flags as though eors was performed without storing the result, you can use the bitwise XOR operator '^' between the operands. The result of the XOR operation will not be stored, but the flags indicating carry, zero, sign, and overflow can still be set.

User Samui
by
8.6k points