- Binary Subtraction Definition: Binary subtraction is the process of subtracting binary numbers, similar to decimal subtraction but using only the digits 0 and 1.
- Basic Rules: Binary subtraction follows simple rules: 0-0=0, 1-0=1, 1-1=0, and 0-1=1 with a borrow.
- Importance in Electronics: Binary subtraction is crucial in digital electronics for various calculations and operations.
- Borrowing in Binary: When subtracting 1 from 0, you need to borrow from the next significant bit, changing the dynamic of the calculation.
- Worked Example: Detailed step-by-step examples, like subtracting 1010100 from 10101100, help illustrate the process.
How to Subtract Binary Numbers
Binary subtraction uses place values and borrowing in the same way as decimal subtraction, with each digit limited to 0 or 1. Together with binary addition, it forms part of binary arithmetic and is implemented by circuits in digital electronics. This guide follows an unsigned example from the least significant bit to the most significant bit.
Addition and subtraction are two of the four basic arithmetic operations. The other two are binary multiplication and binary division.
The four two-bit subtraction cases are 0 – 0 = 0, 1 – 0 = 1, 1 – 1 = 0, and 0 – 1 requires a borrow from the next column. Borrowing one binary place contributes 10 in base 2 to the current column, so 10 – 1 = 1.
The binary number system uses only 0 and 1. Start at the right, subtract the bottom bit and any borrow-in from the top bit, then pass a borrow left when the current top value is too small.
The following unsigned example shows two separate borrows.
Let A = 10101100 and B = 01010100 after adding a leading zero so both operands have eight bits. In decimal, A is 172 and B is 84. The expected difference A – B is therefore 88, or 01011000 in eight-bit binary.
Align the binary points and apply the subtraction rules from right to left.
In the least significant column, 0 – 0 = 0, so write 0 with no borrow.
The second column also gives 0 – 0 = 0.
The third column gives 1 – 1 = 0.
The fourth column gives 1 – 0 = 1.
In the fifth column, 0 cannot subtract 1 without borrowing. Borrow 1 from the sixth column, making the current top value 10 in base 2. Then 10 – 1 = 1, and the borrowed-from bit changes from 1 to 0.
Because the previous step reduced the sixth-column top bit to 0, that column gives 0 – 0 = 0.
The seventh column again needs a borrow: 10 – 1 = 1, and the eighth-column top bit falls from 1 to 0. The eighth column then gives 0 – 0 = 0. The final binary subtraction result is 01011000. Adding the result to B confirms the calculation: 01011000 + 01010100 = 10101100. Digital hardware commonly performs subtraction as addition of the fixed-width two’s complement of B.





