mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-24 07:02:26 +01:00
DOC: Improve CCT documentation for HammingCodes (#167)
This commit is contained in:
parent
0519b6adf7
commit
634611f9db
@ -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. |
|
| 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: |
|
| | | 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 |
|
| | | Value 8 will result into binary '1000', which will be encoded |
|
||||||
| | | with the pattern 'pppdpddd', where p is a paritybit and d a databit, |
|
| | | with the pattern 'pppdpddd', where p is a paritybit and d a databit. The encoding of |
|
||||||
| | | or '10101' (Value 21) will result into (pppdpdddpd) '1001101011'. |
|
| | | 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: You need an parity Bit on Index 0 as an 'overall'-paritybit. |
|
||||||
| | | NOTE 2: You should watch the HammingCode-video from 3Blue1Brown, which |
|
| | | NOTE 2: You should watch the HammingCode-video from 3Blue1Brown, which |
|
||||||
| | | explains the 'rule' of encoding, |
|
| | | explains the 'rule' of encoding, |
|
||||||
|
@ -1291,8 +1291,8 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
|
|||||||
`${n} \n`,
|
`${n} \n`,
|
||||||
"Convert it to a binary representation and encode it as an 'extended Hamming code'. Eg:\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",
|
"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",
|
"with the pattern 'pppdpddd', where p is a parity bit and d a data bit. The encoding of\n",
|
||||||
"or '10101' (Value 21) will result into (pppdpdddpd) '1001101011'.\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",
|
"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 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",
|
"NOTE: The bit at index zero is the overall parity bit, this should be set last.\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user