Zusammenfassung der Ressource
Programming Languages
- Generations
- First Generation
- Machine Code
- 0's and 1's
- Lowest Memory Usage
- Hard to read
- In machine code, a typical instruction holds an
operation code (opcode) in first 4 bits and the
operand (the data to be operated on or the address
where the data is held) in the second 4 bits
- Second Generation
- Assembly Language
- Combines machine code
statements to form arguments
and functions.
- Easier to understand and
allows for better memory
- Can be long and
hard to do.
- Machine code with words. Each command translates directly
into one command in machine code Most of the commands
are mnemonics, e.g. LDR Load Register STR Store Register ADD,
SUB The assembly code is known as source code and this is
translated into object code (compiled code) by an assembler.
- Third Generation
- Fourth Generation
- Natural Language
- English
- French
- German
- Spanish
- Polish
- Welsh
- A language that has developed
naturally through use, it contains
grammar and syntax
- Low Level
- Less readable than code written in a high-level language and so more
difficult to understand, maintain and debug. Less readable than code
written in a high-level language and so more difficult to write without
making errors Machine dependent making it difficult to port to a
different instruction set processor compared with code written using
a high-level language which do port readily because they are not
machine-oriented.
- Hierarchy
- High Level Languages
- Imperative
- Procedural
- Object Oriented
- Imperative programs are made up of sequence,
selection and iteration blocks (“Every program is
just a step, a branch and a loop”)
- Limitation of imperative
programming is that it doesn’t deal
well with ideas and concepts.
- Declarative
- Functional
- Database Query
- Logic
- Functional programming treats
procedures as mathematical
functions. The building blocks are
functions rather than instructions.
- Declarative programs describe the desired results of
the program (what it should accomplish), without
explicitly listing command or steps that need to be
carried out to achieve the results.