How to know when the resault of subtraction is incorrect in a 4 bit binary subtraction circuit? [closed] This is an image of a binary subtractor for unsigned numbers. Some times the output of binary subtraction is not correct and needs to be complemented to give the correct answer, how can I find out when those times are?

closed as off-topic by Marcus Müller, evildemonic, Voltage Spike, Finbarr, Dave Tweed♦May 21 at 18:06

• This question does not appear to be about electronics design within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• what about trying out all inputs? Alternatively, you could just write down the boolean equation that models this circuit, and try to figure out from that, by comparing to the boolean equation describing subtraction. (I'd recommend the latter) – Marcus Müller May 19 at 16:35
• I'm voting to close this question as off-topic because this is a homework / learning material question without any own attempt. – Marcus Müller May 19 at 16:36
• write out the equations: [ N + (the complemented M) = N - M + error ], and determine how to detect the error. – analogsystemsrf May 19 at 17:04

If you don't have access to the carries then you will need to brute-force compare the magnitudes of the numbers. When computing $$\A-B\$$ the result will be incorrect if $$\B > A\$$