CS With NehalCS With Nehal

Error Detection Simulator

Flip bits in transit and see how parity bits, parity blocks, checksums and majority voting detect or correct the errors.

Error detection method

Data can be corrupted by interference during transmission. These methods let the receiver notice.

1. Sender

Click data bits to change them. The parity bit (P) is added on the left so the count of 1s is even (or odd).

0
P
1
2
3
4
5
6
7

Data has 4 ones, so P = 0 to make the total 4 (even).

2. Transmission & receiver

Click any bit to simulate noise flipping it during transmission.

P
1
2
3
4
5
6
7

Receiver counts 4 ones, which is even.

Parity check passed: data accepted.

About This Simulation

This error detection simulator lets you send data, corrupt bits during transmission and see whether the receiver notices. It covers parity bits, parity blocks, checksums and majority voting, including the error patterns each method misses.

Features

  • Even and odd parity bits with clickable data and transmitted bits
  • Parity block that locates and corrects a single flipped bit
  • Five checksum algorithms: sum MOD 256, two's complement, one's complement (Internet checksum), XOR and Fletcher-16
  • Majority voting with each bit sent three times
  • Examples of errors that go undetected

Topics covered

  • Parity Check
  • Parity Block
  • Checksum
  • Majority Voting
  • Automatic Repeat Request
  • Transmission Errors

Explanation

Data can be corrupted during transmission by electrical interference, so bits arrive flipped. Error detection methods add extra data calculated from the original. The receiver repeats the calculation and, if the results disagree, knows an error has occurred and can ask for the data again.

How it works

  1. Parity bit: an extra bit makes the number of 1s even (even parity) or odd (odd parity). The receiver counts the 1s; a wrong count means an error.
  2. Parity block: each byte has a parity bit and an extra parity byte checks each column. A failing row and column cross at the wrong bit, which can then be corrected.
  3. Checksum: the sender adds up the data bytes (keeping the remainder, e.g. MOD 256) and sends the result. The receiver recalculates it and compares.
  4. Majority voting: each bit is sent three times. The receiver keeps the value that appears at least twice.
  5. If an error is detected, an automatic repeat request (ARQ) asks the sender to retransmit.

Why it matters

Error detection is part of the IGCSE data transmission topic. It also shows a key engineering trade-off: extra bits make transmission more reliable but less efficient.

Frequently Asked Questions

Why can't a parity check detect two errors?

Flipping two bits changes the count of 1s by 0 or 2, so it stays even (or odd) and the check passes even though the data is wrong.

What is the difference between even and odd parity?

With even parity the total number of 1s, including the parity bit, must be even. With odd parity it must be odd.

Can a parity block correct errors?

Yes, a single error. The row and column that fail the parity check meet at the incorrect bit, which the receiver can flip back.

What is the disadvantage of majority voting?

Every bit is sent three times, so three times as much data has to be transmitted.

Related Simulations