Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module full_adder (input A, B, Cin, output S, Cout);
- assign S = A ^ B ^ Cin;
- assign Cout = A & B | A & Cin | B & Cin;
- /*
- Mismo circuito, pero en un bloque 'always'. Lo dejo aquí como referencia únicamente.
- reg rS, rCout;
- always @ (A or B) begin
- rS = A ^ B ^ Cin;
- rCout = A & B | A & Cin | B & Cin;
- end
- assign S = rS;
- assign Cout = rCout;
- */
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement