163k views
2 votes
The standard qwerty keyboard has 47 keys that can place characters on the screen. Each of these keys can also display a second character by holding the shift key at the same time. How many bits would you need to encode everything that could be typed on this keyboard?

User Rashik
by
7.8k points

1 Answer

3 votes

Answer:

7 bits.

Step-by-step explanation:

In operating system, bits are used to hold or display the data. The combination of bits can be used to display the multiple items. For example, a simple bit can only show two different characters that would be mapped on either 0 or 1.

Similarly, two bits can store or hold four different characters using the combinations 00, 01, 10 and 11. In short, the total number encoded by a specific number of bits "n" can be calculated using
2^(n).

In this scenario, we have a total of 47 keys. In addition, each key can show a different character by holding shift key. Therefore, each key can show two different characters that makes 47 x 2 = 94 characters.

To show 94 characters, we need to find the bits using
2^(n).

Lets start with 5 bits.


2^(5) = 32, 32 < 94 that cannot fulfill our requirements.


2^(6) = 64, 64 < 94 that still cannot fulfill our requirements.


2^(7) = 128, 128 > 94 Therefore, 7 bits could be used to display 94 different characters.

User Alec Cunningham
by
7.8k points