Basic Gates, Code Converter and Parity Generator and Checker.

Experiment No. : 02

(i) Identification & verification of NOT (7404), AND (7408) OR (7432) & XOR (7486) gates. 

(ii) Designing, construction and verification of Binary to Grey convertor and Grey to Binary convertor.

(iii) Design, construction and verification of 3-bit Parity Generator and 4-bit odd parity Checker circuit.

(i) Identification & verification of NOT (7404), AND (7408) OR (7432) & XOR (7486) gates. 

NOT Gate: The NOT gate is called an inverter. The output is high when the input is low. The output is low when the input is high.

Truth Table for NOT Gate:

Pin Diagram of IC # 7404 IC (Hex Inverter) and  Pin Description

AND Gate: The output is high when both the inputs are high. The output is low level when any one of the inputs is low.

Truth Table for AND Gate:

Pin Diagram of IC # 7408 IC (Quad 2 Input AND Gate) and Pin Description

OR Gate: The output is high when any one of the inputs is high. The output is low level when both the inputs are low.

Truth Table for OR Gate:

Pin Diagram of IC # 7432 IC (Quad 2 Input OR Gate) and Pin Description        

XOR Gate – An XOR (Exclusive OR) gate gives a HIGH output (1) only when the number of HIGH inputs is odd.

Truth Table for XOR Gate:

Pin Diagram of IC # 7486 IC (Quad 2 Input XOR Gate) and Pin Description

Breadboard Connection of all NOT (7404), AND (7408), OR (7432) & XOR (7486) gates.

Observation Tables for ICs:

Look into Truth Tables for Each gates.

(ii) Designing, construction and verification of Binary to Grey convertor and Grey to Binary convertor.

General Rule for Gray Code Conversion:

  • Keep the first (MSB) bit the same as binary.
  • For the remaining bits: Gray bit = Binary bit XOR Previous Binary bit Let Bn be binary bits and Gn be Gray code bits.
  • G₁ = B₁ (MSB remains same)
  • G₂ = B₂ ⊕ B₁
  • G₃ = B₃ ⊕ B₂ and so on…

Taking example of 3 Bit Binary to Gray Code Converter

So, the truth table of 3 Bit Binary to Gray Code Converter is given below,

From table we see that Logic Functions will be for G2 G1 G0 is

G2 = B2,

               G1 = B2 ⊕ B1,

              G0 = B1 ⊕ B0

Now the Logic Diagram is-

Circuit Diagram: – Breadboard Connection of Binary to Grey code convertor.

General Rule for Gray Code to Binary Conversion:

  • Keep the first (MSB) bit the same as binary.
    • For remaining bits: Binary bit = Previous Binary bit XOR Current Gray bit Let Gn be Gray bits and Bn be Binary bits.
  • B₁ = G₁ (MSB remains same)
  • B₂ = B₁ ⊕ G₂
  • B₃ = B₂ ⊕ G₃ and so on…

Taking example of 3 bit Gray To Binary Code Converter

So, the truth table of 3 Bit Gray to binary code converter is given below

From table we see that Logic Functions will be for B2 B1 B0 is

                    B2 = G2

                                  B1 = B2 ⊕ G1

                                  B0 = B1 ⊕ G0

Now the Logic Diagram is-

Circuit Diagram: – Breadboard Connection of Grey code to Binary convertor

(iii) Design, construction and verification of 3-bit Parity Generator and 4-bit parity Checker circuit.

Basic Principle to generate the parity bit is “the module sum of even number of 1’s is 0 and the module sum of odd number of 1’s is 1. Parity Generator generates a bit to pair with the code group so as to make the number of 1’s either odd or even as desired at the transmitter side.

Basic rule for Even/Odd Parity Generator by using XOR gate

The XOR gate is the heart of parity generators because of this fundamental property

XOR of multiple bits is 1 if the number of 1s is odd, and 0 if the number of 1s is even

Taking example of 3 Bit Even/Odd Parity Generator Truth table-

From table we see that Logic Functions and diagram will be for Peven and Podd 

Peven = X⊕Y⊕ Z      

Logic Diagram for 3 Bit Even Parity Generator     

                

Podd = ( X⊕Y⊕Z )

Logic Diagram for 3 Bit Odd Parity Generator

Circuit Diagram: – Breadboard Connection : 3 Bit Even/3 Bit Odd Parity Generator

RED led show even parity system and BLUE led show odd parity system

4 Bit Even/Odd Parity Checker

At Receiver, checks each code group to see that the total number of 1’s (including Parity bit) is consistent with the agreed upon type of Parity (with Transmitter).

Taking example of 4 Bit Even/Odd Parity checker Truth table

So, if in even parity checker if message bit including parity bit is odd then LED doesn’t glow also same rule for odd parity checker.

From table we see that Logic Diagram will be for PCHECKER    

Circuit Diagram: – Breadboard Connection for 4 Bit Even/Odd Parity Checker.

  1. Connect the circuit as shown in the circuit diagram. 
  2. Before switching ON power Supply, make sure that the connections are correct. 
  3. Apply the input logic as per Truth table in terms of +5 volts for state-1 and 0 volts for state-0. 
  4. Observe the Output state. 
  5. Verify the truth table. 
  6. Repeat steps from 3 to 5 for all possible combination.
  1. All connections should be made properly.

To be Written by Student.