UNIHIVE

Study Hub UNIPORT GES 101

GES 101 · Computer Appreciation and Application

Programming languages overview

Machine language, assembly language and high-level languages, and the translators between them (assembler, compiler, interpreter). Know the advantages of each level and some examples.

Our notes

2 min read

A program is a set of instructions telling the computer how to do a task. A programming language is the language used to write programs. Writing them is programming (coding).

Levels of programming languages

Low-level languages

  • Machine language (1st generation): binary codes (0s and 1s) the CPU understands directly. Very fast but very hard to write, and different for each type of machine.
  • Assembly language (2nd generation): uses short codes called mnemonics (ADD, MOV, SUB). Needs an assembler to translate it into machine code. Still machine-dependent.

High-level languages (3rd generation and beyond)

Written in English-like words and maths symbols; easier to learn, read and fix; machine-independent (portable).

LanguageKnown for
FORTRANscientific and engineering calculations (1950s)
COBOLbusiness data processing
BASICteaching beginners
Pascalteaching structured programming
Csystem programming, operating systems
C++, Javaobject-oriented programming, large applications, Android (Java)
Pythonsimple to read; data science, AI, scripting
JavaScript, PHPwebsites

Fourth-generation languages (4GL) are closer to human language, often for databases (SQL). Fifth-generation languages are linked with AI (Prolog).

Language translators

  • Assembler: assembly language → machine code.
  • Compiler: translates a whole high-level program at once into machine code before it runs (C, C++). Runs fast afterwards; errors are reported together.
  • Interpreter: translates and runs one line at a time (Python, BASIC). Easier to find errors, slower to run.

The program you write is the source code; the translated version is the object code.

Program development steps

  1. Define the problem.
  2. Plan the solution (algorithm, flowchart, pseudocode).
  3. Write the code.
  4. Test and debug (remove bugs, i.e. errors).
  5. Document.
  6. Maintain.

Types of errors: syntax errors (breaking the language's rules), logic errors (wrong result), runtime errors (crash while running).

Flowchart symbols: oval = start/stop; parallelogram = input/output; rectangle = process; diamond = decision; arrows = flow.

Exams usually ask: low-level vs high-level languages; compiler vs interpreter; examples of languages and their uses; flowchart symbols; types of errors.

Common mistake: saying assembly language is high-level. It is low-level, one step above machine code.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All GES 101 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.