mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-12 00:07:40 +01:00
format
This commit is contained in:
parent
063da8aa60
commit
b27e7d00fe
@ -1291,8 +1291,8 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
|
|||||||
"Note 2: Index 0 is an 'overall' parity bit. Watch the Hamming code video from 3Blue1Brown for more information\n",
|
"Note 2: Index 0 is an 'overall' parity bit. Watch the Hamming code video from 3Blue1Brown for more information\n",
|
||||||
"Note 3: There's a ~55% chance for an altered Bit. So... MAYBE there is an altered Bit 😉\n",
|
"Note 3: There's a ~55% chance for an altered Bit. So... MAYBE there is an altered Bit 😉\n",
|
||||||
"Note: The endianness of the encoded decimal value is reversed in relation to the endianness of the Hamming code. Where",
|
"Note: The endianness of the encoded decimal value is reversed in relation to the endianness of the Hamming code. Where",
|
||||||
"the Hamming code is expressed as little-endian (LSB at index 0), the decimal value encoded in it is expressed as big-endian",
|
"the Hamming code is expressed as little-endian (LSB at index 0), the decimal value encoded in it is expressed as big-endian",
|
||||||
"(MSB at index 0).\n",
|
"(MSB at index 0).\n",
|
||||||
"Extra note for automation: return the decimal value as a string",
|
"Extra note for automation: return the decimal value as a string",
|
||||||
].join(" ");
|
].join(" ");
|
||||||
},
|
},
|
||||||
|
@ -60,7 +60,7 @@ export function HammingEncodeProperly(data: number): string {
|
|||||||
|
|
||||||
let m = 1;
|
let m = 1;
|
||||||
|
|
||||||
while (((2**((2**m) - m - 1)) - 1) < data) {
|
while (2 ** (2 ** m - m - 1) - 1 < data) {
|
||||||
m++;
|
m++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user