Text Size
The information size of a text I = K · i from characters, pages and lines or the alphabet size; how many characters fit in a file.
The text size calculator solves exam problems: the size of a text from the number of characters or from pages and lines, the bits per character from the alphabet size, and how many characters fit in a file of a given size.
Formulas
I = K · i, N = 2i
K is the number of characters (including spaces and punctuation), i is the bits per character, N is the alphabet size. If N is not a power of two, i is the smallest whole number with 2i ≥ N.
| Encoding | Bits per character |
|---|---|
| ASCII, Windows-1251 | 8 |
| UTF-16 (Unicode) | 16 |
| UTF-32 | 32 |
Units as in school problems: 1 byte = 8 bits, 1 KB = 1024 bytes, 1 MB = 1024 KB (strictly speaking KiB and MiB).
Example. 16 pages of 32 lines of 64 characters in an 8-bit encoding: K = 16 · 32 · 64 = 32,768, I = 32,768 · 8 = 262,144 bits = 32 KB.
Comments
No comments yet.