This is a nice little starter to get students thinking about error correction and to demonstrate how parity works to locate errors. First download the html file (at the bottom of this post) and open it to show a blank colour grid as shown to the right. I normally have this on the board when students enter the room and ask them what they think it is and how it might relate to Computer Science |

The next step is to select one student to randomise the 5 X 5 grid so that both Red and Blue are randomly chosen for each square in the grid so that it might look like the example below:

Now it's the teacher's turn, the teacher will now go to the board and add the parity information with some extra squares (essentially turning the grid from a 5 X 5 grid to a 6 X 6 grid).

The teacher can make the choice of how their parity information works, they can either choose

See the example below where I have used even Parity, I focussed on the blue squares to make sure each line (horizontal and vertical) has an even number of blue squares via adding the extra parity bits:

The teacher can make the choice of how their parity information works, they can either choose

**ODD**or**EVEN**parity so that the total number of Blues is even or the total number of Reds is even in each line.See the example below where I have used even Parity, I focussed on the blue squares to make sure each line (horizontal and vertical) has an even number of blue squares via adding the extra parity bits:

Now the fun part, ask one of the students to change any single square in the grid (turn around from the board so that the students are sure they make the choice without the teacher seeing what it was (example below)

Now come back to the board and work out which lines now have an odd number of Blue squares, I start with the horizontal lines first to find the horizontal line that has the error :

Next, I look at the vertical lines and look for an odd number of Blue squares, this line must also have an error. Where the two lines that have errors intersect (shown below) must be where the error is!

This leads to a discussion as to how the demonstration works! How did the teacher locate the error?

There are also possible extension questions:

For other ideas for teaching in general or specifically teaching aspects of Computer Science / ICT and Business, click here.

The HTML file can be downloaded below:

There are also possible extension questions:

- If there is an error like this, should the receiving computer just fix the problem anyway (as that computer knows exactly what the error is)?
- What would happen if there are two (or more) errors in the data sent?

For other ideas for teaching in general or specifically teaching aspects of Computer Science / ICT and Business, click here.

The HTML file can be downloaded below:

lr_paritybitsdemo.html |

Disclaimer: Please note that I did not write the html / java code myself and would love to be able to give credit to whoever did, the honest truth is that I cannot remember where I came across this wonderful idea but would love to be able to give credit if I could.

I have made some slight modifications to the code just to make it fit better on the screen of me when I am teaching without have to zoom in too much.

I have made some slight modifications to the code just to make it fit better on the screen of me when I am teaching without have to zoom in too much.