Guest
#4288214
How do I convert inputs into two complement and perform alu operation on those input to produce a o/p which should also be in two's complement? The question which I came across is A module has three inputs: two 32-bit signed numbers represented in 2'c complement format (A & B) and a 2-bit control (CTRL). It produces four outputs: a 32-bit result (R), an overflow flag (O), a sign flag (N), and a Zero flag (Z). The result should be in 2's complement format as well. I am struck in 2'c complement part. any ideas?