Two-bit equality (Mt2015 eq2)

2023. 6. 12. 15:15FPGA/HDLBits

728x90

Problem Statement

Taken from 2015 midterm question 1k

Create a circuit that has two 2-bit inputs A[1:0] and B[1:0], and produces an output z. The value of z should be 1 if A = B, otherwise z should be 0.

module top_module ( input [1:0] A, input [1:0] B, output z ); 
    assign z = (A == B) ?  1'b1 : 1'b0 ;
endmodule

'FPGA > HDLBits' 카테고리의 다른 글

Simple circuit B (Mt2015 q4b)  (0) 2023.06.12
Simple circuit A (Mt2015 q4a)  (0) 2023.06.12
Truthtable1  (0) 2023.06.12
7420  (0) 2023.06.12
More logic gates (Gates)  (0) 2023.06.12