And gate¶
Problem statement¶
This circuit now has three wires (
a
,b
, andout
). Wiresa
andb
already have values driven onto them by the input ports. But wireout
currently is not driven by anything. Write anassign
statement that drivesout
with the AND of signalsa
andb
.
Solution¶
- "&"是按位与
- "&&"是逻辑与