Ternary Error Correction Codes

Jiaxu Hu · Kenneth J. Roche

SEC-TED Version(Minumum Distance 4)

This version can correct a single error (SEC) iff there is exactly one erroneous trit(which means it has a wrong value) in the codeword; and it can detect the presence of errors as long as there are no more than three erroneous trits (TED). For a more detailed explanation, please refer to FAQ and section 4.2 of the paper.

Encode D4

Sample: "02110010221011221"
Ternary Message

Decode D4

Sample: "2020211001022210112220"
D4 Code

Frequently Asked Questions

Q1: What does Encode D4 do?
A1: Type any ternary message with at least 3 places and click on "Encode", it will generate a error correction code for you.
Q2: What does Decode D4 do?
A1: Type an error correction code (the one you get from Encode D4), with some errors, and click on "Decode":
  • 0 errors: Will detect it's a perfect code and show the original message
  • 1 error: Will automatically correct it and show the original message
  • 2 errors: Will detect exactly 2 errors and warn you (but cannot correct)
  • 3 errors: May detect error exist, but incorrectly identify as 1-error case (false correction)
  • 4+ errors: Beyond the correction capability of this code
The code can reliably detect up to 3 errors and correct 1 error.

Key Definitions

Error Correction Code
A system of adding redundant data (the cost) to a message that enables detection and correction of errors during transmission or storage.
Code Rate
The ratio of length between original message and encoded message. Calculated as:
Code Rate = message length encoded length
Higher code rate indicate less cost for the error correction.
Minumum Hamming Distances
For error correction code, it is the minimum number of positions in which any two distinct valid codewords(with same length) differ.
D3: Distance=3 (SEC-DED, Single Error Correction and Double Error Detection)
D4: Distance=4 (SEC-TED, Single Error Correction and Triple Error Detection)

Engine Log

Starting...

SEC-DED Version(With Higher Information Rate)

This version can correct a single error (SEC) iff there is exactly one erroneous trit in the codeword; and it can detect the presence of errors as long as there are no more than two erroneous trits (DED). For a more detailed explanation, please refer to section 4.1 of the paper.

Encode D3

Sample: "2100212002202121021010202201111101121"
Ternary Message

Decode D3

Sample: "222100021200202021210210102022011111011221"
D3 Code