What is a hamming code?
Hamming code is a method for detecting and correction of errors in binary transmission. It makes other binary digits in the sequence used for inspection, as well as an algorithm that provides detection logic. Such a code is able to find two errors in any bits sequence and fix one bit that can be incorrect. The most commonly referred to the henzing code is known as Hamming (7.4), where four indicate the original number of initial bits and seven represent the total number of bits in the sequence for additional control bits. Bits, referred to as parity bits, into the sequence. Control bits are always injected in a position that is the force of two, so any number of bits can be verified including other parity bits. This can continue until the last parity bit added to the sequence is not in a position that is the force of two, which is less or equal to the final position in the sequence.
with all parity bits on site are leftthe position of real data bits. Given the example of a four -bit example, the bit positions would be one, two and four parity bits, while the positions of three, five, six and seven are data. Once this sequence is set, the logic of the hamming code works for work.
In the hamming code, each of the parity bits that have been added to the sequence is used to check some bit positions close to themselves, including themselves. Parity Bit in the One position checks every additional bit position, which is basically every odd position in the sequence. The second parity bit, in two, checks the two and three positions, then skips two positions, checks two more positions, jumps up two more, etc. If the parity piece is four, it works similarly in checking the location of four to seven, then skipping four positions, checking four more and then. Each parity bit in the sequence continues in this way throughout the sequence.
The process by which the Hamming code detects and corrects the error is the addition of bitsIn the control sequence for each parity control, each of which must be a even number. Due to the seven -bit example, one, three, five and seven bits are added for the first parity control. If the total amount is, the parity will log off, but if the total amount is odd, then an error occurs. Since parity checks overlap, two such errors are displayed. When the bite positions of two -ting bit positions that fail to come up with the sum are revealed, the bit that needs to be repaired.
In the example of a seven -bit handy code, disadvantage that bit in position five is incorrect. The sum of bits in positions one, three, five and seven comes out as an odd number, as well as the sum of bits in positions of four to seven. This shows that the parity control of the control bits in positions one and four failed. When one and four add up, there are five, which is a position for the wrong bit in the transmission that needs to be repaired.