|Lesson 6||Machine language|
|Objective||Explain what machine language is.|
Describe Machine Language
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
Bit:A single binary digit.
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.
A program (also referred to as an application) is a set of instructions targeted to solve a particular
problem that can be unambiguously understood by a computer. To this end, the computer will
translate the program to the language it understands, which is machine language consisting
of 0s and 1s. Computers execute a program literally as it was programmed, nothing more and
nothing less. Programming is the activity of writing or coding a program in a particular programming
language. This is a language that has strict grammar and syntax rules, symbols, and
special keywords. People who write programs are commonly referred to as programmers or
application developers. The term software then refers to a set of programs within a particular