BCD & Special Codes MCQs: 12 Solved Questions with Explanations

Work through 12 previous-year MCQs on digit-wise BCD, Excess-3 correction and Gray-code conversion, from GATE, ISRO, DSSSB and UGC NET, each solved step by step.

KnowledgeGate Team

Exam prep & CS education

10 Aug 20268 min read

BCD questions often go wrong because a learner converts the whole decimal number into ordinary binary instead of encoding one decimal digit at a time. Excess-3 adds a correction rule, while Gray-code questions become confusing when the XOR direction is reversed. Those three codes, plus the BCD adder, carry almost every question this subtopic sets, and the twelve solved here all come from previous-year papers: CDAC CCAT, Coal India, DSSSB, BPSC, ISRO, UGC NET, UPPSC and GATE. Before reading each explanation, select an option and write at least one line of working. Digital Electronics sits inside the wider GATE CS Exam Preparation syllabus, where these four codes are a small but reliably examined corner.

BCD, Excess-3 and Gray code rules to use before the MCQs

Keep these three rules visible while solving:

Code

Encoding rule

Valid range or conversion rule

8421 BCD

Encode every decimal digit separately in four bits.

A digit can use only 0000 through 1001.

Excess-3

Add 3 to every decimal digit, then write the four-bit result.

Valid digit codes run from 0011 through 1100.

Reflected Gray

Convert binary to Gray with G = B XOR (B >> 1).

Convert Gray to binary by cumulative XOR from the most significant bit.

Calibrate the rules with decimal 59. Its ordinary binary value is 111011. Its BCD form is 0101 1001 because decimal 5 becomes 0101 and decimal 9 becomes 1001. Its Excess-3 form is 1000 1100 because 5 + 3 = 8 and 9 + 3 = 12. Finally, the Gray code of binary 111011 is 111011 XOR 011101 = 100110.

These are four different representations, not interchangeable spellings of the same bit string. Spacing the four-bit digit groups also makes BCD mistakes easier to spot. If the ordinary-binary step is still slow, revise Number Systems and Base Conversions Explained before working through the questions below.

BCD MCQs 1-3: digit-wise encoding and bit counts

Question 1 (CDAC CCAT 2017)

The number of bits required to represent the decimal number 12547 using Binary Coded Decimal numbers is?

  • A. 14

  • B. 10

  • C. 16

  • D. 20

Correct answer: D. 20.

12547 has five decimal digits. At four bits per BCD digit, the requirement is 5 x 4 = 20 bits. Ordinary binary conversion is unnecessary.

Question 2 (Coal India 2017)

The decimal number 395, when converted into binary occupies _____ binary digits, whereas when it is represented using BCD codes, occupies _____ binary digits.

  • A. 12 ; 9

  • B. 7 ; 12

  • C. 9 ; 12

  • D. 12 ; 7

Correct answer: C. 9 ; 12.

395 = 256 + 128 + 8 + 2 + 1, so its ordinary binary form is 110001011, or 9 bits. BCD encodes 3, 9, and 5 as 0011 1001 0101, which uses 12 bits. The pair is 9 ; 12.

Question 3 (DSSSB 2021)

What is the representation of (4589)₁₀ in Binary Coded Decimal (BCD) form?

  • A. 0100011001100101

  • B. 0100 0101 1000 1001

  • C. 1001011000100100

  • D. 1011001000100100

Correct answer: B. 0100 0101 1000 1001.

Encode in place: 4 -> 0100, 5 -> 0101, 8 -> 1000, and 9 -> 1001. Joining these nibbles gives 0100 0101 1000 1001. Option A encodes 4665, option C encodes 9624, and option D opens with 1011, which is not a valid BCD digit at all.

BCD MCQs 4-6: valid range, storage and the decimal adder

Question 4 (BPSC 2024)

When performing BCD addition, what is the maximum value that can be represented in a single BCD digit?

  • A. 2

  • B. 10

  • C. 15

  • D. More than one of the above

  • E. None of the above

Correct answer: E. None of the above.

Four bits can hold binary values 0 through 15, but a valid BCD digit is restricted to 0 through 9. The maximum is 9, encoded as 1001. Since 9 is absent, E is correct. The trap is choosing 15.

Question 5 (ISRO 2014)

How many different BCD numbers can be stored in 12 switches? (Assume two position or on-off switches)

  • A. 2¹²

  • B. 2¹²-1

  • C. 10¹²

  • D. 10³

Correct answer: D. 10³.

Twelve switches provide 12 bits, or 12 / 4 = 3 BCD digits. Each digit has 10 states, so the total is 10 x 10 x 10 = 10³ = 1000, including leading zeroes. The count 2¹² includes invalid BCD nibbles.

Question 6 (DSSSB 2022)

Which of the following statements is INCORRECT about BCD adder?

  • A. It is used to add two decimal digits in BCD.

  • B. It has 9 input lines.

  • C. It has 5 output lines.

  • D. Its output should be a decimal digit that need not be in BCD.

Correct answer: D. Its output should be a decimal digit that need not be in BCD.

A BCD adder receives two four-bit digits and one carry-in, giving 4 + 4 + 1 = 9 inputs. Its corrected four-bit digit and carry-out give 5 outputs. The result must remain valid BCD, so D is incorrect.

Excess-3 MCQs 7-9: correction and self-complementing behaviour

Question 7 (ISRO 2007)

When two decimal digits are added in Excess-3 code and no carry is generated, the correct result is obtained by:

  • A. subtract 0011 from the sum

  • B. add 0011 to the sum

  • C. subtract 0110 from the sum

  • D. add 0110 to the sum

Correct answer: A. subtract 0011 from the sum.

The operands represent x + 3 and y + 3, so their sum contains an excess of 6. The required result has an excess of 3, so subtract 0011. For 2 and 4, 0101 + 0111 = 1100; then 1100 - 0011 = 1001, the code for 6.

Question 8 (UGC NET 2014)

The Excess-3 decimal code is a self-complementing code because

  • A. The binary sum of a code and its 9’s complement is equal to 9.

  • B. It is a weighted code.

  • C. Complement can be generated by inverting each bit pattern.

  • D. The binary sum of a code and its 10’s complement is equal to 9.

Correct answer: C. Complement can be generated by inverting each bit pattern.

Digit d has code value d + 3. Inverting four bits gives 15 - (d + 3) = 12 - d = (9 - d) + 3, the code for its 9's complement. For example, 2 -> 0101; inversion gives 1010, the Excess-3 code for 7.

Question 9 (DSSSB 2022)

Which of the following statements is/are true about Excess-3 code of the decimal number 85?

(i) It has five 1's.

(ii) Its least significant bit is 1.

  • A. Only (i)

  • B. Only (ii)

  • C. Both (i) and (ii)

  • D. Neither (i) nor (ii)

Correct answer: D. Neither (i) nor (ii).

Add 3 digit by digit: 8 + 3 = 11 -> 1011 and 5 + 3 = 8 -> 1000. Thus 85 becomes 1011 1000. It has four 1s and a least significant bit of 0, so both statements are false.

Gray-code MCQs 10-12: conversion and the reflected sequence

Question 10 (DSSSB 2021)

Gray code representation of (27)₁₀ is ____

  • A. 11011

  • B. 11100

  • C. 10110

  • D. 11010

Correct answer: C. 10110.

Convert 27 to binary, 27 = 11011₂, then apply binary-to-Gray conversion: 11011 XOR 01101 = 10110. Option A is the ordinary binary value, not its Gray code.

Question 11 (UPPSC 2018)

The binary equivalent of the Gray code 11100 is:

  • A. 10111

  • B. 00111

  • C. 01011

  • D. 10101

Correct answer: A. 10111.

Use cumulative XOR from the left. Copy b4 = 1; then b3 = 1 XOR 1 = 0, b2 = 0 XOR 1 = 1, b1 = 1 XOR 0 = 1, and b0 = 1 XOR 0 = 1. The result is 10111. Adjacent XOR converts in the opposite direction.

Question 12 (GATE 2006)

Consider numbers represented in 4-bit gray code. Let h3h2h1h0 be the gray code representation of a number n and let g₃g₂g₁g₀ be the gray code of (n + 1) (modulo 16) value of the number. Which one of the following functions is correct?

  • A. g₀(h₃,h₂,h₁,h₀) = ∑ (1,2,3,6,10,13,14,15)

  • B. g₁(h₃,h₂,h₁,h₀) = ∑ (4,9,10,11,12,13,14,15)

  • C. g₂(h₃,h₂,h₁,h₀) = ∑ (2,4,5,6,7,12,13,15)

  • D. g₃(h₃,h₂,h₁,h₀) = ∑ (0,1,6,7,10,11,12,13)

Correct answer: C. g₂(h₃,h₂,h₁,h₀) = ∑ (2,4,5,6,7,12,13,15).

Build the reflected Gray cycle, then index each row by the decimal value of the current Gray word h:

n

Current h

h index

Next g

n

Current h

h index

Next g

0

0000

0

0001

8

1100

12

1101

1

0001

1

0011

9

1101

13

1111

2

0011

3

0010

10

1111

15

1110

3

0010

2

0110

11

1110

14

1010

4

0110

6

0111

12

1010

10

1011

5

0111

7

0101

13

1011

11

1001

6

0101

5

0100

14

1001

9

1000

7

0100

4

1100

15

1000

8

0000

Output bit g₂ is 1 at current-h indices 2, 4, 5, 6, 7, 12, 13, 15, exactly option C. The final row confirms the wrap 1000 -> 0000 from Gray(15) to Gray(0).

The five traps these BCD and special-code questions expose

Trap

Questions to revisit

Whole-number binary versus digit-wise BCD

1-3

Four physical bits versus ten valid BCD states

4-5

Adder interface and correction

6-7

Self-complementing behaviour, and digit-wise Excess-3 encoding

8-9

Adjacent XOR versus cumulative XOR

10-12

Use a fixed routine under time pressure. Box the named code, split decimal digits before arithmetic, and check whether each four-bit pattern lies inside that code's valid range. Write the correction value before adding or subtracting it. For Gray code, mark the conversion direction before using XOR. In a count question, decide whether the examiner wants all raw binary patterns or only valid coded-decimal values.

Continue with Digital Electronics MCQs for broader subject practice. The closest follow-up for ordinary bases and complements is Number System MCQs: 12 Solved Questions.

BCD & Special Codes: the next practice step

Redo Questions 2, 7, 9, 11 and 12 without looking at their solutions. Together they test ordinary binary versus BCD, Excess-3 correction, digit-wise Excess-3 encoding, Gray-to-binary direction, and a complete Gray successor table. KnowledgeGate carries more than 60 practice questions on BCD and special codes, so there is plenty left once these twelve are secure. When all five come out right first time, move to timed mixed-topic practice in the GATE Test Series.

The short version is simple: BCD works digit by digit, Excess-3 shifts every digit by three, and Gray code changes one bit between successive values. The reliable solution is to write the representation rule before touching the options. That written rule is your quickest check when two choices look plausible.