Hamming-Code Both parity-check matrix and generator matrix can be constructed using the matrix_builder program by supplying the desired code length.