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 instructions in the software are written as a carefully formatted set of text statements i.e. the grammar of the programming language has to be adhered to.

These text statements are called 'source code'. Source code is usually written in a high level language that people find easy to read and understand.

However, a computer doesn't understand our nicely formatted, readable language. Instead it runs binary code (eg. '1010101011110101011') within its registers, which is incomprehensible to most people. The binary code is called 'machine code' or 'object code'. You may see the raw binary converted into hexadecimal to make it slightly easier to read, but it's still difficult.

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