Lesson 4.6.2.1

4.6.2.1 Classification of programming languages Quiz: AQA Computer Science, Unit 6

20 questions

In partnership with Revision Ninja

Lesson 4.6.2.1, Classification of programming languages: 20 multiple choice questions for the AQA Computer Science (7517), Unit 6: Fundamentals of computer systems, written with Revision Ninja.

Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.

Host this setFree Play

The 20 questions

  1. Which of these is a low-level programming language?

    • Assembly language
    • Visual Basic, a high-level event-driven language
    • Python, a high-level imperative language
    • Java, a high-level object-oriented language
  2. Which pair correctly lists the low-level languages named in the specification?

    • Bytecode and Java source code
    • Machine code and assembly language
    • Pascal and Ada source code
    • Python and C source code
  3. Which is an advantage of programming in machine code or assembly language rather than a high-level language?

    • Programs need no translator because the processor reads the source text directly
    • Programs are portable and can run unchanged on any processor architecture
    • Programs are quicker to write, test and debug because they read like plain English
    • Programs can make very efficient use of the hardware, with fast execution and small memory use
  4. Which is a disadvantage of writing a program in assembly language?

    • The code cannot use registers or memory addresses, which limits what the program can do
    • The code cannot be translated into machine code and must therefore be interpreted line by line
    • The code is tied to one processor architecture, so it is not portable between different machines
    • The code runs more slowly than the same program written in a high-level language always does
  5. Which statement best describes an imperative high-level language?

    • A language that works directly with register addresses and opcodes in binary form at all times
    • A language used only to write the operating system kernel so that it runs very quickly
    • A language that describes the desired result and leaves the method of reaching it to the system entirely
    • A language in which the programmer writes a sequence of statements that change the program's state step by step
  6. Which of the following is an example of an imperative high-level language?

    • Binary
    • Python
    • Machine code
    • Assembly language
  7. Which statement about the relationship between imperative high-level languages and low-level languages is correct?

    • High-level imperative code is executed directly by the processor with no translation at all
    • Low-level languages are translated into high-level imperative code before the processor runs them
    • High-level imperative code and low-level code are the same thing, differing only in their spelling
    • High-level imperative code is translated into lower-level machine code before the processor can run it
  8. A programmer must write a routine that runs with the fewest instructions on a particular microcontroller. Which language is most likely to be chosen?

    • Python, because it has the simplest syntax for a beginner to read and understand
    • Assembly language, because it allows precise control of the instructions the processor executes
    • Visual Basic, because it provides an extensive drag-and-drop interface for building programs
    • SQL, because it is designed to express the steps of a computation in a database
  9. Which is the main reason high-level languages are more common than machine code for business applications?

    • They are executed without any translation, so they never need a compiler or interpreter
    • They are easier to read, write and maintain, and they are portable between different processors
    • They can only be written by hardware engineers who understand the processor's logic gates
    • They use fewer bits per instruction than machine code, so they need less storage space
  10. Which statement about machine code is correct?

    • Machine code is only used on personal computers and never on embedded devices
    • Machine code is a sequence of binary instructions that the processor can execute directly
    • Machine code is a set of English-like statements that must be compiled before execution
    • Machine code is a high-level language that is portable across all processor architectures
  11. A program written in assembly uses the mnemonic ADD for an operation. What does the assembler do with this mnemonic?

    • It interprets ADD one line at a time and performs the addition in a separate translation step
    • It replaces ADD with the binary opcode for the add operation specified by the processor's instruction set
    • It discards ADD because mnemonics are ignored when the program is converted to machine code
    • It converts ADD into a high-level statement and then compiles that statement into object code
  12. Which pair describes low-level languages most accurately?

    • They are close to the hardware and specific to a processor, but harder for people to read and write
    • They are portable between processors and easier to read than any high-level language in use
    • They describe a result rather than the steps, which makes them quick to write but slow to run
    • They are written in plain English so that non-programmers can write them without any training
  13. Which of the following is a benefit of high-level languages for maintaining software over many years?

    • Code is always shorter in length than the equivalent machine code, so it never needs changing
    • Code is easier to understand and modify, which reduces the cost of maintenance
    • Code is free from errors because the translator corrects all logic mistakes automatically
    • Code runs on a single processor only, so compatibility issues never need to be considered
  14. A company must choose between writing a device driver in assembly language or in a high-level language that compiles to several architectures. Which trade-off best justifies the high-level choice?

    • Both efficiency and portability are improved, and no translation step is needed at all
    • Portability and maintainability are improved, at the cost of some efficiency compared with hand-written assembly
    • Maintenance becomes impossible, but the program can run on any processor without change
    • Efficiency is improved and portability is lost, but the code becomes shorter in every case
  15. Which statement best explains why assembly language is described as a low-level language?

    • Each instruction corresponds closely to a single machine-code instruction for the processor
    • Each instruction is executed by the operating system instead of by the processor directly
    • Each instruction is written in binary, so it is harder to read than any high-level code
    • Each instruction is limited to 8 bits, which is smaller than the instructions of any high-level code
  16. Which of the following statements about the development of programming languages is correct?

    • Languages developed by removing abstraction, so that modern languages are closer to binary than ever
    • Languages were all developed at the same time and have remained unchanged since their creation
    • Languages developed from high-level code towards machine code, to simplify the processor's design
    • Languages developed over time from machine code through assembly towards higher levels of abstraction
  17. A program is written in an imperative high-level language. Which statement best describes how its loops and assignments relate to processor execution?

    • Each statement is stored as a single machine instruction irrespective of its complexity
    • Each statement is translated into a sequence of machine instructions that carry out the same steps
    • Each statement is replaced by a register address so that the processor can run without memory
    • Each statement is executed by the operating system, which skips the processor entirely
  18. Which is a characteristic of high-level languages compared with assembly language?

    • They use keywords and statements that are more abstract and closer to natural language than machine instructions
    • They cannot use named variables, so every item of data must be referenced by its numeric address in memory during the program
    • They refer to specific memory addresses and registers in every instruction, so the programmer manages the hardware directly at each step
    • They correspond one-to-one with the binary opcodes of a single processor family, so each statement maps to exactly one machine instruction
  19. A programmer writes the instruction ADD R1, R2 in a program. What kind of language is this?

    • An imperative high-level language
    • A declarative language used mainly for database queries
    • A low-level language
    • A bytecode language for a virtual machine
  20. Why is assembly language not portable between processor families?

    • Assembly is written in binary, which only some processors are able to read at all
    • Each processor family has its own instruction set, so mnemonics and opcodes differ between them
    • Assembly contains no instructions, only data, so each processor reads it in a different way
    • Assembly programs must always be compiled to Java bytecode before they can run anywhere

All AQA Computer Science quizzes