Excess 3 to gray code using verilog

Guest #5013766
I started working on Verilog since last night(less than 24 hours)
I'm trying to write a code for 4bit excess3 to gray code converter

i came up with this code but since I'm beginner i need your help to know 
what's my mistake
module ex3togry (A, B, C, D, , W, X, Y, Z,);
  input A,B,C,D;
  output X,W,Y,Z;
assign W= (A && B) || (A && C && D);
assign X= A || (B && C && D);
assign Y= (~B && ~ C && ~D) || ( B && D) || ( B && C);
assign Z= ~C;
endmodule

module converter3(Exin, Gout)
input [3:0] Exin;
output [3:0] Gout];

ex3togry FB0 (A [0] ,B[0],C[0],D[0],W[0] , X[0], Y[0], Z[0] );
ex3togry FB1 ( A[1],B[1],C[1],D[0],W[1] , X[1] , Y[1], Z[1]);
ex3togry FB2 ( A[2],B[2],C[2],D[2],W[2], X[2], Y[2], Z[2]);
ex3togry FB3 ( A[3],B[3],C[3],D[3],W[3], X[3] Y[3], Z [3] );
endmodule

Reply

A question of your own? This thread is over 9 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.