Seneca

Low-Level Languages

Computer Science: OCR GCSE, topic 2.5.2

Low-Level Languages

Low-level programming languages are languages which are much closer to computer-understandable binary.

Low-Level Languages

Low-Level Languages

  • Low-level languages (LLLs) are much closer to executable machine code than high-level languages.
  • LLLs are harder to read by humans, but are easier to read for the computer.
What does a LLL look like?

What does a LLL look like?

  • LLL commands are not easy to read, and might include commands such as:
  • MOV ax, bx
  • CMP ch, dh
  • CLI
Why do we use LLLs?

Why do we use LLLs?

  • LLLs provide exact control over the central processing unit.
  • LLLs need less translation.
  • Needing less translation often leads to faster code.
  • Faster code is useful for computers with low specifications such as embedded systems.
Comparison

Comparison

  • How would you write a simple addition program using values stored in two variables?
  • High-level language
    num1 = 17
    num2 = 4
    print(num1+num2)
  • Low-level language (Little Man Code)
    INP // Input first number
    STA A // Store it in mailbox A
    INP // Input second number
    ADD A // Add the stored first number to the second
    OUT // Output the sum
    HLT // Stop
    A DAT

Test yourself on Low-Level Languages

  • Which of these look like low-level statements?

  • Which type of language often produces more optimised, faster code?

  • Why are low-level languages useful for embedded systems?

Practise this topic for free