Open the editor

Engineering · University

Hamming Code Slides

Free animated slides, ready to teach: 6 slides where every step appears on a click and the diagrams move. Play them right here, present them full screen, or copy them into your account to edit.

A real Tracé deck playing in your browser. No account needed.

What the lesson covers

A Hamming (7,4) code adds three parity bits to four data bits so that any single flipped bit can be found and fixed. Students see which positions each parity bit checks, encode a word and use failed checks to locate an error.

The slides, one by one

1 Hamming codes

Finding and fixing a flipped bit

Can a message repair itself after noise flips a bit?

2 Three parity bits guard four data bits

Parity bits at positions 1, 2, 4

Each position has its own set of checks

3 The failed checks add up to the error position

Sent 0110011, received 0110001

p2 and p4 fail: 2 + 4 = 6. Flip bit 6

4 Encoding 1011

Encode the data bits 1011 with a Hamming (7,4) code. Data go in positions 3, 5, 6, 7 and parity bits make each check even.

→ Each parity bit is the XOR of the data bits it checks

p_1 = d_3 \oplus d_5 \oplus d_7 = 1 \oplus 0 \oplus 1 = 0
p_2 = d_3 \oplus d_6 \oplus d_7 = 1 \oplus 1 \oplus 1 = 1
p_4 = d_5 \oplus d_6 \oplus d_7 = 0 \oplus 1 \oplus 1 = 0
\text{Codeword: } 0110011

The codeword is 0110011

5 Quick check

Checks p1 and p4 fail and p2 passes. Which bit is wrong?

  • Bit 3
  • Bit 4
  • Bit 1
  • Bit 5
Show the answer

Bit 5

The failed checks add up: 1 + 4 = 5.

6 What to remember

(7,4): 4 data bits, 3 parity bits

Parity at positions 1, 2, 4

Failed checks add up to the error

Corrects any single-bit error

Challenge: What does the decoder do if two bits flip at once?

Every slide is built click by click: text, formulas and pictures come in one step at a time, so the class follows the reasoning instead of reading ahead. Graphs with sliders can be dragged live while you present.

Make your own version with AIChange the level, the numbers or the language: type the topic and get a new deck that moves in about 30 seconds. Free, no account needed.

Questions teachers ask

How does a Hamming code find the wrong bit?

Parity bits sit at positions 1, 2 and 4, each checking the positions whose binary number contains it. The checks that fail add up to the position of the error: if p2 and p4 fail, bit 6 is wrong.

Are these slides really free?

Yes. Watch them on this page or present them full screen with no account. Making your own copy to edit is free too.

Can I change the slides before my lesson?

Yes. Press "Make my own copy" and the deck becomes one of your projects in the Tracé editor, where you can change the text, the numbers, the colours or the order of the clicks.

Do they work on a classroom projector or an interactive whiteboard?

Yes. They run in the browser on any laptop, so anything that shows your screen works. Press the right arrow or click to go to the next step.