# Error correction code with code rate 3/4

Essentially, I would like to find a way of detecting and correcting errors for block lengths of 4*k bits with a code rate of 3/4; that is, for every 4 bits, 3 of them will be data bits and the remaining bit will be a redundancy bit. A Hamming Code for example wouldn't be appropriate and I can't figure out a code that would work well.

• Can you use a convolutional code? 3/4 is a popular coding rate for this kind of code.
– MBaz
Commented Jun 28, 2021 at 15:27

A point that doesn't seem to be stressed in the introductory literature on error correcting codes* is that in general, typical error correcting codes tend to run to hundreds or even thousands of bits. This is because to be useful, you need a lot of redundancy, and that comes from really long code words.

I did a project a couple of years ago that involved rate 3/4 convolutional codes with coherence lengths in the single-digits and low tens; we gave up a lot of error correcting capability in return for the low latency of such short codes.

It is a good exercise to just do a study for yourself: find some family of codes (or start with the sphere packing limit you'll find in a book on error correcting codes) and do the math for various lengths.

* Or it's there plain as day and I just didn't pick up on it.

If you constrain yourself to codes of length 4, then there can't be a code that can correct errors. Simply because the smallest different between two different codewords can only be 2 bits. With a distance of 2 bits, you can never correct an error – if a single bit is wrong, you won't know which of (at least) two codewords was the original one.

So, no, with a block length of 4 this is impossible.

You'll need longer code words.

• Marcus, It should be possible, by doing soft decoding with Euclidean distance instead of hard decoding with Hamming distance. The coding gain would be quite small, of course.
– MBaz
Commented Jun 28, 2021 at 13:39
• That's true, it's infinitely unlikely you'd land on a point exactly in the middle with soft decoding. So, "impossible" isn't correct. "You might have a worse BER/$E_b/N_0$ curve than uncoded" might be the case. Commented Jun 28, 2021 at 13:44
• Sorry, I described my problem inaccurately. The code words can be longer (as long as the block length is a multiple of 4 bits). Commented Jun 28, 2021 at 14:02