Number Systems and Codes

Description: This quiz covers concepts related to number systems and codes, including binary, hexadecimal, octal, and ASCII codes.
Number of Questions: 15
Created by:
Tags: number systems codes binary hexadecimal octal ascii
Attempted 0/15 Correct 0 Score 0

Which of the following is a binary number?

  1. 101011

  2. 12345

  3. ABCDEF

  4. 0x1234


Correct Option: A
Explanation:

Binary numbers are composed of only two digits, 0 and 1.

What is the hexadecimal representation of the decimal number 255?

  1. FF

  2. 100

  3. 11111111

  4. 1111111111111111


Correct Option: A
Explanation:

In hexadecimal, each digit represents a value from 0 to 15. 255 in decimal is 11111111 in binary, which is FF in hexadecimal.

Convert the octal number 755 to decimal.

  1. 493

  2. 503

  3. 513

  4. 523


Correct Option: B
Explanation:

To convert octal to decimal, multiply each digit by the corresponding power of 8 and add the results. 755 in octal is (7 * 8^2) + (5 * 8^1) + (5 * 8^0) = 448 + 40 + 5 = 503 in decimal.

Which of the following is an ASCII code for the letter 'A'?

  1. 65

  2. 97

  3. 101

  4. 110


Correct Option: A
Explanation:

ASCII codes are used to represent characters in computers. The ASCII code for 'A' is 65.

What is the binary representation of the hexadecimal number 1A?

  1. 11010

  2. 11110

  3. 11101

  4. 11001


Correct Option: A
Explanation:

To convert hexadecimal to binary, convert each hexadecimal digit to its 4-bit binary equivalent. 1A in hexadecimal is 0001 1010 in binary, which is 11010.

Which of the following is a valid octal number?

  1. 101

  2. 789

  3. 1111

  4. 1777


Correct Option: B
Explanation:

Octal numbers consist of digits from 0 to 7. 101, 1111, and 1777 are not valid octal numbers because they contain digits greater than 7.

Convert the decimal number 1234 to hexadecimal.

  1. 4D2

  2. 4C2

  3. 4E2

  4. 4B2


Correct Option: A
Explanation:

To convert decimal to hexadecimal, repeatedly divide the decimal number by 16 and write down the remainders. The remainders, read from bottom to top, give the hexadecimal representation. 1234 ÷ 16 = 77 with a remainder of 2. 77 ÷ 16 = 4 with a remainder of 13. 4 ÷ 16 = 0 with a remainder of 4. Therefore, 1234 in decimal is 4D2 in hexadecimal.

What is the ASCII code for the digit '5'?

  1. 48

  2. 49

  3. 50

  4. 51


Correct Option:
Explanation:

ASCII codes for digits start from 48 for '0' and go up to 57 for '9'.

Convert the binary number 11001101 to decimal.

  1. 205

  2. 206

  3. 207

  4. 208


Correct Option: A
Explanation:

To convert binary to decimal, multiply each digit by the corresponding power of 2 and add the results. 11001101 in binary is (1 * 2^7) + (1 * 2^6) + (0 * 2^5) + (0 * 2^4) + (1 * 2^3) + (1 * 2^2) + (0 * 2^1) + (1 * 2^0) = 128 + 64 + 8 + 4 + 1 = 205 in decimal.

Which of the following is a valid hexadecimal number?

  1. G1H

  2. 123Z

  3. FF00

  4. ABCD


Correct Option: C
Explanation:

Hexadecimal numbers consist of digits from 0 to 9 and letters A to F. G1H, 123Z, and ABCD are not valid hexadecimal numbers because they contain invalid characters.

Convert the octal number 345 to binary.

  1. 111001001

  2. 111001101

  3. 111010011

  4. 111010111


Correct Option: A
Explanation:

To convert octal to binary, convert each octal digit to its 3-bit binary equivalent. 345 in octal is 011 100 101 in binary, which is 111001001.

What is the ASCII code for the uppercase letter 'C'?

  1. 67

  2. 68

  3. 69

  4. 70


Correct Option: A
Explanation:

ASCII codes for uppercase letters start from 65 for 'A' and go up to 90 for 'Z'.

Convert the hexadecimal number 2AF to decimal.

  1. 687

  2. 688

  3. 689

  4. 690


Correct Option: A
Explanation:

To convert hexadecimal to decimal, multiply each digit by the corresponding power of 16 and add the results. 2AF in hexadecimal is (2 * 16^2) + (10 * 16^1) + (15 * 16^0) = 512 + 160 + 15 = 687 in decimal.

Which of the following is a valid binary number?

  1. 101011

  2. 11110001

  3. 100011111

  4. 1111111111111111


Correct Option: A
Explanation:

Binary numbers consist of only two digits, 0 and 1.

Convert the decimal number 1023 to binary.

  1. 1111111111

  2. 1111111110

  3. 1111111101

  4. 1111111100


Correct Option: A
Explanation:

To convert decimal to binary, repeatedly divide the decimal number by 2 and write down the remainders. The remainders, read from bottom to top, give the binary representation. 1023 ÷ 2 = 511 with a remainder of 1. 511 ÷ 2 = 255 with a remainder of 1. 255 ÷ 2 = 127 with a remainder of 1. 127 ÷ 2 = 63 with a remainder of 1. 63 ÷ 2 = 31 with a remainder of 1. 31 ÷ 2 = 15 with a remainder of 1. 15 ÷ 2 = 7 with a remainder of 1. 7 ÷ 2 = 3 with a remainder of 1. 3 ÷ 2 = 1 with a remainder of 1. 1 ÷ 2 = 0 with a remainder of 1. Therefore, 1023 in decimal is 1111111111 in binary.

- Hide questions