The textbook I'm reading implements 1-bit adders using built-in primitive modules:
module yAdder1(z, cout, a, b, cin);
output[0:0] z, cout;
input[0:0] a, b, cin;
wire[0:0] tmp, outL, outR;
xor left_xor(tmp, a, b);
xor right_xor(z, cin, tmp);
and left_and(outL, a, b);
and right_and(outR, tmp, cin);
or my_or(cout, outR, outL);
endmodule
But why not use bit-wise operators? Seems simpler.
module yAdder1(z, cout, a, b, cin);
output[0:0] z, cout;
input[0:0] a, b, cin;
assign z = (a ^ b) ^ cin;
assign cout = (a & b) | ((a ^ b) & cin);
endmodule
Unless bit-wise operators implicitly use primitive modules?