Computer Architecture and Programming Languages

Main Memory / RAM

Bits - Binary Digits

CPU - Central Processing Unit

Input / Output

Machine-Human Mismatch - Programming languages

Hierarchy of Programming Languages

  1. Machine instructions - Too difficult for humans.
  2. Assembly language
    • Each machine instruction represented symbolically. Eg "AR R12, R5".
    • Easy to understand and translate, but tediously detailed.
    • Not portable - specific to one type of CPU.
    • Is not commonly used for mainstream programming.
  3. High-level language - Mainstream programming.
    • Human "readable" language
      if (age > 21)
         canDrink = true;
    • Usually portable - can be translated for different CPUs.
    • Examples: Pascal, Cobol, Perl, Visual Basic, C, C++, Java, C#, ...
    • Human writes "source program". It's translated into an "object program" by a compiler.
  4. Natural languages (English, Deutsch, ...)
    • Impractical to translate into machine instructions.
    • Surprisingly ambiguous. "He saw a bottle of wine on the table and drank a glass of it."