Mindmap
Programming
Inhalt der Mindmap
Programming
Languages
- High level languages
- allows code to be to be witten
- easy for humans to understand
- examples
- Basic
- Java
- Pascal
- COBOL
- C#
- C++
- Can complete complex tasks
- Machine code
- doesn't resemble any natural language instead made up of bit patterns
- High level languages need to be converted into machine code before executed by the CPU
- Examples
- opcode
- Operand
- High level languages
Variable
- store data that can change given a idenifier/ name
- Local
- defined and accessed only within the same sub procedure
- Global
- variables thant can beaccessed anywhere within a program
- Static
- variable that lasts the running programs lifespan
- Dynamic
- lifespan ends when the sub procedure it was defined in ends
Constant
- store data that does not change
- i.e PI
Assembelers
- a program which converts low level assembly code into machine code
- done by converting one word assembly instructions into opcode
- It also allocates memory to varieables resulting in operand
Interperaters
- before running high level programming language it is converted by an interpreter on line at a time into machine code which is then executed by the CPU
Compilers
- used to convert high level programming languages into machine code
- 4 main stages
- lexical analysis
- syntax anylasis
- semantic anylisis
- code generation
- generate machine code
- code optimisation employed to make more efficient/faster/less resource intensive
- check variables for if properly declared and used
- variables checked for id correct data type
- operations are checked to ensure legal for type of variable
- code generation
- tokens are checked to match expected syntax
- If syntax errors found, error messages produced
- semantic anylisis
- comments and un-needed spaces removed
- keywords , constants and identifiersreplaced by tokens
- symbol table created to hold addresses of variables, labela and subroutines
- syntax anylasis
- lexical analysis
translaters
- changes a program written in one language to another
Types of errors
- Syntax
- error that occurs when a command line dosnt follow expected language syntax
- spelling mistakes ADN instead of AND
- Runtime/ execution
- error that only occurs when a program is running and is difficult to foresee before compiling and running
- if a program needs more memory room so it crashes as it runs out
- Logical
- error that causes a program to output an incorrect answer
- if a program gives out a negative number for someones birth date
- Linking
- an error that occurs when a programmer calls a function within a program and the correct library has not been linked to that program
- square root function used but the library holding how to do this is not linked
- Rounding
- when a number is approximated and rounded to a number
- 2368 rounded to 2370
- Truncation
- number approximated to a whole number
- 34.9 truncated to 34
- Syntax
Informationen
- Beschreibung
- GCSE Computer Science (Computer Science) Mindmap am Programming, erstellt von Charlotte Hodkin am 14/04/2016.
- Erstellt von
- Charlotte Hodkin
- Aufrufe
- 1
- Bewertung