What is a program?
Examples of high level languages
Python, C++, C, and Java
Adv. and Disadv. of high level languages
- Generally slower than assembly code - have to be more extensively translated - Resemble human language - Faster to write - Easier to debug - Easier to maintain
Low level languages + examples
Adv and disadv of assembly languages
Why would a programmer use assembly language?
To make use of special hardware
To make use of special machine-dependent instructions
To write code that doesn’t take much space in primary memory
To write a code that performs task very quickly
Info about machine code
Not written by human programmers
- Assembly language or high-level languages are all translated into machine
code before being fed to the processor
Translators
Compiler
A compiler translates a high-level language like Python into machine code
- This machine code is stored in a file than can then be executed in the CPU.
Interpreter
Rather than translating a high-level language into machine code, an
interpreter directly executes a program in the CPU, line-by-line