Please enable JavaScript.
Coggle requires JavaScript to display documents.
Unit 8 Program constructors - Coggle Diagram
Unit 8 Program constructors
Translators
Computers can only execute in binary machine code
Assemblers
Assembly language is a low level programming language that the computer can almost understand
An OpCode is short for operation code and is a single instruction executed by the CPU
Complilers
Syntax analysis
Tokens are checked to see if they match the spelling and grammar expected, using standard language.
If errors are found, error messages are produced
Interpreters
An interpreter analyses the source code statement by statement as execution proceeds.
Advantages are
Usually occupies less storage
Less complex and cheaper
We us the term translators to cover all types of software that converts code from one to another. Compilers, interpreters and assemblers are all types of translators.
Compilers
Lexical analysis
Keywords are replaced by tokens
A symbol table holds the address of variables
Comments and unneeded space are removed
Code generation
Code optimisation may be employed to make it run faster and better
Machine code is generated
Introduction
Computers need instructions, called programs to tell that what to do.
In order for the computer to understand python code, it must be put in a way the computer can understand (0s and 1s)
However we speak different languages than computers for example they speak in binary (0s and 1s)
We are learning to program using a language