GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A decimal code is self-complementing if inverting all four bits of the code for digit d gives the code for 9 − d. Which of the following codes are self-complementing? I. 8421 (BCD) II. 2421 (0-4 as 0000 to 0100, 5-9 as 1011 to 1111) III. 84-2-1 IV. 5421 V. Excess-3
- A. I, II and V only
- B. II, IV and V only
- C. II and V only
- D. II, III and V only
Correct answer: D. II, III and V only
A weighted code is self-complementing when its weights add up to 9: 2+4+2+1 = 9 and 8+4−2−1 = 9, while 8+4+2+1 = 15 and 5+4+2+1 = 12. Excess-3 is self-complementing as 3 + d complemented is 3 + (9 − d).
More Digital Logic questions
- F(A,B,C,D) = Σm(0,2,5,6,7,8,9,11,13,14). What is the number of literals in the minimal product-of-sums (POS) expression of F?
- Segment g of a BCD-to-seven-segment decoder (inputs A B C D, codes 10-15 don't-care) is on for digits 2, 3, 4, 5, 6, 8, 9, and is…
- Which of the following Boolean functions of A, B, C are self-dual (f(A',B',C') = f(A,B,C)')? I. A ⊕ B ⊕ C II. AB + BC + CA III. A'B + B'C…
- A sequential machine has 37 states. What is the minimum number of flip-flops with (i) a dense binary encoding, (ii) one-hot encoding…
- A 4-bit ripple counter (negative-edge-triggered toggle flip-flops, each clocked by the previous stage) goes from 0111 to 1000. Assuming…
- In a 4-bit ripple up-counter, count only the transient (spurious) states that appear between the stable counts, over one full cycle of 16…