Characteristics of low-level languages

Cards (13)

  • Low-level languages use the specific instruction set of a processor. The instruction set for each processor is defined by the manufacturer, meaning low-level languages can only be executed by a processor of the same type that it was written for. For this reason, code written in low-level languages is non-portable and will not run on computers with a different processor.
  • There are two types of low-level programming language: machine code and assembly code.
  • Processor
    A device that carries out the basic instructions that control the operation of a computer
  • Designing a processor
    Decide which operations the processor will be able to carry out
  • Processor operations
    • Adding two numbers together
    • Storing data in registers
    • Loading data from main memory
  • Instruction set
    A set of instructions that allows a programmer to use the operations the manufacturer has designed
  • Instruction sets will only work with that particular processor, or a set of processors that share the same operations (called a processor family)
  • Processor instruction set
    • Provides commands to allow the low-level programmer to move data into and out of the processor and to make use of the processor's internal registers to minimise data transfer
  • If a programmer understands a processor well enough, low-level languages allow them to write extremely efficient programs that make the most of the processing power and memory available
  • Instruction width
    Most modern processors use 32 or 64 bits for each instruction
  • Low-level languages have a 1:1 relationship with processor instructions. This means they give a programmer fine control over how a program is executed, allowing for extremely efficient programs.
  • When a programmer uses a low-level language, they can optimise a program to make the best use of a processor's resources. An example of this is that low-level languages allow programmers to access specific registers. A skilled programmer can precisely control the movement of data in and out of a processor, allowing for programs with improved efficiency.
  • Characteristics of low-level languages
    • A 1:1 relationship with processor instructions.
    • Non-portable (they only work on specific processors).
    • Allow for individual control of a processor's components and registers.
    • Programs typically require less memory and execute faster than a high-level language program performing the same task.