Difficulty: Easy
Correct Answer: ROL (rotate left)
Explanation:
Introduction / Context:
Classifying instructions by function helps predict effects on flags, register contents, and performance. Arithmetic instructions change numeric values, while rotate/shift operations manipulate bit positions without performing addition or subtraction.
Given Data / Assumptions:
Concept / Approach:
Arithmetic instructions like INC, DEC, ADD, SUB, and CMP act on numeric magnitude and modify arithmetic flags. ROL is a rotate operation (bit manipulation) and is categorized under shift/rotate, not arithmetic, even though it may affect flags such as carry or overflow depending on the CPU.
Step-by-Step Solution:
Verification / Alternative check:
Review architecture manuals (x86, ARM, 8051): rotate and shift opcodes are grouped separately from arithmetic/logic classes.
Why Other Options Are Wrong:
INC, DEC, and CMP are treated as arithmetic or arithmetic-related flag-setting operations in most ISAs.
Common Pitfalls:
Assuming CMP is purely logical because it does not store a result. It still performs an arithmetic subtraction to set flags.
Final Answer:
ROL (rotate left)
Discussion & Comments