I am suppose to design a carry look ahead adder with …
Input flag bits
- E (Enable)
- S (Subtraction)
Output
- The usual sum & carry out
- O (Overflow)
- N (Negative)
- Z (Zero)
But the question is vague … It says if
- E = 0, S = 1, do subtraction
- E = 0, S = 0, do addition
- then if E = 1? What do I do? What do usual circuits do? I suppose if 0 is enable, 1 is disable, then I put all outputs 0?
-
For overflow bit, I suppose the below, where \$C_{in}, C_{out}\$ are carry in/out of MSB/Sign Bit and \$S\$ is subtract bit. The 1st half checks if Cin is different from Cout (of MSB), when doing subtraction. And the 2nd half checks if theres a carry out when doing addition. Is my implementation correct?
-
For negative bit I also check if doing subtraction using \$S \cdot MSB\$?
Best Answer
Ask your professor if the question is vague. But your assumption that E=1 means disable is probably correct.