In some country, a 6-character license plate is composed of capital letters (12 letters in total)
In some country, a 6-character license plate is composed of capital letters (12 letters in total) and decimal digits in any order. Each character is encoded with the same and minimum possible number of bits, and each number – with the same and minimum possible number of bytes. Determine the amount of memory required to store 32 license plates.
The license plate can be made up of 12 letters and 10 numbers (0, 1, 2, 3, 4, 5, 6, 7, 8, 9),
10 + 12 = 22
It follows that the minimum possible number of bits for encoding one character will be 5, since 2 ^ 4 <22 <2 ^ 5 (choose the largest, that is, 2 ^ 5, and then follow the formula N = 2 ^ i, where i and is the minimum possible number of bits).
The number consists of 6 characters, so one number weighs: 6 * 5 = 30 bits
Next, we need to find the minimum possible number of bytes for one number:
30/8 = 3.75 – round up and get 4 bytes.
Total memory capacity for storing 32 license plates:
I = 32 * 4 = 128