Difficulty: Easy
Correct Answer: Applies
Explanation:
Introduction / Context:Programmers rarely write long streams of raw opcodes like 3E or C3. Instead, they use human-readable operation names called mnemonics, such as MOV, ADD, or JMP. This question checks whether you understand the role of an assembler: converting those mnemonics and operands into the exact sequence of machine code bytes a CPU can execute.
Given Data / Assumptions:
Concept / Approach:Assembly language is a symbolic representation of machine language. Each mnemonic corresponds to one instruction opcode (sometimes with addressing-mode dependent encodings), and operands become fields or immediate bytes. The assembler resolves symbols (labels), computes addresses, and emits machine code. Therefore, mnemonics are indeed English-like directives that the assembler translates into the processor’s native encoding.
Step-by-Step Solution:
1) Identify a mnemonic such as MOV A, #12H. 2) The assembler looks up the opcode for MOV-immediate-to-A and encodes the immediate operand 12H. 3) It outputs the correct byte sequence (e.g., opcode byte followed by 12H), forming machine code. 4) The CPU later fetches and executes those bytes; it never sees the mnemonic text.Verification / Alternative check:Examine a listing file: it shows each source line alongside the emitted hex bytes, demonstrating the direct translation from mnemonic to machine code.
Why Other Options Are Wrong:Does not apply: ignores the fundamental purpose of an assembler. “Only on RISC” or “only with a linker” adds constraints that are not part of the definition.
Common Pitfalls:Confusing assembler (source to object) with compiler (high-level to object). Believing the CPU “understands” mnemonics—only machine code is executed.
Final Answer:Applies
Discussion & Comments