7.1 HLL, LLL and Translators

Nov 10, 2019

Syllabus

P0LQPy.png

7.1. High- and Low-level Languages

7.1.1. HIGH-LEVEL LANGUAGES

HLL enable programmers to focus on the problem to be solved, require no knowledge of the hardware and instruction set of the computer that will use the program.

  • Closer to human language
  • Write in a shorter time
  • Debug at the development stage
  • Maintain once in use

E.g. C++, Python, Java

7.1.2. LOW-LEVEL LANGUAGES

LLL relate to the specific architecture and hardware of a particular type of computer. LLL can refer to machine code, the binary instructions or an assembly language.

  • Use of special hardware
  • Use machine-dependent instructions
  • Doesn’t take up much space in primary memory
  • Performs a task very quickly

7.1.3. MACHINE CODE

We do not usually use machine code because it’s so difficult to understand. Machine code is usually shown in binary, like a stream of zeros and ones. Sample code: 00101101010

7.1.4 ASSEMBLY CODE

Assembly language is slightly more readable than machine code because it uses mnemonics to replace keywords in machine code and uses hexadecimal numbers instead of binary ones; this shortens the code greatly and grants readability. Sample code: ADD 6A

7.2. Translators

A program must be translated into binary before a computer can use it, that’s why we need translators.

7.2.1. COMPILERS

Compilers transfer translate the whole HLL program into machine code and create an executable file. Once a program is compiled that machine code can be used again without recompilation.

7.2.2. INTERPRETERS

Interpreters read statements form a HLL program line by line. It reads the statements, execute it, then does the same thing on the next statement. Because of this, the Interpreter doesn’t have an executable file. That means, an interpreted program have to use with the interpreter.

7.2.3. ASSEMBLERS

Assemblers translates an assembly language program into machine code and create an executable file. The assembled program canbe used without the assemblers.

SUMMARY

P0L6Q0.png

There’s a table from the IGCSE course book and I really recommend you to understand all the words there.

Past Paper Questions:

P0Lo4Y.md.png

Answer

P0LvGQ.png

Answer

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.