Рет қаралды 54,494
4-bit binary adder circuit can be reused to perform 4-bit binary subtraction. For that purpose, we take 2's complement of the subtrahend and add with the minuend.
The addition and subtraction of signed numbers can cause an overflow. The overflow can be from the upper limit or lower limit. An overflow can be detected by checking the last and second last carry bits. If both bits are same then no overflow happened and if both carry bits are different then overflow happened.