REDMARK FORGE SANDBOX
Encode · Corrupt · Recover

Error Correction Studio

An interactive digital communications lab. Compare Hamming(7,4), repetition codes and raw transmission; inject random or burst errors; measure recovery, overhead, BER and CRC integrity.

Teaching lab: results are simulated locally and use simplified channel models. Hamming(7,4) corrects a single bit error per codeword; multiple errors can be miscorrected. CRC detects many corruptions but is not cryptographic authentication.

01 · Message & code design

UTF-8 text becomes bits; original length is preserved to remove byte padding.

Ready. Run a transmission to see the coding gain and failures.

02 · Transmission metrics

Payload rate, redundancy, errors introduced, corrected bits and end-to-end integrity.

Source bits—
Sent bits—
Code rate—
Channel BER—
Residual BER—
Recovered—
Bit flips—
Corrections—
CRC-32—

Recovered message

Results will appear here.

03 · Bitstream microscope

Compare source, encoded, damaged and decoded bit sequences.

Run a simulation first.
Only the first 2,048 bits are displayed. Export contains aggregate metrics and message text, not a forensic proof of communication.

04 · Monte Carlo experiment

Repeat the current setup across independent random trials.

No trials run yet.
For burst channels, the burst location is randomized each trial. Monte Carlo estimates depend on message length and trial count.

05 · BER sweep & coding comparison

Compare residual BER at multiple channel noise levels using repeated trials.

Run a sweep to compare the selected code at 0%, 2%, 4% … 20% bit-flip probability.

06 · Reed–Solomon lab (GF(2⁸), byte symbols)

The code behind QR codes, CDs and deep-space links. Encode, damage whole bytes (errors at unknown places, erasures at known places), then decode with Berlekamp–Massey, Chien search and Forney. Guaranteed when 2·errors + erasures ≤ parity bytes.

Results appear here.

Protect or repair a file

Splits the file into RS(255, 255−parity) blocks. A protected file survives up to parity/2 corrupted bytes in every 255-byte block.

07 · Code shootout: convolutional + Viterbi vs block codes

Uncoded, repetition ×3, Hamming(7,4), and rate-½ convolutional codes (K=3 octal 7,5 and K=7 octal 171,133) with hard-decision Viterbi decoding, over a binary symmetric channel. Compared per channel bit-flip probability, so lower-rate codes spend more bandwidth.

Residual bit error rate (log scale; zero errors are drawn at the 1/(bits tested) floor).

08 · Interleaving vs burst errors

Hamming(7,4) fixes one error per codeword, so a burst kills it. A block interleaver spreads the burst over many codewords. Uses the message from panel 01.

Depth 1 means no interleaving. Bursts up to the depth are fully corrected.

09 · Checksum & CRC lab

Common CRCs with published check values, Adler-32, Fletcher-16 and the Internet checksum; plus a test of how many corruptions each one misses.

Results appear here.
Counts corruptions that leave the checksum unchanged.

10 · SECDED: extended Hamming, any size

Single-error-correct, double-error-detect (as in ECC memory). Choose the number of parity bits r: n = 2ʳ, k = 2ʳ − r − 1. (8,4), (16,11), (32,26), (64,57), (128,120).

Results appear here.