Fault Tolerant Communication, Computation, and Replication

Problem #1

My Hamming Code simulator is written in C, and simply dumps out % of destroyed messages for a range of bit error rates. The results of the simulator are plotted below.
[ p1.c | view source]

(b)

Using the single bit weight messages:

G Matrix

(d)

A received word r=(001110) can be can be checked by simply multiplying it by HT:

Syndrome

(e)

The easiest way to correct the single bit error is to take the codeword that is only 1 bit flip away (101110). The easiest way to find that codeword is to match the syndrome with a row in the parity check matrix, H. There is guaranteed to be a row that corresponds to our calculated syndrome, so long as we only have a single bit error. If the syndrome matches row I in the parity check matrix, then the ith bit should be toggled.

If there is more than one bit error, it is possible to detect that the word has errors but it can't be corrected with Forward Error Correction. The minimum distance in this code is 3, so it would take that many errors for one codeword to mutate into another. We should be able to detect anything less than that. Certain codewords that contain 3 or more bit errors can also be detected, but not all.

(e2)

BER Plot

Problem #2

I didn't do a hardware quine. It seems like a true hardware quine should produce the proper logical pulses on the pins of an fpga to program an attached fpga. Non? For fun, though, I created a couple of quines in perl. $b='$b=%c%s%c;print sprintf($b,39,$b,39),chr(10);';print sprintf($b,39,$b,39),chr(10); $_=q{$_=q{K};s/K/$_/;print $_,chr(10)};s/K/$_/;print $_,chr(10)