I want to design a gate-level combinational circuit that implements the below logic. Is it possible to do it without using Adder?
...
input wire [3:0] in,
input wire sel,
output wire [3:0] out
...
assign out = ({4{sel}} & (~in + 1)) | ({4{~sel}} & in);
The above verilog code will be realized into - 4 inverters, 1 full adder and 1 multiplexer. Is it possible to optimize it further?
The idea is to incorporate sel in 2's complement logic and produce a gate circuit that consumes lesser number of gates than adder circuit. Is it really possible?