1.2.4 Flashcards
Programming Paradigm
A style of computer programming . Each programming language support tackling problems in different ways
4 major programming paradigms :
- Procedural
- Declarative
- Object-orientated
- Functional
Procedural Programming
- Able to be applied to a wide range of problems
- Easy to write and interpret
- Written as a sequence of instructions and which are then carried out in a step-by-step manner
Object-oriented Programming
Designed to :
- Abstract details of implementation away from the user
- Make code reusable
- Make programs easy to maintain
Declarative Programming
User writes statements that describe the problem that needs to be solved and the language decides the best way of solving it
Functional Programming
Statements are written as a series of functions which accept input data as arguments and return an output
Procedural Programming Techniques
Uses a list of instructions telling a computer , step-by-step , what to do and usually has a linear order of execution from the first statement to the second
Assembly Language
A low-level language which closely reflects how opcode and operands work
Mnemonics
Assembly language instructions use abbreviations called mnemonics
For example :
Load ➡️ LDA
Store ➡️ STA
Subtract ➡️ SUB
LMC
BRA - Branch always
BRZ - Branch if 0
BRP - Branch if 0 or positive
HLT - Ends LMC program
DAT - Data location