CS Unplugged has a lesson on error detection that uses secret parity bits to make a card trick work.

I wanted to use this activity as part of a timed team event, so I wrote a script to generate grids of arbitrary size where the bottom row and right column of tiles are parity bits. I’ll update this article with links to the code once I find it.

Here is a handout with sixteen grids ranging from 6x6 to 9x9 tiles.