2 ms·
47.9KiB in fact, assuming we are using 8-bits to the byte.
by dspillett 4y ago
47.9KiB in fact, assuming we are using 8-bits to the byte.
- zenexer 4y agoWhere are you getting that? log2((10^49081 - 1) / 9) / 8 / 1024 ≈ 19.9 About 20 KiB
- dspillett 4y agoAh. For some reason my head was locked in binary, and even then I was forgetting to convert Kbit->KiB. My only excuse is a bad night's sleep…
- LeifCarrotson 4y agoOnly if you're representing it as an ASCII or UTF-8 string with one byte per character, or if you're using binary-coded decimal with 8 bits instead of the typical 4 for each decimal digit. 256 (3 digits) in base 2 is one byte, 65,536 (5 digits) is two bytes, 16,777,216 (8 digits) is three bytes, 4,294,967,296 (10 digits) is four bytes, etc. Those aren't 3, 5, 8, and 10 bytes, they're 1, 2, 3, and 4.