2.2.5
Translators
Compilers
Compilers
Translators are special software that convert source code into executable binary. Compilers are just one type of translator:
![Illustrative background for Compilers](https://image-v2.cdn.app.senecalearning.com/2018-08/5925a725-f42b-4787-8f89-a8b5bd59490e/error-1349562_1280,h_400,q_80,w_640.png)
![Illustrative background for Compilers ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-08/5925a725-f42b-4787-8f89-a8b5bd59490e/error-1349562_1280,h_400,q_80,w_640.png)
Compilers
Compilers
- Compilers translate the whole of a program in one go.
- Compilers will provide a list of errors once it has attempted the compilation process:
- This can make debugging easier.
- C, C++, Visual Basic, and Swift are all compiled languages.
![Illustrative background for Pros of compilers](https://image-v2.cdn.app.senecalearning.com/2018-08/61d41c25-a8c0-4b32-b101-5487ab592e7a/computer-code-,h_400,q_80,w_640.jpg)
![Illustrative background for Pros of compilers ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-08/61d41c25-a8c0-4b32-b101-5487ab592e7a/computer-code-,h_400,q_80,w_640.jpg)
Pros of compilers
Pros of compilers
- Compilers produce an executable program:
- There is no need to repeat this process more than once per version of the software.
- Compilers hide the source code from the end user:
- This helps to protect developers' intellectual property.
![Illustrative background for Cons of compilers](https://image-v2.cdn.app.senecalearning.com/courseImages/biology/6.3.2 - Genetics and evidence/snail-88949_640,h_400,q_80,w_640.jpg)
![Illustrative background for Cons of compilers ?? "content](https://image-v2.cdn.app.senecalearning.com/courseImages/biology/6.3.2 - Genetics and evidence/snail-88949_640,h_400,q_80,w_640.jpg)
Cons of compilers
Cons of compilers
- The compilation process can be very slow:
- This can slow down development if many small changes need to be made.
Interpreters
Interpreters
Interpreters are a type of translator which converts high level languages to executable machine code.
![Illustrative background for Interpreters](https://image-v2.cdn.app.senecalearning.com/2018-08/a205dc9f-b9aa-4319-a135-e1f94601b1b1/Java-script-code-,h_400,q_80,w_640.jpg)
![Illustrative background for Interpreters ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-08/a205dc9f-b9aa-4319-a135-e1f94601b1b1/Java-script-code-,h_400,q_80,w_640.jpg)
Interpreters
Interpreters
- Interpreters translate high-level source code into executable binary one line at a time.
- Python and JavaScript are examples of interpreted languages.
![Illustrative background for Pros of interpreters](https://image-v2.cdn.app.senecalearning.com/2018-08/ba2d3ff7-ffc3-48f9-b155-dbf6f51c7cf4/Bug-debugging-computer-code-,h_400,q_80,w_640.jpg)
![Illustrative background for Pros of interpreters ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-08/ba2d3ff7-ffc3-48f9-b155-dbf6f51c7cf4/Bug-debugging-computer-code-,h_400,q_80,w_640.jpg)
Pros of interpreters
Pros of interpreters
- Interpreters will stop as soon as they encounter an error:
- This is useful for debugging.
- Interpreted languages are 'portable':
- This means that they can be run on many different types of central processing unit as long as there is an interpreter available for the platform.
![Illustrative background for Cons of interpreters](https://image-v2.cdn.app.senecalearning.com/courseImages/biology/6.3.2 - Genetics and evidence/snail-88949_640,h_400,q_80,w_640.jpg)
![Illustrative background for Cons of interpreters ?? "content](https://image-v2.cdn.app.senecalearning.com/courseImages/biology/6.3.2 - Genetics and evidence/snail-88949_640,h_400,q_80,w_640.jpg)
Cons of interpreters
Cons of interpreters
- Running an interpreted program is slower than a compiled program because we have to translate each line every time we run the software.
- But it is quicker to get started which can be good for small changes.
- Interpreters do not produce a compiled program file:
- The process must be repeated each time the program is run.
Assemblers
Assemblers
Assemblers translate assembly code into executable binary.
![Illustrative background for Assemblers](https://image-v2.cdn.app.senecalearning.com/2018-06/6ede39b1-6f96-4078-ba64-5d07f569a573/depositphotos_5660618-stock-illustration-binary-code-seamless-pattern,h_400,q_80,w_640.jpg)
![Illustrative background for Assemblers ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-06/6ede39b1-6f96-4078-ba64-5d07f569a573/depositphotos_5660618-stock-illustration-binary-code-seamless-pattern,h_400,q_80,w_640.jpg)
Assemblers
Assemblers
- Assembly is a very low-level programming language.
- Each instruction directly corresponds to a binary sequence, and the assembler replaces the commands with the relevant binary.
![Illustrative background for Pros of assemblers](https://image-v2.cdn.app.senecalearning.com/2018-07/e2638090-d1c0-41de-b50f-248719d3f9ca/Capacity-Storage-Space-Computer-Hard-Drive-,h_400,q_80,w_640.jpg)
![Illustrative background for Pros of assemblers ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-07/e2638090-d1c0-41de-b50f-248719d3f9ca/Capacity-Storage-Space-Computer-Hard-Drive-,h_400,q_80,w_640.jpg)
Pros of assemblers
Pros of assemblers
- Assembly provides exact control over the hardware:
- This can lead to very efficient code that takes up little space in memory and is quick to execute.
- Assembly can be used on low specification machines.
![Illustrative background for Cons of assemblers](https://image-v2.cdn.app.senecalearning.com/courseImages/chemistry/3.1.1 - Relative formula mass/question-mark-2123967_640-min,h_400,q_80,w_640.jpg)
![Illustrative background for Cons of assemblers ?? "content](https://image-v2.cdn.app.senecalearning.com/courseImages/chemistry/3.1.1 - Relative formula mass/question-mark-2123967_640-min,h_400,q_80,w_640.jpg)
Cons of assemblers
Cons of assemblers
- Assembly is very difficult to use, and needs deep technical knowledge of the central processing unit and the memory.
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Jump to other topics
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
![Go student ad image](/en-GB/revision-notes/_next/image?url=%2Fen-GB%2Frevision-notes%2Fimages%2Fgo-student-uk-ad.jpg&w=640&q=100)
Unlock your full potential with GoStudent tutoring
Affordable 1:1 tutoring from the comfort of your home
Tutors are matched to your specific learning needs
30+ school subjects covered