I'm making n-bit ALU in scheme and I have a 1-bit ALU so far. Can someone tell me how to approach this problem? Here are the instructions for it:
The format of the procedure is
(ALUn selection x1 x2 n)
where the first parameter,
selection
can take any of the values:'add
,'sub
,'and
,'or
, or'xor
. The second and third parametersx1
andx2
are two n-bit binary numbers in list format.