Access over 20 million homework & study documents
search

Code for Full Adder Gate Level Exercise

Content type

User Generated

Subject

Programming

Type

Other

Rating

Showing Page:
1/5

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/5

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/5

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 5 pages?
Access Now

Unformatted Attachment Preview

TASK-3 SIDDHARTH.NYAMAGOUDA 17BEC0462 Code for full adder gate level module adder_nand(a,b,c,sum,carry); input a,b,c; output sum,carry; wire x0,x1,x2,x3,x4,x5,x6; nand y0(x0,a,b); nand y1(x1,a,x0); nand y2(x2,b,x0); nand y3(x3,x1,x2); nand y4(x4,x3,c); nand y5(x5,x3,x4); nand y6(x6,c,x4); nand y7(sum,x5,x6); nand y8(carry,x0,x4); endmodule -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Code for 4-input Exor gate in gate level modeling style module exor_4(a,b,c,d,y); input a,b,c,d; output y; wire x0,x1; xor y0(x0,c,d); xnor y1(x1,c,d); mux4to1 y3(x0,x1,x1,x0,{a,b},y); endmodule module mux4to1(a,b,c,d,sel,y); input a,b,c,d; input [1:0] sel; output reg y; always @(*) case(sel) 2'b00:y ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Great! Studypool always delivers quality work.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4