1.2.4 Types of programming language Flashcards
What is a programming paradigm?
“To describe an example of a way of doing things.”
Software written using programming languages.
Why do we need different programming paradigms?
-some problems are better suited to being solved using certain paradigm
What does Turing complete mean?
-Turing complete languages can solve all the problems that a computer is able to solve
-Most programming languages in most programming paradigms are said to be Turing complete
Low level:
machine code
-programs directly in 1s and 0s
-least abstract
Low level:
assembly language
-uses mnemonics
-one to one relationship
-written in assembly language and translated by an assembler
High level language:
-each instruction could be many lines of machine code
-HLL fit into two categories imperative and declarative
What are imperative languages?
-use statements that change a program’s state in the form of sequence, selection, iteration, etc
-procedural programming is a type of imperative programming
-OOP paradigms are a modern extension of the imperative programming
What are declarative languages?
-focus on whatthe program should accomplish
Advantages of machine/assembly:
-Assembly has the same efficiency of execution as machine due to its one-to-one nature
-provides direct access to system features without having to go through a software interface -this improves the speed of the program
disadvantages of machine/assembly:
-code can be difficult to understand so it is hard to modify and maintain
-code can be tedious to write and very prone to bugs
Features of procedural languages:
-focus on telling a computer exactly what to do by way of step-by-step instructions
-Blocks of code identifyset tasksthat need to be completed using procedures and functions
-need to be able to read, trace, amend and write this code
Concepts of procedural languages:
(spec doesn’t specify)
-pre defined functions
-local/global variables
-parameter passing
-modularity
-procedures
-library
What is LMC?
-LMC is a conceptual computer often used in education theory and exams to help students learn, test and understand assembly language
-The instruction set contains 11 mnemonics
What are the 11 mnemonics?
What are the addressing methods? (4)
-direct
-indirect
-immediate
-indexed