Question: Write a code in VHDL for a 4 - bit ALU with the external interface as shown in the following figure, Where: Inputs are: o

Write a code in VHDL for a 4-bit ALU with the external interface as shown in the following figure, Where:
Inputs are:
o Two 4-bit two's complement operands (A , B)
o A 3-bit control signal (Op)
Outputs are:
o A 4-bit two's complement result (R)
o Z status flag (set when ALU result is zero)
o N status flag (set when ALU result is negative)
o Overflow flag (set when ALU result is wrong)
The ALU's supported operations table is:
Op2 Op1 Op0 R Operation
0000 clear
001 A + B add/subtract
010 B +1 Increment
011 A | B or
101 A & B and
110 ~ B bitwise complement
111 A transfer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!