Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A team designs a character set for a language with 1200 different characters. Every character must have its own binary code, and every code must use the same number of bits.
A character set gives each character a binary code. ASCII uses 7 bits (128 codes), usually one byte a character; the letters are in order and a small letter is 32 more than its capital. Unicode has far more characters, including other languages and emojis, so it needs more bits per character. Bits for a text characters bits per character.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Given. 1200 characters, each with its own code.
Step 1. Try 10 bits. codes. That is fewer than 1200, so 10 bits are not enough.
Step 2. Try 11 bits. codes. That is at least 1200, so 11 bits is the smallest number that works.
Step 3. Why not ASCII. 7 bits give only codes. The language needs 1200, so most characters would have no code.
Step 4. The document. bits, and bytes.
Check. Unicode was made for exactly this case: it has codes for the characters of many languages, using more bits than ASCII.
Answer: (a) 11 bits. (b) ASCII has only 128 codes. (c) 1000 bytes.
Log in to join the discussion.
Loading…