Parity Simulation

written by Teresa Carrigan

Run model in your browser



This model demonstrates storing of bit patterns using either even or odd parity.



A random bit pattern is generated, with the number of bits specified by the number-of-digits slider. Any bit that is a 1 will hatch a yellow copy of itself. The red arrow then discards pairs of yellow 1 bits. If there are no yellow bits left over, the current parity is even; if there is a bit left over, the current parity is odd.

Finally, one extra bit is added to the original bit pattern. If the current parity is the same as the specified parity, then we add a 0 bit. If the current parity is incorrect, we add a 1 bit.


Applets on this website were written by Teresa Carrigan in 2004, for use in computer science courses at Blackburn College, with the exception of the Fireworks applet. The applets made with NetLogo require Java 1.4.1 or higher to run. The applets made with NetBeans require Java 1.4.2 or higher to run. Applets might not run on Windows 95 or Mac OS 8 or 9. You may obtain the latest Java plugin from Sun's Java site.