All Exams Test series for 1 year @ ₹349 only
Question

______ translates a low-level language program into Machine code. 

The correct answer is

Assembler

Understanding Language Translators: Low-Level Language to Machine Code

Computer programs are written in various programming languages. For a computer's processor to understand and execute these programs, they must be translated into machine code, which is the native language of the processor, consisting of binary instructions (0s and 1s).

Programming languages are broadly categorized into low-level languages and high-level languages.

  • High-level languages: These are closer to human language, easier to read, write, and understand (e.g., Python, Java, C++).
  • Low-level languages: These are closer to the computer's hardware and machine code. Examples include machine language itself and assembly language. Assembly language uses mnemonic codes (like ADD, MOV, JMP) to represent machine instructions.

Since computers only understand machine code, programs written in any other language must be translated. This translation is done by special programs called language translators or processors.

Analyzing the Options for Low-Level Language Translation

Let's look at the provided options:

  1. Compiler: A compiler is a language translator that converts the entire source code of a program written in a high-level language into machine code (or sometimes intermediate code) before the program is executed. It reads the whole program at once, checks for errors, and then produces an output file (often an executable).
  2. Interpreters: An interpreter is another type of language translator. It directly executes instructions written in a programming language without requiring them previously to have been compiled into a machine-language program. It translates and executes the program line by line. Interpreters are typically used for high-level languages.
  3. Assembler: An assembler is a program that translates assembly language code into machine code. Assembly language is a low-level programming language where each instruction typically corresponds to a single machine instruction. Therefore, an assembler is specifically designed to translate this type of low-level language into the binary format that the computer's CPU can execute.
  4. Virus: A virus is a type of malicious software program that, when executed, replicates itself by modifying other computer programs and inserting its own code. A virus is not a language translator.

Based on the definitions, the program that translates a low-level language, specifically assembly language, into machine code is an assembler.

Translator Type Input Language Output Language Translation Process
Compiler High-Level Language Machine Code (or Intermediate) Translates the entire program before execution.
Interpreter High-Level Language Executes instructions directly Translates and executes line by line.
Assembler Assembly Language (Low-Level) Machine Code Translates assembly code into machine instructions.

Therefore, the correct answer is the one that identifies the assembler as the translator for low-level language programs (assembly language) into machine code.

Revision Table: Language Translators

Term Function Input Language Example Output Language Example
Assembler Translates assembly language into machine code. MOV AX, 01h 1011100000000001
Compiler Translates high-level language into machine code or intermediate code. print("Hello") Machine code executable
Interpreter Translates and executes high-level language code line by line. print("Hello") Direct execution result

Additional Information: Low-Level vs. High-Level Languages

Understanding the difference between low-level and high-level languages helps clarify the role of different translators:

  • Low-Level Languages:
    • Closer to hardware.
    • Machine dependent (code written for one type of processor might not work on another without modification).
    • Require deep knowledge of computer architecture.
    • Examples: Machine Language, Assembly Language.
    • Translated by: Assemblers (for assembly language).
  • High-Level Languages:
    • Closer to human language.
    • Machine independent (mostly, thanks to translators).
    • Easier to learn, use, and debug.
    • Examples: Python, Java, C++, JavaScript.
    • Translated by: Compilers or Interpreters.

The question specifically asks about translating a low-level language into Machine code. While Machine code is the most fundamental low-level language, the term "low-level language program" often refers to programs written in Assembly language, which is translated by an Assembler.

Was this answer helpful?

Important Questions from Computer Basic

  1. Arrange the following programming languages in an ascending form according to their year of development

    (A) Cobol

    (B) C

    (C) Java

    (D) FORTRAN

    Choose the correct answer from the options given below:

  2. POST is performed by ______

  3. Arrange the following search engines according to their year of launching in an ascending order.

    A. Yahoo

    B. Google

    C. Bing

    D. Hotbot

    E. Scirus

    Choose the correct answer from the options given below:

  4. Arrange the file formats based on the storage space required in ascending form.

    A. Text

    B. Video

    C. Multimedia

    D. Image

    E. Audio

    Choose the correct answer from the options given below:

  5. Match List I with List II

    LIST I

    LIST II

    Programming Language

    Inventor

    A.

    Java

    I.

    James A. Gosling

    B.

    C

    II.

    Guido van Rossum

    C.

    Lisp

    III.

    Dennis Ritchie

    D.

    Python

    IV.

    John McCarthy

    Choose the correct answer from the options given below: 

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App