3_2_13 Classification of programming languages

You should be able to:

  • Know that there are different levels of programming language:

•• low-level language

•• high-level language.

  • Explain the main differences between low-level and high-level languages.
  • Know that machine code and assembly language are considered to be low-level languages and explain the differences between them.
  • Understand that ultimately all programming code written in high-level or assembly languages must be translated into machine code.
  • Understand that machine code is expressed in binary and is specific to a processor or family of processors.
  • Understand the advantages and disadvantages of low-level language programming compared with high-level language programming.
  • Understand that there are three common types of program translator:

•• interpreter

•• compiler

•• assembler.

  • Explain the main differences between these three types of translator.
  • Understand when it would be appropriate to use each type of translator.

REVISE:

High Level and Low Level Languages

High Level Languages are much closer to the English language and are the easiest for humans to interpret and program.

Low Level Languages are much closer to computer language and are easier for the computer to process. A CPU can only execute machine code (binary instructions) so ultimately all languages become machine code.

Image source: wikimedia commons

Machine Code and Assembly Language

These are low-level languages.

Assembly language is slightly easier for humans to interpret than machine code.

This video explains it all really well. Watch it!

Advantages and disadvantages of low-level language programming compared with high-level language programming

Low Level Advantages:

  • Can be used to create drivers (hardware specific code)
  • The code would be more specific and efficient

Low Level Disadvantages:

  • They are hard to program
  • They are time-consuming to program
  • The code can't be used across different CPUs

High Level Advantages:

  • Easier to learn and program with
  • The same code can be used across different CPUs

High Level Disadvantages:

  • Can't be used to create hardware specific code
  • Slower to run than machine code

Program Translators

Program Translators come in three categories:

  • Compiler - A compiler translates the whole program into machine code before the program is run.
  • Interpreter - An interpreter translates code into machine code, instruction by instruction
  • Assembler - An assembler translates assembly language into machine code.

An IDE (integrated development environment) is used to write code, test for errors and translate a program. You use an IDE when you create code using Python. IDLE is Python’s Integrated Development and Learning Environment.

In Python, the shell is the interpreter.

TEST:

  1. Download and print the test paper here: https://drive.google.com/open?id=0B5fLtQ0Xgr2PNVVPb1JFQU9GZkE
  2. Try the mock test yourself.
  3. Use the 3.2.13 Walking Talking Mock below to guide you through answering the questions.

SOURCE RECOGNITION - PLEASE NOTE: The examination examples used in these walking talking mocks are samples from AQA from their non-confidential section of the public site. They also contain questions designed by TeachIT for AQA as part of the publicly available lesson materials.