Inputs:
- Number of bits (w)
- 2 two's complement binary numbers (display decimal representation)
- Arithmetic Operation (+, -, x, /)
Outputs:
- Calculated Result (display decimal representation)
- Truncated Result (display decimal representation)
Here we do a 4 bit addition of 2 + 1
$ ./run.sh 4 + 0010 0001
Output:
The resulting sum gives the calculated number, calculated decimal, truncated number, truncated decimal representations respectively.
$ 00011,3,0011,3