A typical algorithm is shown below
- Ensure the data to be added is present in memory
- Identify the file to be opened
- Open the file
- Move to the end of the file
- Append the data from memory to the end of the file
- Save and close the file
It does not matter at this point about the purpose of the algorithm but note one very important thing: Each instruction is laid out one after another (numbering each line is up to you)
This is called 'sequence'. What this implies is that the algorithm will be able to run on a sequential CPU. Most ordinary CPUs are sequential. They handle instructions one at a time.
The opposite of sequence is 'parallel'. Which means more than one instruction is carried out at the same time. Parallel processing does have its uses and advantages but most of the time sequential algorithms are used.
Modern computer chips are often 'multi-core' which means they contain more than one CPU. But even if more than one core is used in parallel, each one is only handling instructions in sequence.
Challenge see if you can find out one extra fact on this topic that we haven't already told you
Click on this link: Sequential computer