The informational message in Russian, originally written in the 8-bit Windows cob, was recoded into the 16-bit
The informational message in Russian, originally written in the 8-bit Windows cob, was recoded into the 16-bit Unicode encoding. As a result, the information volume of the message has become equal to 2 MB. Find the number of characters in the message.
Let’s denote the number of characters in the original message by X.
Then the size of the message in the original encoding is
8 * X bits = X bytes.
After re-encoding, the original message was doubled (16: 8 = 2). Thus, the message volume became equal to
16 * X bits = 2 * X bytes.
According to the condition, the size of the message has become equal to 2 MB. Let’s translate this value to bytes and compose equality:
1 MB = 1024 KB;
1 KB = 1024 bytes.
=> 2 MB = 2048 KB = 2097152 bytes.
2 * X bytes = 2097152 bytes;
X = 1,048,576 characters.