본문 바로가기

Verilog/HDLbits

[HDLBits] Kmap4

1. 문제 및 설명

  •  아래 카르노 맵에 의해 정의된 회로를 구현하시오

문제 풀이

 입력 a,b,c,d에 대해서 홀수개의 입력이 1일 때 1이 출력됨을 확인할 수 있다. 따라서 4개의 입력을 모두 XOR 취하면 위의 회로를 구할 수 있다.

 

 

2. 모듈 정의

module top_module(
    input a,
    input b,
    input c,
    input d,
    output out  );

 

 

 

3. 답

module top_module(
    input a,
    input b,
    input c,
    input d,
    output out  ); 
    
    assign out  = a^b^c^d;

endmodule

'Verilog > HDLbits' 카테고리의 다른 글

[HDLBits] Exams/m2014 q3  (0) 2025.12.16
[HDLBits] Exams/ece241 2013 q2  (0) 2025.12.16
[HDLBits] Kmap3  (0) 2025.12.15
[HDLBits] Kmap2  (0) 2025.12.10
[HDLBits] Kmap1  (0) 2025.12.10