Professional Documents
Culture Documents
Experiment-6
The logical circuit which converts the binary code to equivalent gray
code is known as binary to gray code converter. An n-bit Gray code
can be obtained by reflecting an n-1 bit code about an axis after 2n-1
rows and putting the MSB (Most Significant Bit) of 0 above the axis
and the MSB of 1 below the axis. The reflection of Gray codes is
shown below:
3- Verilog Code :
module binaryto_Gray(
input b0,
input b1,
input b2,
output g0,
output g1,
output g2
);
assign g0 = b0^b1;
assign g1 = b1^b2;
assign g2 = b2;
endmodule;
4- Simulation Results :
5- Synthesis Result :
- Schematics :
- Utilization summary :
- Delay :