Design a circuit that performs the addition or subtraction of two 4-bit numbers.
The result (mod 16) must be represented in 4 bits also.
The circuit has an input (op) that indicates which operation must
be performed (0 for addition, 1 for subtraction).
Specification
module add_sub4(a, b, op, result); input [3:0] a, b; input op; output [3:0] result;
Input
Output