A language that is close to what a CPU would actually do and written for specific hardware
2
New cards
Examples of low level language
* machine code * assemble language
3
New cards
Machine Code
the lowest level programming language consisting of 0s and 1s. CPUs can directly process it as a string of CPU instructions. 1st generation
4
New cards
pros of machine code
* more flexibility with commands * commands can be directly executed without a translator * faster to process as CPU doesn’t have to translate * more memory efficient
5
New cards
cons of machine code
* usually written for 1 type of machine or processor- wont work on others * very hard for programmers to read and understand * programmer requires knowledge of internal structure of CPU
6
New cards
Assembly Language
2nd generation language that uses mnemonics to form instructions. Each mnemonic corresponds with a machine code instruction.
7
New cards
pros of assembly language
* much easier to read and understand that machine code * more accessible to programmers
8
New cards
cons of assembly language
* not as easy to use as high level languages * requires translation * requires an assembler
9
New cards
high level languages
3rd gen programming languages that are easy for humans to understand
10
New cards
examples of high level languages
* python * java * C++
11
New cards
pros of high level languages
* one instruction of high level=many instructions of machine code * portable- same code works for many different machines and processers * easy for programmer to store data (e.g. in arrays) without knowledge of memory structure * code is close to english so is easy to read and understand
12
New cards
cons of high level languages
* must be translated for computer to understand * programs are less memory efficient and slower to execute
13
New cards
translator
a program that allows source code to be understood and executed by the computer
14
New cards
types of translator
* compiler * interpreter
15
New cards
compiler
type of translator that translates all of the source code at once and creates one executable file
16
New cards
pros of compiler
* only required once to create executable file * returns a list of errors for the entire program once compiling is complete * once compiled program runs quickly
17
New cards
cons of compiler
* compiling can take a long time, so program isn’t immediately executed * not good for debugging
18
New cards
interpreter
translates and runs the source code of one instruction at a time
19
New cards
pros of interpreters
* will return first error it finds and then stop-good for debugging * more immediate execution of the program
20
New cards
cons of interpreters
* doesn’t create an executable file * needed every time you want to run the program * programs will run more slowly
21
New cards
IDE
Integrated Development Environment- A piece of software to help a programmer develop programs