Guest User

Untitled

a guest
Nov 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module full_adder(x,y,c_in,s,c_out);
  2.     input x,y;
  3.     input c_in;
  4.     output s;
  5.     output c_out;
  6.  
  7.     wire a0, a1;
  8.     wire a2;
  9.  
  10.     xor xor1(a0,x,y);
  11.     and and1(a1,x,y);
  12.     xor xor2(s,a0,c_in);
  13.     and and2(a2,a0,c_in);
  14.     or or3(c_out,a2,a1);
  15. endmodule
Add Comment
Please, Sign In to add comment