Related Articles

# GATE | GATE-CS-2006 | Question 40

• Last Updated : 28 Jun, 2021

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

A: B: C: D: (A) A
(B) B
(C) C
(D) D

Explanation: Write gray code (n) numbers from 0 to 15 and make another column for (n+1) numbers by shifting the next number on top. As shown in the table:

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel. Now to determine the min terms for g3, g2, g1, g0, we see the ‘1s’ in the corresponding columns. The digit they correspond to give the min terms of the function. Thus the answers we will be:

G3(h3h2h1h0)= ∑(4,12,13,15,14,10,11,9)
G2(h3h2h1h0)= ∑(2,6,7,5,4,12,13,15)
G1(h3h2h1h0)= ∑(1,3,2,6,13,15,14,10)
G0(h3h2h1h0)= ∑(0,1,6,7,12,13,10,11)

Thus g2 is given correctly in the options.