There are many computer languages just as there are many languages used by people. Many of the computer languages have similiar grammar. Computer programs are typically a sequence of sentences. The sentences are made up of words and punctuation.

The words and punctuation work together to allow the programmer to describe how the problem can be solved by the computer. There are several types of sentence in most computer languages and they typically distinguished by special keywords or punctuation.

This document is not about a specific programming language but about programming in general. So how do we solve problems using a computer? Here is a diagram that shows some of the common ideas.

To solve a problem, you need to have some understanding of what a computer can do. A computer manipulates data. The computer chip (CPU) has instructions that process numbers. There are two types of numbers that the CPU can process.

Integers
Integers are whole numbers. The CPU typically uses a number of memory units called bytes to store the number. A single memory unit is normally made up of 8 bits and is called a byte. A byte can store a value that has 256 different values. As a number it can be used to represent the values 0 to 255 or -128 to 127.
Floating point
Floating point numbers are used to represent real numbers. There are normally two types of floating point number.
Single precision
Double precision

Computers are Logical. Logic is to do with things that are TRUE or FALSE. As mentioned above, a byte is made up of 8 bits. Each bit can be either 0 or 1. Often the value 0 is used to represent FALSE.

There are three main logical functions.

NOT
NOT turns something that is TRUE to FALSE and something that is FALSE to TRUE.
AND
When you turn on a light, the power must be on AND the light must not been blown.
OR
To win the game, he had to roll a six OR a three.

It is hard to explain how fast modern computers are. You may see that a computer has a 2.5 Gigahertz clock speed. If it takes 10 clock ticks to do an instruction then that is 250 million instructions per second. That is for a single CPU. Modern computers often have two or four CPUs (Cores). If you made a little robot and an instruction told it to move the width of a human hair, then doing that at 250 million times a second, the robot would move faster than the space shuttle entering the earths atmosphere at Mach 25.