diff --git a/_includes/cheatsheet-binary.md b/_includes/cheatsheet-binary.md index d9d2260..19197f0 100644 --- a/_includes/cheatsheet-binary.md +++ b/_includes/cheatsheet-binary.md @@ -19,10 +19,8 @@ For a value `V`, we write `«V»` for the binary encoding of `V`. «#{E_1...E_m}» = [0xB6] ++ «E_1» ++...++ «E_m» ++ [0x84] «{K_1:V_1...K_m:V_m}» = [0xB7] ++ «K_1» ++ «V_1» ++...++ «K_m» ++ «V_m» ++ [0x84] - varint(v) = e(v, 128) - - e(v, d) = [v + d] if v < 128 - e(v >> 7, 0) ++ [(v & 0x7F) + d] if v ≥ 128 + varint(v) = [v] if v < 128 + [(v & 0x7F) + 128] ++ varint(v >> 7) if v ≥ 128 The functions `binary32(F)` and `binary64(D)` yield big-endian 4- and 8-byte IEEE 754 binary representations of `F` and `D`, respectively.