11 lines
142 B
Plaintext
11 lines
142 B
Plaintext
|
module halfadd (
|
||
|
input wire a,
|
||
|
input wire b,
|
||
|
output wire sum,
|
||
|
output wire carry
|
||
|
)
|
||
|
{
|
||
|
assign sum = xor(a, b);
|
||
|
assign carry = and(a, b);
|
||
|
}
|