User manual

Full adder Behavioral
module FullAdder(input a, b, cin,
output sum, cout);
assign sum = a^b^cin;
assign cout = (a&b)|(a&cin)|(b&cin);
endmodule
^ exclusive-or
| inclusive-or
& and
I parenthesized the and operations even though I didn’t have to. It is
generally better to use parentheses than not.
For this type of application, one likely would work at this level of
abstraction.
EECS 452 Fall 2014 Lecture 5 Page 66/143 Tuesday September 16, 2014