Systems programming terminology: what is an assembler, in the context of translating low-level source code into executable machine instructions?

Difficulty: Easy

Correct Answer: a program that automate the translation of assembly language into machine language

Explanation:


Introduction / Context:
Toolchain terminology matters when building or maintaining software systems. Assemblers, compilers, loaders, linkers, and interpreters each play distinct roles. This question asks you to correctly identify what an assembler does relative to assembly language and machine code.


Given Data / Assumptions:

  • Source language is assembly (mnemonics and operands close to hardware).
  • Target is machine language (binary opcodes and operands/addresses).
  • Other tools (compilers, loaders, interpreters) are present but different.


Concept / Approach:
An assembler translates mnemonic instructions into their binary encodings, resolves symbols, computes displacements, and emits object modules or executable binaries. It maps directives and labels to actual addresses and may support macros and conditional assembly. This is distinct from a compiler (HLL to machine/IR), loader (place code in memory and relocate), and interpreter (execute source without producing a permanent binary).


Step-by-Step Solution:
1) Identify the source: assembly language with symbolic opcodes and operands.2) Recognize the goal: binary machine instructions executable by the CPU.3) Choose the definition that exactly matches this transformation: the assembler.


Verification / Alternative check:
Any assembler manual (e.g., for x86, ARM, S/370) shows mnemonics mapping to opcodes and addressing modes; object files contain relocation and symbol tables produced by the assembler.


Why Other Options Are Wrong:

  • High-level language to object: That is a compiler.
  • Placing programs into memory: That is a loader (or OS loader).
  • Execute source as if machine code: That is an interpreter.


Common Pitfalls:
Confusing assembler with compiler because both produce object code; the key difference is the level of the input language and the nature of transformations (one-to-one vs structural).


Final Answer:
a program that automate the translation of assembly language into machine language.

More Questions from Language Processors

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion