Assembly Languages & Language Translators

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Marlenegalea
M
Marlenegalea
Community Contributor
Quizzes Created: 16 | Total Attempts: 108,100
Questions: 8 | Attempts: 516

SettingsSettingsSettings
Programming Quizzes & Trivia

Study the topics CPU II: Assembly Languages and Language Translators before trying this test.


Questions and Answers
  • 1. 

    In the Assembly Language instruction LDA X

    • A.

      LDA is the opcode and X is the operand

    • B.

      LDA is the operand and X is the opcode

    • C.

      LDA is a symbolic address

    • D.

      X is a direct address

    Correct Answer
    A. LDA is the opcode and X is the operand
    Explanation
    In the given Assembly Language instruction "LDA X", "LDA" is the opcode and "X" is the operand. The opcode "LDA" stands for "Load Accumulator" and it indicates that the value stored at the memory location specified by the operand "X" should be loaded into the accumulator register. The operand "X" represents a memory address where the desired value is stored. Therefore, the opcode specifies the operation to be performed and the operand specifies the data or memory location involved in that operation.

    Rate this question:

  • 2. 

    Assembly language is a Low Level Language because

    • A.

      It uses symbolic addressing.

    • B.

      It is very English-like.

    • C.

      It is a machine-oriented language that requires a good knowledge of machine architecture to code in.

    • D.

      All of the above

    Correct Answer
    C. It is a machine-oriented language that requires a good knowledge of machine architecture to code in.
    Explanation
    Assembly language is considered a Low Level Language because it is a machine-oriented language that requires a good knowledge of machine architecture to code in. Unlike high-level languages, assembly language is closely related to the hardware and provides direct access to the computer's memory and registers. It uses mnemonic codes and symbolic addressing to represent machine instructions, making it more readable than machine language but still requiring an understanding of the underlying hardware. Therefore, the correct answer is "It is a machine-oriented language that requires a good knowledge of machine architecture to code in."

    Rate this question:

  • 3. 

    Compilers and Interpreters are different because

    • A.

      Compilers are used for Special Purpose Languages while interpreters are used for General Purpose Langauges

    • B.

      Compilers are written for translating LLLs and Interpreters for translating HLLs.

    • C.

      Compilers are written for translating HLLs and Interpreters for translating LLLs.

    • D.

      Compilers translate a whole program before starting execution while interpreters translate and execute line by line.

    Correct Answer
    D. Compilers translate a whole program before starting execution while interpreters translate and execute line by line.
    Explanation
    The correct answer states that compilers translate a whole program before starting execution while interpreters translate and execute line by line. This is a key difference between compilers and interpreters. Compilers analyze the entire source code and generate an executable file, which can be executed independently. On the other hand, interpreters analyze and execute the source code line by line, without generating an executable file beforehand. This fundamental difference in their approach to translating and executing code is what sets compilers and interpreters apart.

    Rate this question:

  • 4. 

    Programs written in assembly language

    • A.

      Are not portable

    • B.

      Make use of mnemonics

    • C.

      Run faster and require less storage space than those written in HLLs

    • D.

      All of the above

    Correct Answer
    D. All of the above
    Explanation
    Programs written in assembly language are not portable because they are specific to a particular computer architecture and cannot be easily executed on different systems. They make use of mnemonics, which are human-readable representations of machine instructions, making them easier to understand and write. Additionally, programs written in assembly language generally run faster and require less storage space compared to those written in high-level languages (HLLs) because they directly interact with the hardware of the computer. Therefore, the correct answer is "all of the above."

    Rate this question:

  • 5. 

    If a HLL program is to be run a number of times

    • A.

      An interpreter can produce object code that may be saved and run straight away.

    • B.

      An interpreter would have to translate it each time it is run

    • C.

      It is best to use an assembler.

    • D.

      An interpreter would translate it once and then produce object code that can be saved and afterwards run directly (without needing further translation)

    Correct Answer
    B. An interpreter would have to translate it each time it is run
    Explanation
    The correct answer is that an interpreter would have to translate the program each time it is run. This means that the interpreter would need to go through the process of analyzing and executing the code every time it is executed, which can be time-consuming and inefficient. On the other hand, if the interpreter translates the program once and produces object code that can be saved, it can be run directly without needing further translation, saving time and resources. Therefore, it is more efficient to use an interpreter that can produce object code that can be saved and run straight away.

    Rate this question:

  • 6. 

    Advantages of using Assembly Language rather than an HLL include

    • A.

      Assembly programs are simpler to translate and occupy less storage space.

    • B.

      Assembly languages are easier to code in.

    • C.

      Assembly language programs are portable.

    • D.

      Assembly is simpler to translate and easier to code in.

    Correct Answer
    A. Assembly programs are simpler to translate and occupy less storage space.
    Explanation
    Assembly language is a low-level programming language that is closely related to the machine language of a specific computer architecture. It uses mnemonic codes to represent machine instructions, making it easier for programmers to understand and write code. Compared to high-level languages (HLL), assembly language programs are simpler to translate into machine code because they have a one-to-one correspondence with the machine instructions. Additionally, assembly programs tend to occupy less storage space since they do not require a compiler or interpreter, resulting in more efficient memory usage.

    Rate this question:

  • 7. 

    Which of the following is/are used in translating HLLs?

    • A.

      Compilers only.

    • B.

      Compilers, Interpreters and Assemblers.

    • C.

      Compilers and Interpreters.

    • D.

      Compilers and Assemblers.

    Correct Answer
    C. Compilers and Interpreters.
    Explanation
    Compilers and interpreters are both used in translating High-Level Languages (HLLs). Compilers translate the entire program into machine code before execution, while interpreters translate and execute the program line by line. Assemblers, on the other hand, are used to translate Assembly language into machine code. Therefore, the correct answer is "Compilers and Interpreters."

    Rate this question:

  • 8. 

    Assembly language is easier to code in than machine code because

    • A.

      Assembly language is a High Level Language.

    • B.

      Each assembly code instruction is equivalent to 1 machine code instruction.

    • C.

      Machine code is a HLL

    • D.

      Assembly language makes use of mnemonics

    Correct Answer
    D. Assembly language makes use of mnemonics
    Explanation
    Assembly language is easier to code in than machine code because it makes use of mnemonics. Mnemonics are symbolic representations of machine code instructions that are easier for humans to understand and remember. By using mnemonics, programmers can write code in assembly language that is more readable and intuitive compared to directly writing machine code instructions. This simplifies the coding process and reduces the chances of errors, making assembly language a more user-friendly option compared to machine code.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Nov 08, 2009
    Quiz Created by
    Marlenegalea
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.