diff --git a/doc/source/basicgameplay/codingcontracts.rst b/doc/source/basicgameplay/codingcontracts.rst index 26f4e0528..131283e22 100644 --- a/doc/source/basicgameplay/codingcontracts.rst +++ b/doc/source/basicgameplay/codingcontracts.rst @@ -272,8 +272,9 @@ The list contains the name of (i.e. the value returned by | HammingCodes: Integer to Encoded Binary | | You are given a decimal value. | | | | Convert it into a binary string and encode it as a 'Hamming-Code'. eg: | | | | Value 8 will result into binary '1000', which will be encoded | -| | | with the pattern 'pppdpddd', where p is a paritybit and d a databit, | -| | | or '10101' (Value 21) will result into (pppdpdddpd) '1001101011'. | +| | | with the pattern 'pppdpddd', where p is a paritybit and d a databit. The encoding of | +| | | 8 is 11110000. As another example, '10101' (Value 21) will result into (pppdpdddpd) | +| | | '1001101011'. | | | | NOTE: You need an parity Bit on Index 0 as an 'overall'-paritybit. | | | | NOTE 2: You should watch the HammingCode-video from 3Blue1Brown, which | | | | explains the 'rule' of encoding, | diff --git a/src/data/codingcontracttypes.ts b/src/data/codingcontracttypes.ts index ed281cfa5..ff504037e 100644 --- a/src/data/codingcontracttypes.ts +++ b/src/data/codingcontracttypes.ts @@ -1291,8 +1291,8 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [ `${n} \n`, "Convert it to a binary representation and encode it as an 'extended Hamming code'. Eg:\n ", "Value 8 is expressed in binary as '1000', which will be encoded", - "with the pattern 'pppdpddd', where p is a parity bit and d a data bit,\n", - "or '10101' (Value 21) will result into (pppdpdddpd) '1001101011'.\n", + "with the pattern 'pppdpddd', where p is a parity bit and d a data bit. The encoding of\n", + "8 is 11110000. As another example, '10101' (Value 21) will result into (pppdpdddpd) '1001101011'.\n", "The answer should be given as a string containing only 1s and 0s.\n", "NOTE: the endianness of the data bits is reversed in relation to the endianness of the parity bits.\n", "NOTE: The bit at index zero is the overall parity bit, this should be set last.\n",