RTUComputer ScienceYr 2024 · Sem 32024

Q21Digital Electronics

Question

10 marks

Explain the noise margin and figure of merit of a logic family. List the differences between the TTL logic family and the MOS family.

Answer

A complete hardware synthesis of a 4-bit Binary to Gray Code converter, detailing the XOR logic derivation from structural truth tables and its final combinational gate realization.

Gray Code is an unweighted, reflective encoding scheme specifically engineered to strictly minimize switching errors in digital systems (like rotary encoders). Its defining, powerful characteristic is that between any two consecutive values, only a single specific bit ever changes its state. We must architecturally design a combinational logic circuit that accepts a 4-bit pure Binary input () and directly computes the corresponding 4-bit Gray code output ().

Step 1: Truth Table Generation

The foundational design step is constructing an exhaustive truth table mapping all 16 possible binary combinations to their Gray code equivalents.

Decimal | Binary () | Gray () 0 | 0000 | 0000 1 | 0001 | 0001 2 | 0010 | 0011 3 | 0011 | 0010 4 | 0100 | 0110 5 | 0101 | 0111 6 | 0110 | 0101 7 | 0111 | 0100 ... (Pattern continues to 15)

Step 2: Boolean Logic Derivation

By meticulously analyzing the vertical columns of the truth table, we can extract the fundamental Boolean relationships for each discrete Gray code output bit.

1. The Most Significant Bit (): Observation: The entire column is an absolute, identical carbon copy of the column. Equation:

2. The Second Bit (): Observation: is strictly logic 1 only when and are fundamentally different from each other (e.g., or ). This perfectly describes an Exclusive-OR (XOR) logic gate. Equation:

3. The Third Bit (): Observation: is logic 1 only when and are different. Equation:

4. The Least Significant Bit (): Observation: is logic 1 only when and are different. Equation:

Step 3: Hardware Logic Gate Realization

The derived equations reveal an incredibly elegant and simple hardware architecture requiring strictly three 2-input XOR gates.

1. Route input directly to output with an unbroken wire. 2. Deploy XOR Gate 1: Connect input to pin 1, and input to pin 2. The output is . 3. Deploy XOR Gate 2: Connect input to pin 1, and input to pin 2. The output is . 4. Deploy XOR Gate 3: Connect input to pin 1, and input to pin 2. The output is . This completes the optimal hardware converter design.

Back to Paper