Engineering, Management, Agriculture and Veterinary MCQs are now live. FPSC, PPSC, EPE, IELTS & GRE coming soon.

Digital Electronics & Microprocessors: Number Systems and Codes

Electrical Engineering · Digital Electronics & Microprocessors

30 questions, each with the answer and a worked solution.

Practice interactively and track your score →
Question 1

What is the decimal equivalent of the binary number 1010?

  1. 5
  2. 8
  3. 10
  4. 12
Show answer & solution

Answer: (C) 10

1010₂ = 8 + 2 = 10.

Question 2

What is the binary equivalent of the decimal number 25?

  1. 10011
  2. 10101
  3. 11001
  4. 11010
Show answer & solution

Answer: (C) 11001

25 = 16 + 8 + 1.

Question 3

What is the decimal value of the hexadecimal digit A?

  1. 10
  2. 11
  3. 12
  4. 16
Show answer & solution

Answer: (A) 10

Hex digits A–F represent 10–15.

Question 4

What is the decimal value of the hexadecimal number FF?

  1. 15
  2. 240
  3. 255
  4. 256
Show answer & solution

Answer: (C) 255

FF = 15 × 16 + 15.

Question 5

What is the decimal value of the octal number 17?

  1. 7
  2. 15
  3. 17
  4. 23
Show answer & solution

Answer: (B) 15

17₈ = 1 × 8 + 7.

Question 6

What is the decimal value of the hexadecimal number 2F?

  1. 31
  2. 32
  3. 47
  4. 62
Show answer & solution

Answer: (C) 47

2F = 2 × 16 + 15.

Question 7

How many bits make up one byte?

  1. 2
  2. 4
  3. 8
  4. 16
Show answer & solution

Answer: (C) 8

Four bits make a nibble.

Question 8

What is the two's complement of the 4-bit binary number 0101?

  1. 0101
  2. 1010
  3. 1011
  4. 1101
Show answer & solution

Answer: (C) 1011

Invert to 1010 and add 1 to get 1011.

Question 9

What is the range of signed numbers that can be represented by 8 bits in two's complement form?

  1. −256 to +255
  2. −128 to +127
  3. −127 to +127
  4. 0 to 255
Show answer & solution

Answer: (B) −128 to +127

Two's complement has one more negative number than positive.

Question 10

What is the BCD code for the decimal digit 9?

  1. 0110
  2. 1001
  3. 1010
  4. 1111
Show answer & solution

Answer: (B) 1001

BCD uses four bits for each decimal digit from 0 to 9.

Question 11

Which 4-bit combinations are invalid in BCD?

  1. 0000 to 0101
  2. 0001 to 0011
  3. 0110 to 1001
  4. 1010 to 1111
Show answer & solution

Answer: (D) 1010 to 1111

Only 0000 to 1001 represent decimal digits.

Question 12

What is the main property of Gray code?

  1. It is a weighted code
  2. It uses decimal digits
  3. All bits change between values
  4. Only one bit changes between successive values
Show answer & solution

Answer: (D) Only one bit changes between successive values

Gray code is used in encoders to avoid errors.

Question 13

What is the Gray code of the binary number 1011?

  1. 0111
  2. 1011
  3. 1101
  4. 1110
Show answer & solution

Answer: (D) 1110

Gray bits: 1, 1⊕0 = 1, 0⊕1 = 1, 1⊕1 = 0.

Question 14

What is the excess-3 code of the decimal digit 5?

  1. 0101
  2. 0110
  3. 1000
  4. 1001
Show answer & solution

Answer: (C) 1000

Excess-3 = BCD + 3, so 5 + 3 = 8 = 1000.

Question 15

How many bits does standard ASCII code use for each character?

  1. 4
  2. 7
  3. 8
  4. 16
Show answer & solution

Answer: (B) 7

Extended ASCII uses 8 bits.

Question 16

What is the decimal ASCII code of the capital letter A?

  1. 32
  2. 48
  3. 65
  4. 97
Show answer & solution

Answer: (C) 65

Lowercase a is 97.

Question 17

What is the principal purpose of error detection coding within digital communication?

  1. To identify corrupted data
  2. To generate analog signals
  3. To reduce carrier frequency
  4. To increase antenna height
Show answer & solution

Answer: (A) To identify corrupted data

Parity and CRC codes detect errors.

Question 18

What is a parity bit used for?

  1. Detecting single-bit errors in transmitted data
  2. Correcting all errors
  3. Increasing data rate
  4. Encrypting data
Show answer & solution

Answer: (A) Detecting single-bit errors in transmitted data

Even or odd parity is chosen in advance.

Question 19

Which code can both detect and correct single-bit errors?

  1. Excess-3 code
  2. Simple parity
  3. Gray code
  4. Hamming code
Show answer & solution

Answer: (D) Hamming code

Hamming codes add several check bits.

Question 20

How many bytes are there in one kilobyte in computer memory terminology?

  1. 512
  2. 1,000
  3. 1,024
  4. 2,048
Show answer & solution

Answer: (C) 1,024

1 KB = 2¹⁰ bytes.

Question 21

What is the result of adding binary 1 + 1?

  1. 0
  2. 2
  3. 10
  4. 11
Show answer & solution

Answer: (C) 10

The sum is 0 with a carry of 1.

Question 22

What is the binary equivalent of hexadecimal 3C?

  1. 00110011
  2. 00111010
  3. 00111100
  4. 11000011
Show answer & solution

Answer: (C) 00111100

3 = 0011 and C = 1100.

Question 23

What is the decimal value of the binary fraction 0.101?

  1. 0.101
  2. 0.5
  3. 0.625
  4. 0.75
Show answer & solution

Answer: (C) 0.625

0.5 + 0.125 = 0.625.

Question 24

How many different values can be represented with 10 bits?

  1. 100
  2. 512
  3. 1,000
  4. 1,024
Show answer & solution

Answer: (D) 1,024

2¹⁰ = 1,024.

Question 25

What is the one's complement of 1100?

  1. 0011
  2. 0100
  3. 1101
  4. 1111
Show answer & solution

Answer: (A) 0011

One's complement inverts every bit.

Question 26

What is a weighted code?

  1. A code with no positional value
  2. A code in which each bit position has a fixed weight
  3. A code with random values
  4. A code used only for text
Show answer & solution

Answer: (B) A code in which each bit position has a fixed weight

BCD 8421 is a weighted code; Gray code is not.

Question 27

Why is hexadecimal widely used in computing?

  1. Each hex digit represents exactly four binary bits, making binary values compact
  2. It uses base 10
  3. It is easier for computers to process than binary
  4. It needs no conversion
Show answer & solution

Answer: (A) Each hex digit represents exactly four binary bits, making binary values compact

Memory addresses are usually written in hex.

Question 28

What is the hexadecimal equivalent of decimal 255?

  1. 100
  2. FF
  3. F0
  4. EE
Show answer & solution

Answer: (B) FF

255 = 15 × 16 + 15.

Question 29

What is the decimal equivalent of the BCD number 0101 0011?

  1. 35
  2. 53
  3. 83
  4. 101
Show answer & solution

Answer: (B) 53

Each 4-bit group is one decimal digit.

Question 30

What is the binary sum of 1011 and 0110?

  1. 1101
  2. 1111
  3. 10001
  4. 10010
Show answer & solution

Answer: (C) 10001

11 + 6 = 17 = 10001.

Practice these 30 questions interactively →