What are algorithms?
An algorithmA precise set of ordered rules or instructions that can be followed by a human or a computer to achieve a task. is a sequence of instructions or a set of rules that are followed to complete a task or solve a problem.
Algorithms are useful in lots of different situations.
They can help us learn how to do something we haven't done before, like play a new computerA device that processes information by following a set of rules called a program. game, solve a puzzle or make a model boat from a piece of paper.
The algorithm might include text, pictures, symbols and numbers.
Have you ever followed an algorithm to learn something new?
Clear instructions
When you create an algorithm, you need to include precise, step-by-step instructions. This means you will need to break down the task or problem into smaller steps.
We call this process decomposition. It is an important part of working out the steps in an algorithm.
The instructions need to be clear and in the right order, or sequence.
We want to learn to say "Hello, good morning!" in British sign language.
The instructor has broken down the process into an algorithm with three steps. Each step follows on from the one before it in the sequence:
- Wave your hand near the side of your head.
- Make a short forward movement using a closed hand with the thumb up.
- With your right hand bent towards you, use your fingertips to tap the far side of your chest, then near side of your chest.
Although the steps are in the right order, it is sometimes quite hard to understand what each action would look like.
We can add images to help make the instructions in the algorithm clearer and easier to follow.
Would this algorithm help YOU to learn how to sign "Hello, good morning?"
Solving a problem
To help us solve a problem, we can break it down, or decomposeBreak a problem down or task into smaller steps. it into steps. We can put the steps into a sequence called an algorithm.
When we play a computer game there are often tricky problems we must solve as we work our way through the game.
In this game we must help the Bitesize Bot find the way home through the shape maze. On the way, she needs to collect two battery power ups.
Speaking a computer's language
Even though you have worked hard to make your algorithm clear and accurate, computerswon鈥檛 be able to understand it as they use a different language.
The algorithm needs to be translated into codeA language that a computer can understand., which is a language that the computer does understand. An algorithm that has been translated into code is called a computer programA sequence of instructions written in a coding language that a computer can understand..
Sometimes code is called a programming language.
Activity: Algorithms quiz
Computing - Dance Mat Typing. gameComputing - Dance Mat Typing
Build and test your computing skills with different levels of touch type challenges
More on Computer science
Find out more by working through a topic
- count2 of 24
- count3 of 24
- count4 of 24
- count5 of 24