Feedback ? Send it to admin@fullchipdesign.com or join me at fullchip@gmail.com
Binary numbers addition is straight forward, while binary subtractions involve three fundamental steps. Detailed discussions on these steps are discussed next:
Binary subtraction and add
Discussed on this page, binary 
5 Steps required to build a functional FPGA load (valid for most EDA flows)
How to implement a Integrated Clock Gating (ICG) cell from vendor library.
CMOS Digital Integrated Circuit design for VLSI.
Binary Subtraction: Suppose, M is Minuend and N is subtrahend, Then, M – N can be done based on following three steps:
Step 1: Take 2’s complement of N and add it to M.
M – N = M + (2^n – N)
Step 2: If M is greater than or equal to N then end carry is discarded from the result.
M –N = M + (2^n – N) – 2^n
Step 3: If M is less than N then take 2’s complement of the result and append negative
‘
M
Two solved examples are shown below.
Example 1 : Perform binary subtraction of two binary numbers M = 10101010 and N = 00111000
Example 2 : Perform binary subtraction of two binary numbers N = 10101010 and M = 00111000
Discard end carry from the subtraction
Answer. Binary subtraction of M and N = 01110010
1
End carry
10101010 10101010

01110010
00111000 00111000

Result = 10001110
No end carry in result
2’s complement of result = 01110010
Answer. Binary subtraction of M and N = 