Any2Quiz
ICSE / 11 / Computer Science / Encodings – Binary integer & real encodings, ASCII / ISCII

Unicode Quiz - ICSE Class 11 Computer Science

Free practice quiz: Unicode (ICSE Class 11 Computer Science). 59 multiple-choice questions with answers and explanations. Play online, no sign-up needed.

Play all 59 questions free

Sample questions

  1. What is the minimum number of bits required to represent the decimal integer -255 in two's complement, assuming a standard signed integer representation?

    1. 8
    2. 9
    3. 10
    4. 16
    Show answer

    Answer: B. 9

    To represent -255 in two's complement, we first consider the positive value 255. 255 in binary is 11111111 (8 bits). To find the two's complement of -255, we first find the one's complement of 255 (flipping all bits) and then add 1. However, this assumes we have enough bits for the positive number. Since 255 requires 8 bits, to represent a negative number, we need at least one more bit for the sign. Let's try with 9 bits. The range for 9-bit two's complement is -(2^(9-1)) to +(2^(9-1) - 1), which is -2^8 to 2^8 - 1, or -256 to 255. Since -255 falls within this range, 9 bits are sufficient. An 8-bit system can represent from -128 to +127, so it cannot represent -255. Therefore, the minimum number of bits required is 9.

  2. In the ASCII encoding, the character 'a' has a decimal value of 97. What is the decimal value of the character 'z'?

    1. 121
    2. 122
    3. 123
    4. 124
    Show answer

    Answer: B. 122

    In ASCII, lowercase letters are assigned consecutive decimal values. Since 'a' is 97, 'b' is 98, 'c' is 99, and so on, we can determine the value of 'z' by counting. There are 26 letters in the English alphabet. 'z' is the 26th letter. So its value would be 97 + (26 - 1) = 97 + 25 = 122. Therefore, the decimal value of 'z' in ASCII is 122.

  3. In the context of character encodings, what is the primary difference between ASCII and UTF-8?

    1. ASCII uses 8 bits per character, while UTF-8 uses a variable number of bytes (1 to 4).
    2. ASCII can represent more characters than UTF-8.
    3. UTF-8 is only used for English characters, while ASCII supports multiple languages.
    4. ASCII is a 7-bit encoding, while UTF-8 is always 8 bits.
    Show answer

    Answer: A. ASCII uses 8 bits per character, while UTF-8 uses a variable number of bytes (1 to 4).

    ASCII is a 7-bit encoding (often extended to 8 bits with an unused bit), limited to 128 (or 256) characters. UTF-8 is a variable-width encoding that uses 1 to 4 bytes to represent characters. Crucially, UTF-8 is backward compatible with ASCII: the first 128 characters (0-127) in UTF-8 are identical to the ASCII characters. UTF-8 supports the entire Unicode character set, encompassing far more characters than ASCII. While UTF-8's basic unit is a byte, its encoding can span multiple bytes for non-ASCII characters.

  4. If ISCII is used to represent Indian languages, what is its typical bit depth per character?

    1. 7 bits
    2. 8 bits
    3. 16 bits
    4. Variable
    Show answer

    Answer: B. 8 bits

    ISCII (Indian Standard Code for Information Interchange) is an 8-bit character encoding standard. This means it can represent up to 256 distinct characters. This was designed to accommodate the various Indian scripts and their characters.

  5. What is the decimal value of the unsigned 16-bit binary number 1111111111111111?

    1. 65535
    2. 65536
    3. 32767
    4. 32768
    Show answer

    Answer: A. 65535

    For an unsigned N-bit integer, the maximum value is 2^N - 1. Here, N = 16. So the maximum value is 2^16 - 1. 2^16 is 65536. Therefore, 2^16 - 1 = 65535. The binary number 1111111111111111 consists of all ones, which represents the maximum value for a 16-bit unsigned integer.

Take the full quiz

Browse all ISCII quizzes