Programmin languages Flashcards
What is a high level language?
High level languages are languages that are close to the spoken and written language of the programmer. They need to be translated into machine code through a compiler, interpreter or assembler.
What is source code?
Any code written in a high level language.
What are the advantages of a high level language?
Makes writing easier as commands are closer to English
One instruction translates into many machine code instructions
Code will run on different processors
The programmer has lots of data structures to use
Quicker and easier to understand
What are the disadvantages of a high level language?
Less memory efficient
Code is slower to execute as needs to be translated
What is a low level language?
A group of languages that operate directly on the physical CPU. The most basic from of programming language.
e.g. machine code and assembly code
What are the advantages of low level languages?
Used in embedded systems where it is necessary to to instruct hardware directly
The programmer works with the memory directly
More memory efficient
Faster to execute
What are the disadvantages of low level languages?
Code will work on one type of processor
Code is much harder to understand and write (slower to program and more expensive as requires someone with the right expertise)
Difficult to debug and maintain
What is a translator?
A translator converts a program into binary code that a computer can decode and execute.
What is a compiler?
Translates source code from a high level language into object code than machine code to be processed by the CPU.
Describe a feature of the compiler
The whole program is translated to machine code before its run.
What are disadvantages of the compiler?
Programs will not run with syntax errors
If code is changed then it needs to be recompiled
It is designed for a specific type of processor
What are advantages of a compiler?
No need for translation software at runtime
Executed quickly
Source code is kept secret
What is an interpreter?
Translates high level source code into machine code to be processed by the CPU
What is a feature of an interpreter?
Translates code line by line as the program runs
What is an advantage of an interpreter?
Code will run and will only stop if a syntax error is found.
Programs do not need to be recompiled so its easier to try out commands
Code is optimised
Not designed for s specific type of processor