Please enable JavaScript.
Coggle requires JavaScript to display documents.
7 // Programming Languages (Translators (Interpreters read a statement…
7 // Programming Languages
Languages
High-level languages
Programming languages that are close to languages used by humans
require no knowledge of the hardware and instruction set of the computer
Advantages
:check:
easy to read and understand
easy to write; write in shorter time
easy to debug at the development stage
easy the maintain once in use
Low-level languages
relate to the specific architecture and hardware of a particular type of computer
machine code
assembly language
(needs to be translated into machine code)
Assembly
Why use assembly
to make use of special hardware
to make use of special machine-dependent instructions
occupy less space in primary memory
code performs a task quickly
Example of assembly code
LDA
: load the value of the variable into the accumulator
ADD
: add the value of another variable to the value stored in the accumulator
STO
: replace the value of the variable by the value stored in the accumulator
Machine code
May be shown in hexadecimal
Translators
Interpreters
read a statement from a HLL program
perform the action specified
then do the same with the next statement
Assemblers
translate a program written in assembly language into machine code
once assembled the machine code can be repeatedly used without re-assembly
Compilers
translate a program written in HLL into machine code so that it can be used directly by a computer
the complied code can be repeatedly used and without recompilation
Computer Program
a list of computer instructions that enable a computer to perform a specific task
Error
Logic
where the program does not do what the programmer wanted to do
Syntax error
is where a program statement does not obey the rules of the programming language