Skip to content
User Avatar
#1061
Auto-translated
Ment
Hmm, but this algorithm seems to work:
bit1=xor(i1,i2)
bit2=xor(i1,i3)
bit3=xor(i1,i4)
bit4=xor(i2,i3)
bit5=xor(i2,i4)
bit6=i2
bit7=i1

Oops, I made a mistake; I had a reverse XOR in the checks. I was wrong. That is, 1 when the operands are the same. But never mind, it also passes the check with a normal XOR. They work symmetrically.
Yes. The error is detected, but again, I can quote what I wrote to Uranus.
Hermit

According to your algorithm, the combination 0000 is encoded as the message 0000000,
and the combination 1111 is encoded as the message 0000011.
But let's say we received the combination 0000010 :(
Yes, it's clear that one bit, or even more, has been corrupted – the sixth or seventh bit. But how do we know whether we transmitted 0000 and corrupted the sixth bit from 0 to 1, or 1111 and corrupted the seventh bit from 1 to 0???
This also applies to your algorithm.
So far, Uranus has proposed the best option.
Всё не так плохо как Вы думаете. Всё намного хуже!