题解 | #位运算与逻辑运算#
位运算与逻辑运算
https://www.nowcoder.com/practice/6fd04c2f524c4d898e7c9c16d37ef4b9
`timescale 1ns/1ns module top_module( input [2:0] a, input [2:0] b, output [2:0] c, output d ); assign c = a | b; assign d = a || b; //数组默认直接按位或 /* 与:& 按位与;&& 逻辑与; 或:| 按位或;|| 逻辑或;(或者直接叫或) 非:~ 按位非;! 逻辑非; */ endmodule