Hamming code is linear error block code used to encode input. Hamming codes can detect up to two-bit errors or correct one-bit errors without detection of uncorrected errors.

Parity Bits in Hamming Code : 





TestBench: 

  module test;
      reg [3:0]in;
      wire [6:0]out;
      hamming_code c(in, out);
      initial 
        begin
          in=4'b1000;
          #10;
          $display("out %b", out);
              end
    endmodule

Expected Output

00000000000
00011101001
00100101010
00111000011
01001001100
01010100101
01101100110
01110001111
10001110000
10010011001
10101011010
10110110011
11000111100
11011010101
11100010110
11111111111

Leave a Reply

%d bloggers like this: