Difficulty: Easy
Correct Answer: Assembler
Explanation:
Introduction / Context:
Programming languages exist at different levels of abstraction. High level languages are close to human thinking, while machine language is directly understood by the CPU. Assembly language sits between these two, providing human readable mnemonics that correspond closely to machine instructions. To run an assembly program, it must be translated into machine code. This question tests your knowledge of which translator program performs that specific conversion.
Given Data / Assumptions:
Concept / Approach:
An assembler is a translator program that takes assembly language source code and converts it into machine language object code. Each mnemonic instruction in assembly corresponds to one or more binary instructions for the CPU. A compiler translates high level language source code (such as C or Java) into machine code or intermediate code. An interpreter reads high level source instructions line by line, translating and executing them on the fly. The operating system manages hardware and software resources, while a linker combines object files into an executable. Given this classification, the only translator that specifically targets assembly language is the assembler.
Step-by-Step Solution:
Step 1: Identify the source language mentioned in the question, which is assembly language.Step 2: Recall that assembly language uses mnemonics like MOV, ADD, and SUB for low level operations.Step 3: Recognise that an assembler is the program that converts these mnemonics and operands into machine code instructions.Step 4: Understand that compilers and interpreters handle high level languages, not assembly language.Step 5: Remember that the operating system and linker have different roles in managing programs and combining object modules.Step 6: Conclude that Assembler is the correct answer.
Verification / Alternative check:
To verify, think about the typical toolchain for low level programming. A programmer writes code in an assembly language file with an extension such as .asm. This file is then passed through an assembler, which generates an object file containing machine code. A linker may then combine that object file with others to produce a final executable, which the operating system can load and run. At no stage does a compiler or interpreter directly process the assembly source in this standard flow. This confirms that the assembler is the correct translator for assembly language.
Why Other Options Are Wrong:
An Interpreter reads high level language source code and executes it line by line but is not used for assembly language translation. A Compiler translates high level languages into machine or intermediate code and does not operate on assembly mnemonics as its primary input. The Operating system coordinates system resources and provides services, but it is not itself a translator from assembly to machine code. A Linker combines multiple object files and libraries into a single executable and assumes that the translation step is already complete. Therefore, none of these alternatives matches the definition required in the question.
Common Pitfalls:
Students often confuse compilers and assemblers because both produce machine code. The key difference is the source language: compilers accept high level code while assemblers accept assembly mnemonics. Another pitfall is to treat the operating system as a catch all answer for any low level task. In reality, the operating system uses executables that have already been assembled or compiled. Remembering that assembler deals with assembly language, compiler with high level languages, and interpreter with line by line execution helps keep the concepts distinct.
Final Answer:
The translator program specifically used to convert assembly language into machine code is an Assembler.
Discussion & Comments