What will translate a personal characteristic into a digital code that is used to compare with a digital code stored in the computer?

  • Home
  • News
  • Sport
  • Weather
  • iPlayer
  • Sounds
  • Bitesize
  • CBeebies
  • CBBC
  • Food
  • Home
  • News
  • Sport
  • Reel
  • Worklife
  • Travel
  • Future
  • Culture
  • TV
  • Weather
  • Sounds

  • Home
  • Learn
  • Support
  • Careers
    • My Bitesize

Translators and facilities of languages

Translators are needed to translate programs written in high level languages into the machine code that a computer understands. Tools exist to help programmers develop error-free code.

  • Video
  • Test

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. Page5of 6

Translators

Any program written in a high level language is known as source code. However, computers cannot understand source code. Before it can be run, source code must first be translated into a form which a computer understands - this form is called object code.

A translator is a program that converts source code into object code. Generally, there are three types of translator:

  • compilers
  • interpreters
  • assemblers

Compilers

A compiler takes the source code as a whole and translates it into object code all in one go. Once converted, the object code can be run unassisted at any time. This process is called compilation.

Compilers have several advantages:

  • Compiled programs run quickly, since they have already been translated.
  • A compiled program can be supplied as an executable file. An executable file is a file that is ready to run. Since an executable file cannot be easily modified, programmers prefer to supply executables rather than source code.
  • Compilers optimise code. Optimised code can run quicker and take up less memory space.

Compilers have several disadvantages:

  • Because the source code is translated as a whole, there must be enough memory space to hold the source code, the compiler and the generated object code. There also needs to be temporary working space for the compiler to perform the translation. Modern systems either have enough memory or use virtual memory to hold all the data.
  • Compilers do not usually spot errors - the program has to be compiled and run before errors are encountered. This makes it harder to see where the errors lie.
  • The source code must be re-compiled every time the programmer changes the program.
  • Source code compiled on one platform will not run on another - the object code is specific to the processor's architecture.

Interpreters

An interpreter translates source code into object code one instruction at a time. It is similar to a human translator translating what a person says into another language, sentence by sentence, as they speak. The resulting object code is then executed immediately. The process is called interpretation.

Interpreters have several advantages:

  • Instructions are executed as soon as they are translated.
  • Since instructions are executed once translated, they are not stored for later use. As a result, interpreters require less available memory.
  • Errors can be quickly spotted - once an error is found, the program stops running and the user is notified at which part of the program the interpretation has failed. This makes interpreters extremely useful when developing programs.

Interpreters also have several disadvantages:

  • Interpreted programs run more slowly as the processor has to wait for each instruction to be translated before it can be executed.
  • Additionally, the program has to be translated every time it is run.
  • Interpreters do not produce an executable file that can be distributed. As a result, the source code program has to be supplied, and this could be modified without permission.
  • Interpreters do not optimise code - the translated code is executed as it is.

Assemblers

Assemblers are a third type of translator. The purpose of an assembler is to translate assembly language into object code. Whereas compilers and interpreters generate many machine code instructions for each high level instruction, assemblers create one machine code instruction for each assembly instruction.

Assembly language being
translated into machine code by an assembler

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. Page5of 6

GCSE Subjects

  1. Art and Design
  2. Biology (Single Science)
  3. Business
  4. Chemistry (Single Science)
  5. Combined Science
  6. Computer Science
  7. Design and Technology
  8. Digital Technology (CCEA)
  9. Drama
  10. English Language
  11. English Literature
  12. French
  13. Geography
  14. German
  15. History
  16. Home Economics: Food and Nutrition (CCEA)
  17. Hospitality (CCEA)
  18. ICT
  19. Irish – Learners (CCEA)
  20. Journalism (CCEA)
  21. Learning for Life and Work (CCEA)
  22. Mandarin
  23. Maths
  24. Maths Numeracy (WJEC)
  25. Media Studies
  26. Modern Foreign Languages
  27. Moving Image Arts (CCEA)
  28. Music
  29. Physical Education
  30. Physics (Single Science)
  31. PSHE and Citizenship
  32. Religious Studies
  33. Science
  34. Sociology
  35. Spanish
  36. Welsh Second Language (WJEC)

Will translate a personal characteristic into a digital code that is used to compare with a digital code stored in the computer?

The technique is called “biometrics”.

How do computers read code?

Machine code, also known as machine language, is the elemental language of computers. It is read by the computer's central processing unit (CPU), is composed of digital binary numbers and looks like a very long sequence of zeros and ones.