Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:Programmers rarely write raw opcodes. Instead, they use mnemonics—short words that represent instructions—to make low-level coding practical. Understanding the role of mnemonics clarifies the distinction between assembly, machine code, and higher-level languages.
Given Data / Assumptions:
Concept / Approach:Each mnemonic corresponds to a specific instruction encoding. Assemblers also support labels, constants, and directives to control layout, but the core function is mapping mnemonic + operands into machine language. This lets developers reason about program behavior while leaving bit-level encoding to the toolchain.
Step-by-Step Solution:
Write mnemonic-level source (e.g., MOV, ADD, JMP).Assembler parses and encodes to machine instructions.Link/locate and load the resulting binary to run on hardware.Verification / Alternative check:Disassemblers reverse the process, showing mnemonics from binary images. Comparing assembler listing files verifies one-to-one mapping for each instruction line.
Why Other Options Are Wrong:
Common Pitfalls:Confusing directives (e.g., .org) with instructions; assuming identical mnemonics across architectures; forgetting that addressing modes affect encoding length even for the same mnemonic family.
Final Answer:Correct
Discussion & Comments