Sir Parshurambhau College, Pune - 30 Department of Electronics F. Y. B. SC
Sir Parshurambhau College, Pune - 30 Department of Electronics F. Y. B. SC
Aim :- To build & test Binary to Gray code converter and Gray to Binary code converter.
Circuit Diagram :-
1) Binary to Gray converter :-
G3 D3
Switch S3
B3
G2 D2
Switch S2 Outputs
B2
G1 D1
Inputs
Switch S1
B1
G0 D0
Output equations :-
G3 = B3
G2 = B3 ⨁ B2
G1 = B2 ⨁ B1
G0 = B1 ⨁ B0
Procedure :-
1) Connect Binary to Gray converter circuit.
2) Apply all input states one by one from the truth table using switches.
3) Observe and confirm the outputs.
4) Repeat the procedure for Gray to Binary converter.
2) Gray to Binary converter :-
Switch S3 G3 B3 D3
B2 D2
Switch S2 G2
Inputs Outputs
B1 D1
Switch S1 G1
B0 D0
Switch S0 G0
Output equations :-
B3 = G3
B2 = B3 ⨁ G2
B1 = B2 ⨁ G1
B0 = B1 ⨁ G0
Truth Table :-
Binary Code Gray Code
B3 B2 B1 B0 G3 G2 G1 G0
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 0
0 1 0 1 0 1 1 1
0 1 1 0 0 1 0 1
0 1 1 1 0 1 0 0
1 0 0 0 1 1 0 0
1 0 0 1 1 1 0 1
1 0 1 0 1 1 1 1
1 0 1 1 1 1 1 0
1 1 0 0 1 0 1 0
1 1 0 1 1 0 1 1
1 1 1 0 1 0 0 1
1 1 1 1 1 0 0 0