Arithmetic Logic Unit(ALU)
# Arithmetic Logic Unit(산술 논리 장치)는 두 숫자의 산술연산과 논리 연산 등을 계산하는 디지털 회로이다. opcode에 따라 다른 연산을 수행한다. 8 가지 연산의 결과를 8 to 1 Multiplexer을 통해 한가지 결과만 출력한다. module alu4(a,b,op,result,c,n,z,v); input [3:0] a,b; input [2:0] op; output [3:0] result; output c,n,z,v; wire [3:0] w_not_a,w_not_b,w_and,w_or,w_xor,w_xnor,w_add,w_sub; wire c3_add,co_add,c3_sub,co_sub; _inv_4bits U0_inv1(.a(a),.y(w_not_a)); _inv_4bits..
더보기