Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Understanding Hamming Codes: Generation, Transmission, and Decoding, Assignments of Electrical and Electronics Engineering

The concept of hamming codes, a type of block code used for error detection and correction. It covers the generation of hamming codes using a generator matrix, the transmission process, and decoding using parity check matrices. The document also discusses the rate of hamming codes and the impact of coding gain.

Typology: Assignments

Pre 2010

Uploaded on 08/30/2009

koofers-user-4v1
koofers-user-4v1 🇺🇸

10 documents

1 / 5

Toggle sidebar

Related documents


Partial preview of the text

Download Understanding Hamming Codes: Generation, Transmission, and Decoding and more Assignments Electrical and Electronics Engineering in PDF only on Docsity! Hamming codes are block codes, so coded vectors, c, of length n coded bits are formed from a data sequence, d, of length k information bits, and generator matrix, G, as follows: [c] = [G] [d]. nx1 nxk kx1 There are specific possible sizes of G for hamming codes based on a parameter, m. n = 2m – 1, k = n – m. So, for m = 3, n = 7 and k = 4. This is called the (7,4) Hamming code. Matlab computes the generator as: G = 1 0 1 1 1 1 1 0 0 1 1 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Remember to do the matrix multiplication modulo-2. Thus, if d = [ 0 0 1 1 ]T, c = Gd mod 2 = [ 2 1 2 0 0 1 1 ]T mod 2 = [ 0 1 0 0 0 1 1 ]T Assuming that you pass a large number of bits N >> k, you simply break up the data stream into many kx1 length vectors and encode them in sequence as depicted below: d0, d1, …, d3, d4, d5, … … dN-1 [c0 [d0 … = G … , C6] d3] [c7 [d4 … = G … , C13] d7] This yields a long coded sequence of length n/k * N coded symbols: C0, c1, c2, … Cn/k*N-1 Because we get k bits of information per n bits of coded data, we have a code with rate RFEC = k/n = 4/7. Thus, the code data stream will occupy more bandwidth (assuming no pulse shaping or higher order modulation): BWcoded = Rs = Rb / RFEC = 7/4 Rb = 7/4 BWuncoded. That’s an undesirable side effect of adding redundancy, it costs spectrum and can hurt the number of users a system can service. (As an aside, when m = 7, k/n = 120/127 and the bandwidth expansion can be almost negligible. For Hamming codes, this is a reasonable way to go, since coding gain is fairly good for high rate codes (RFEC near 1). Generally, choosing a higher rate code gives less coding gain, so high coding rates aren’t always desirable.) We’ll talk more about some alternative decoding approaches, but the Hamming decoding is worth knowing because it is easy to do by hand and easy to ask for on a test. Otherwise, you’ll never use the (7,4) for practical applications—it’s just not powerful enough. Once a data stream is encoded via a block code generator function, you rely on the parity check matrix, H, for the decoding. Basically, the parity check matrix tells you whether all of the added redundancy results in even parity. This will be the case if there are no errors—but this is not if and only if. If you flip two or more bits in a code block, you may still achieve even parity, but have too many errors to correct per block. To send data through the channel we map 0 -> 1 and 1 -> -1 and then modulate the values. This can be expressed as the transmit sequence, x: x = 1 – 2 * c As the transmit sequence goes through the channel, we add noise. Thus, our received signal, y, is:
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved