Design of Hamming Code Using Verilog HDL
July 17, 2026 · 219 KB
A 2006 Electronics For You article by Sani Theo and Varun Jindal on designing an (11, 7, 1) Hamming error-correcting code in Verilog, with encoder and decoder source code.
Overview
Hamming code is a forward error-correction method that can detect single- and double-bit errors and correct single-bit errors in transmitted binary data, without asking for retransmission. The article explains why a single parity bit cannot locate an error and how adding redundant bits arranged in overlapping groups identifies the corrupted bit. It designs an 11-bit code word carrying 7 data bits and 4 parity bits, suitable for small FPGAs, CPLDs and ASICs. After an introduction to Verilog, it lists encoder and decoder modules and gives step-by-step instructions for simulating them in ModelSim.
