WEEK 2.10 Flashcards
programming/coding
consists of instructing a computer to perform tasks
program/algorithm
sequence of instructions which maniputes data
coding languages
way of communicating with computer to code
low-level language
language whose instructions are close/identical to processor’s own instructions
high-level language
language whose instructions resemble English and are far from the computer’s own language
translation method from high-level language to computer
- compilers
- interpreters
compiler
translate whole program into machine code, then program can be executed
interpreters
translate and execute program into machine code, one instruction at a time
trade-off between instruction set size and program length
the larger the instruction set of a language, the smaller the size of a program for a given task
low-level language instruction set size
small
high-level language instruction set size
large
simplest coding language
- Hao Wang’s register machine
- only three instructions: Inc, Deb, End
- sufficient to process any computation
register machine
idealised, imaginary (and perfectly possible) computer that consists of nothing but a finite number of registers and a processing unit
registers
memory locations where numbers are stored
Inc n,m
increase value of register by n and go to step m