2A. Programming Languages

A computer has its own native machine language, where a program consists of a sequence of small instructions. An instructions might add two numbers or move a value from one memory location to another. The processor gets an instruction, performs the instruction, then repeats, perhaps a billion times a second.

Machine language is very difficult for humans to use directly. There is too much detail and too many chances to make mistakes. Higher level programming languages have been developed to make software much easier to write. There are thousands of higher level languages in existence. Two of them are Java and C++.

We will use C++ in this course. But this is not a course on C++, and there are vast parts of C++ that we will not look at. You are not expected to know C++ already. This course covers what you need. If you know Java, elementary parts of C++ should look familiar to you because Java shares most of its elementary parts with C++.

C++ is closer to machine language than Java and working in C++ helps you to understand how things work at the machine language level without the need to write directly in machine language.

Exercises

  1. What is machine language? Answer