Using the resultant \(n − k\) = 3-bit syndrome \(\mathbf{s}\), the Hamming decoder decides if it thinks there are any bit errors in \(\hat{\mathbf{y}}\):
- If the syndrome is \(\mathbf{s} = \begin{array}{ccc}[ 0 &0 &0]\end{array}^{T}\) then the Hamming decoder thinks there are no bit errors in \(\hat{\mathbf{y}}\) (it may be wrong though). In this case, it outputs \(\hat{\mathbf{x}} = \begin{array}{cccc}[ \hat{y}_{3} &\hat{y}_{5} &\hat{y}_{6} &\hat{y}_{7} ]\end{array}^{T}\) since \(y_{3} = x_{1}\), \(y_{5} = x_{2}\), \(y_{6} = x_{3}\) and \(y_{7} = x_{4}\) in \(\mathbf{G}\).
- If the syndrome \(\mathbf{s}\) is not equal to \(\begin{array}{ccc}[ 0 &0 &0]\end{array}^{T}\) then its 3-bit number is converted into a decimal number \(i ∈ [1, 7]\). In this case, the Hamming decoder thinks that the ith bit in \(\hat{\mathbf{y}}\) has been flipped by a bit error (it may be wrong though). The Hamming decoder flips the \(i\)th bit in \(\hat{\mathbf{y}}\) before outputting \(\hat{\mathbf{x}}=\left[\begin{array}{llll}\hat{y}_3 & \hat{y}_5 & \hat{y}_6 & \hat{y}_7\end{array}\right]^T\). If there are multiple bit errors in the received codeword \(\hat{\mathbf{y}}\), the syndrome \(\mathbf{s}\) identifies which bit of \(\hat{\mathbf{y}}\) can be toggled to give the legitimate permutation of \(\mathbf{y}\) that is most similar.