GATE / CS ARCHIVE

GATE CSE 2004 / QUESTION 58

BCD threshold detector gate count

Digital Logic · Binary Codes & Error Detection · Full GATE CSE 2004 paper

GATE 2004, Q58 2 marks · MCQ
Report issue

Binary Codes & Error Detection

Question 58, GATE 2004: A decimal digit is encoded in four-bit BCD: 0=0000,…,9=1001. A combinational circuit must output 1 iff the digit is at least 5. Using only AND,OR,NOT gates, what is the minimum number of gates?
Options:
(A) 2
(B) 3
(C) 4
(D) 5
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. Write the BCD inputs A,B,C,D with weights 8,4,2,1. For valid digits 0–9, the threshold predicate digit≥5 is A OR[B AND(C OR D)].

2. This uses three gates: one OR for C+D, one AND with B, and one OR with A. All four inputs are essential on valid BCD pairs (0/8,1/5,4/6,4/5 respectively), and a two-gate AND/OR/NOT network cannot express both the independent A case and the nested B∧(C∨D) case.

3. Invalid BCD encodings 10–15 are unspecified/don’t-care, as the source produces a digit.

4. Teaching check: Use digit weights 8,4,2,1. Digits 8 and 9 are detected by the 8-bit; digits 5,6,7 require the 4-bit and at least one low bit. Values 10–15 are not decimal digits supplied by this source, so they are don’t-care cases rather than additional truth-table requirements.

Original paper, page 8