teach-ict.com logo

THE education site for computer science and ICT

2. Translators

People and computers do not speak the same language.

People write programs in order to instruct a computer to do something.

The software instructions are written as a carefully formatted set of text statements known as 'source code'. Source code has to follow the grammar rules of the language being used.

Source code can be written in a 'high level' language such as Python or a 'low level' language called 'Assembly language'.

However, a computer doesn't understand our nicely formatted, readable language. Instead it runs machine code (object code) which form the instruction set of that particular CPU.

Each machine code instruction is actually a binary number, which for readability is represented in hexadecimal format. For example, the instruction below is a typical high level language command


While a machine code instruction (in hexadecimal) looks like this


Because of these different requirements, there needs to be something to convert people-friendly source code into computer-friendly machine code. This is the role of a translator.


Translator: converts one computer language into another. Usually it translates source code into machine code.

There are three main types of translators

  • Assembler
  • Compiler
  • Interpreter

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: What is a compiler