**In this case, we will have 4 bits of data and we will add 3 bits of redundant with the data by calculating the 4-bit data. For example, taking a 4-bit data as,**

__Hamming Technique (7,4) :__The encoder will encode the data as follows

,Thus the decoder will receive,

0 | 1 | 1 | 0 | 0 | 1 | 1 |

As the values of

*C*are 0 then the received data has no error. Now to check error detection and correction applying a error in the data which was received by the decoder by changing a value of any bit. Here changing the value of the_{4}, C_{2}, C_{1}*h*bit from 1 to 0. So the data which will receive by the decoder will be as follows,_{5} 0 | 1 | 0 | 0 | 0 | 1 | 1 |

As the values of

*C*are not all 0 then it will arrange the data as_{4}, C_{2}, C_{1}*C*= 101 and we know 101 is equivalent to 5, thus the decoder will confirm that the_{4}C_{2}C_{1}*h*bit has the error and it will change the value of_{5}*h*, Thus the error detection and correction will be done._{5}