Units and File Sizes
Text file size in bits is found by multiplying the bits per character by the number of characters in the file. Each character is stored as a binary code, so the number of bits for one character tells you how much space each character takes. If a character uses 8 bits, a text file of 160 characters is 160 × 8 = 1,280 bits.
Make sure the bits per character value is in bits. If you are told each character uses a number of bytes, multiply by 8 first, because the formula needs a bit value. The number of characters is just a count, so use it as it is. The answer from the multiplication is in bits.
For more than one text file, work out the size of one file first, then multiply by the number of files. For example, 4 identical files each contain 120 characters and each character uses 8 bits. One file is 120 × 8 = 960 bits. Four files are 960 × 4 = 3,840 bits.
If a question asks for the size in bytes, the bit answer is converted afterwards; the multiplication itself always gives bits.
OCR GCSE Computer Science · Units and File Sizes