Mind map
Chapter 8
Map content
Chapter 8
Machine Code
- Processors only understand machine code
- Sequences of binary
- Machine code needs to be rewritten for different processors
Assembler
- Assembly code uses mnemonics to represent binary sequences
- Converts assembly code to object code
- Assembly code isn't very portable
Compiler
- Converts high-level code into object code.
- This code can be distributed to any compatible system
- Once compiled code can be ran any number of times and faster that an interpreted program
- Compiled code is non human readable
Interpreter
- Takes each line converts it into machine code then runs it
- Slow to run since the user has to wait for each line to be interpreted before it can be ran
- Can lead to the same line being interpreted multiple times
Object Code
- Intermediary step before pure machine code produced.
- Placeholders where library code needs to go
- Once a linker is used machine code is produced.
Compiler
- Lexical analysis
- White spaces removed
- high level code turned into tokens
- Compiler picks out reserved words
- Variable names added to symbol table
- Syntax analysis
- Checks code follows valid syntax
- List of syntax errors generated
- Abstract syntax tree produced
- If tokens don't fit in the tree then there is a syntax error
- Code generation
- Compiler converts abstract syntax tree into object code
- Optimisation
- Removes pointless lines of code
- Makes the code more efficient
- Lexical analysis
Libraries
- Contain code to complete complex tasks that can be reused
- Library is used through an application programming interface.
Static linkers
- Library code added directly into program when compiled
- Means final program may be large in size
Dynamic linkers (Loaders)
- Compiled versions of the library are stored and the operating system links a program to them when it is run
- A loader is part of the OS and is responsible for loading a program into memory.
Information
- Description
- AS - Level Computer Science Mind Map on Chapter 8, created by Kyle Black on 17/03/2017.
- Created by
- Kyle Black
- Views
- 4
- Rating