DOC: Improve CCT documentation for HammingCodes (#167)

This commit is contained in:
quacksouls
2022-10-30 19:24:09 +11:00
committed by GitHub
parent 0519b6adf7
commit 634611f9db
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -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",