prev next prev next
Course navigation

Lesson 6   Machine language
Objective   Explain what machine language is.

When you follow a recipe to prepare a food dish, it's a good idea if the recipe is written in a language you understand.
Likewise, the instructions in a computer program must be in a language that the computer understands.
In a computer, all instructions and data are represented by a series of electronic switches that can be in one of two states: on or off.
The binary digits 1 (on) and 0 (off) represent these two states.
Thus, the language that a computer understands is made up of patterns of 1s and 0s.

These are referred to as binary code, or machine language. Machine language: 'The language understood by the computer is also known as machine code or binary code.
Each type of CPU has its own machine language that it understands.
A single binary digit is called a bit , and a sequence of 8 bits is referred to as a byte.
  1. Bit:A single binary digit.
  2. Byte:A sequence of 8 bits.
To a computer with a 32-bit (or 4-byte) instruction set, a computer program might look like the following:
10101000 11010110 01011101 11101100
10111100 00111000 01001101 00000111
11001000 00110110 10110101 00101000

  As you can imagine, writing programs in the language of the computer is not much fun. Decades ago, when computer programming was in its infancy, this is exactly what had to be done. Today it's much easier to write programs, as we'll begin to see in the next lesson.
Course navigation