100% found this document useful (1 vote)
1K views15 pages

Repetition and Hamming Codes

Hamming code is a linear error-correcting code invented by Richard Hamming that can detect up to two-bit errors or correct single-bit errors. It works by adding redundant parity bits that are calculated based on the positions and values of the original data bits. Both the sender and receiver must know the encoding process used to calculate the parity bits in order to detect and correct errors during transmission or storage. Repetition codes repeat the original data multiple times to facilitate error correction, with the formula for required bits being 2r + 1, where r is the number of repetitions.

Uploaded by

Chris Gumisad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views15 pages

Repetition and Hamming Codes

Hamming code is a linear error-correcting code invented by Richard Hamming that can detect up to two-bit errors or correct single-bit errors. It works by adding redundant parity bits that are calculated based on the positions and values of the original data bits. Both the sender and receiver must know the encoding process used to calculate the parity bits in order to detect and correct errors during transmission or storage. Repetition codes repeat the original data multiple times to facilitate error correction, with the formula for required bits being 2r + 1, where r is the number of repetitions.

Uploaded by

Chris Gumisad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

HAMMING

AND
REPETITION CODES
Reporter:
CHRISTINE LOVE S. GUMISAD BSCRIM-1A
What is a Hamming code?

Hamming code is a liner code that is useful


for error detection up to two immediate bit
errors. It is capable of single-bit errors.
History of Hamming code

 Hamming code is a technique build by R.W. Hamming to detect


errors.
 Hamming code should be applied to data units of any length and
uses the relationship between data and redundancy bits.
 He worked on the problem of the error-correction method and
developed an increasingly powerful array of algorithms called
Hamming code.
 In 1950, he published the Hamming Code, which widely used today
in applications like ECC memory.
Here are some common applications of using
Hamming code:

Satellites
Computer Memory
 Modems
PlasmaCAM
Open connectors
Process of Encoding a message using Hamming Code

The process used by the sender to encode the message


includes the following three steps:

 Calculation of total numbers of redundant bits.


 Checking the position of the redundant bits.
 Lastly, calculating the values of these redundant bits.
Step 1) Calculation of the total number of redundant bits.

Let assume that the message contains:

 n- number of data bits


 p - number of redundant bits which are added to it so that np
can indicate at least (n + p + 1) different states.

Here, (n + p) depicts the location of an error in each of (n + p) bit


positions and one extra state indicates no error. As p bits can
indicate 2p states, 2p has to at least equal to (n + p + 1).
Step 2) Placing the redundant bits in their correct
position.

The p redundant bits should be placed at bit


positions of powers of 2.

For example, 1, 2, 4, 8, 16, etc. They are referred to as


p1 (at position 1), p2 (at position 2), p3 (at position
4), etc.
Step 3) Calculation of the values of the redundant bit.

The redundant bits should be parity bits makes the


number of 1s either even or odd.

The two types of parity are −


o Total numbers of bits in the message is made even is
called even parity.
o The total number of bits in the message is made odd
is called odd parity.
Here, all the redundant bit, p1, is must calculated as the parity.

It should cover all the bit positions whose binary representation should include a
1 in the 1st position excluding the position of p1.

P1 is the parity bit for every data bits in positions whose binary representation
includes a 1 in the less important position not including 1 Like (3, 5, 7, 9, …. )

P2 is the parity bit for every data bits in positions whose binary representation
include 1 in the position 2 from right, not including 2 Like (3, 6, 7, 10, 11,…)

P3 is the parity bit for every bit in positions whose binary representation
includes a 1 in the position 3 from right not include 4 Like (5-7, 12-15,… )
Process of Decrypting a Message in Hamming code

Receiver gets incoming messages which require to


performs recalculations to find and correct errors.

The recalculation process done in the following


steps:
 Counting the number of redundant bits.
Correctly positioning of all the redundant bits.
 Parity check
Step 1) Counting the number of redundant bits

You can use the same formula for encoding, the number of redundant bits

2p ≥ n + p + 1

Here, the number of data bits and p is the number of redundant bits.

Step 2) Correctly positing all the redundant bits

Here, p is a redundant bit which is located at bit positions of powers of 2, For


example, 1, 2, 4, 8, etc.
Step 3) Parity check

Parity bits need to calculated based on data bits and


the redundant bits.

p1 = parity(1, 3, 5, 7, 9, 11…)

p2 = parity(2-3, 6-7, 10-11… )

p4 = parity(4-7, 12-15, 20-23… )

P8 = parity (8-15, 24-31…)


REPETITION CODES
Repetition code- Is one of the most basic error-
correcting codes

FORMULA: 2r + 1

Example:

Given: 001, r=3

Solution: 2(3) + 1= 7 → 001001001001001001001


(repeated seven times, without space

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy