Build a circuit that has two 3-bit inputs that computes
the bitwise-OR of the two vectors,
the logical-OR of the two vectors,
the inverse (NOT) of both vectors.
Place the inverse of b in the upper half of out_not (i.e., bits [5:3]), and the inverse of a in the lower half.
적힌대로 2개의 3-bit입력을 output으로 만드는 문제
Bitwise와 Logical Operators의 차이점은
단순 비트 연산과, 논리 연산 이라는 것에 차이가 있다.
module top_module(
input [2:0] a,
input [2:0] b,
output [2:0] out_or_bitwise,
output out_or_logical,
output [5:0] out_not
);
assign out_or_bitwise = a | b;
assign out_or_logical = a || b;
assign out_not = {~b, ~a};
endmodule