Questions tagged [hamming-code]

Refers to a class of linear error-correcting data encoding schemes, but is often used to refer to the specific scheme Hamming(7,4) invented in 1950 by Richard W. Hamming.

In telecommunication theory, Hamming codes refer to a family of linear error-correcting codes that generalize the Hamming(7,4)-code invented by Richard Hamming in 1950. Hamming codes can detect up to two-bit errors or correct one-bit errors without detection of uncorrected errors. By contrast, the simple parity code cannot correct errors, and can detect only an odd number of bits in error. Hamming codes are perfect codes, that is, they achieve the highest possible rate for codes with their block length and minimum distance 3.1


  1. I basically ripped this out of the wikipedia page.
96 questions
0
votes
1 answer

Hamming Code, how to detect double error?

I know how to detect and correct 1 error, but as i read, to detect double error i need to add one more bit for parity at the end of the message. So whats next after adding that bit, how can i find out that there is double error?
jovanMeshkov
  • 757
  • 5
  • 12
  • 29
0
votes
0 answers

Hamming code with minimal distance 4

This code does work on Code blocks but no on the school online compiler. A memory with a length S is given. Each single bit can be marked with index from 0 to S-1. On the beginning the memory is empty and it has 0 everywhere. In the first line you…
0
votes
1 answer

(7,4) Hamming code using strings

I am trying to use a (7,4) hamming code to encode and decode a string. I started to do it with bits only and I think it's working. However, I'm not sure how to involve strings in the situation. One of my friends told me to use map dictionary but I'm…
rullzing
  • 622
  • 2
  • 10
  • 22
0
votes
1 answer

Hamming codes formulas

This is the question: Determine if the Hamming codes (15,10), (14,10) and (13,10) can correct a single error (SEC), detect a single error (SED) or detect double bit errors (DED). I do know how Hamming distance work and how you can detect an error…
0
votes
1 answer

Hamming code decoders in python?

I'm trying to compare three different decoders for Hamming codes in python: brute force, local search, and syndrome. I am having issues with my brute force implementation: def bruteForce(v): n = len(v) r = int(math.log(n+1,2)) k = n-r …
user3236854
  • 11
  • 1
  • 2
0
votes
1 answer

Compute Hamming Code on files

I am trying to code in Hamming code(python language) on data present in a .txt file. How can I go about it? DO I need to read out the data line by line, convert into ascii characters and then compute hamming code on it. Or is there any function or…
kate
  • 113
  • 1
  • 5
  • 17
0
votes
1 answer

Error detection and correction

My message bit is 10011010, so code word for this is 0110 and now the codeword is 011100101010. Suppose the error is in 10th bits and it becomes 011100101110, so finding parity bits: p1=1+3+5+7+9+11=010111=even number of 1…
TaraGurung
  • 135
  • 1
  • 21
0
votes
1 answer

stack around variable corrupted

It crashes with a debug error and says stack around variable 'code' was corrupted. This is code for a hamming code lab I am doing. The input file is just a bunch of 1's and 0's on the same line. Why is it crashing? void processFile(FILE* read,…
randomname
  • 265
  • 1
  • 9
  • 20
0
votes
1 answer

Hamming SEC/DED extra parity bit

I'm having some troubles with the SEC/DED error correction code. It seems I've found some cases in which the decoder thinks a double bit flip occured but only one really occured. I suppose I did somthing wrong, but I was not able to understand…
Marco Giglio
  • 11
  • 1
  • 3
0
votes
1 answer

Hamming Code (7,4) - C++ Implementation Failure

#include #include using namespace std; int get_bin_representation(char x){ if(x == '1'){ return 1; } else if(x == '0'){ return 0; } } int gen_hamming_code(string token){ int bits[4]; int temp(0); …
user2062542
  • 101
  • 1
  • 3
0
votes
2 answers

Double errors correcting

Is there a method to correct double errors using Hamming code?
0
votes
1 answer

Hamming Code Finding Error

A 4-bit message has been encoded with the Hamming code H(7,4) and transmitted over a possibly noisy channel with at most one error. The message 0100101 (binary) is received. Hi, I found an error at Parity 6 and the original 4 bit message is 0100111.…
Jerry Trac
  • 357
  • 4
  • 17
-1
votes
3 answers

How can I convert hamming number code in a while or for loop python

def is_hamming_numbers(x): if x == 1: return 1 if x % 2 == 0: return is_hamming_numbers(x/2) if x % 3 == 0: return is_hamming_numbers(x/3) if x % 5 == 0: return is_hamming_numbers(x/5) return 0 …
-1
votes
1 answer

Designing a circuit that calculates Hamming distance?

I came across this question and I couldn't find it in textbooks or the internet. Seems pretty unique. I guess there would be some comparators and adders involved, but I have no clue where to start.
-1
votes
1 answer

Hamming Ecc computation

Consider the example of hamming ECC https://en.wikipedia.org/wiki/Hamming_code Suppose after receiving you find that parity bits 16 and 8 are incorrect , which bit do you correct
MysticForce
  • 1,253
  • 1
  • 16
  • 27