Introduction to DLD

Binary Subtraction

Binary subtraction is a fundamental arithmetic binary operation in the binary number system. It involves subtracting binary digits (0 and 1) to produce a binary result. Computers use binary subtraction to perform calculations using digital circuits.

Binary Subtraction Rules

There are four basic binary subtraction rules:

Binary Subtraction - Rules

Let’s explain the binary subtraction rules.

  • 0 − 0 = 0: Subtracting zero from zero gives zero.
  • 0 − 1 = 1 (Borrow 1): Subtracting one from zero requires borrowing one from the next column.
  • 1 − 0 = 1: Subtracting zero from one gives one.
  • 1 − 1 = 0: Subtracting one from one gives zero.

Binary Subtraction Examples

There are 3 major categories of binary subtraction.

Binary Subtraction Examples

Let’s explain binary subtraction examples of each type.

1. Binary Subtraction without Borrow Examples

Binary subtraction without borrow occurs when each binary digit in the minuend is greater than or equal to the corresponding digit in the subtrahend, so no borrowing is required.

Example 1 – Binary Subtraction without Borrow

Binary subtraction of 11111100-11110000  is shown in the following diagram.

Binary Subtraction without Borrow - Example 01

According to the above diagram

  • First Bit (LSB): 0 − 0 = 0
  • Second Bit: 0 − 0 = 0
  • Third Bit: 1 − 0 = 1
  • 4th Bit: 1 − 0 = 1
  • 5th Bit: 1 − 1 = 0
  • 6th Bit: 1 − 1 = 0
  • 7th Bit: 1 − 1 = 0
  • 8th Bit (MSB): 1 − 1 = 0

Result in Binary: 11111100₂ -11110000₂ = 00001100₂

Example 2 – Binary Subtraction without Borrow

Binary subtraction of 11111000-11100000  is shown in the following diagram.

Binary Subtraction without Borrow - Example 02

According to the above diagram:

  • First Bit (LSB): 0 − 0 = 0
  • Second Bit: 0 − 0 = 0
  • Third Bit: 0 − 0 = 0
  • 4th Bit: 1 − 0 = 1
  • 5th Bit: 1 − 0 = 1
  • 6th Bit: 1 − 1 = 0
  • 7th Bit: 1 − 1 = 0
  • 8th Bit (MSB): 1 − 1 = 0

Result in Binary: 11111000₂ − 11100000₂ = 00011000₂

2. Binary Subtraction with Borrow Examples

Binary subtraction with borrow occurs when a binary digit 1 must be subtracted from 0. In this case, we borrow from the next available column on the left.

Example 1 – Binary Subtraction with Borrow

The following diagram shows binary subtraction 1101 – 1011 with borrowing.

Binary Subtraction With Borrow - Example 01

According to the above diagram:

  • First Bit (LSB): 1 − 1 = 0
  • Second Bit: 0 − 1 = 1 (Borrow 1 from the third bit, making 10 − 1 = 1)
  • Third Bit: 0 − 0 = 0 (After borrowing, the third bit becomes 0)
  • Fourth Bit (MSB): 1 − 1 = 0

Result in Binary: 1101₂ − 1011₂ = 0010₂

Example 2 – Binary Subtraction with Borrow

The following diagram shows binary subtraction 11101 – 10111 with borrowing.

Binary Subtraction With Borrow - Example 02

According to the above diagram:

  • First Bit (LSB): 1 − 1 = 0
  • Second Bit: 0 − 1 = 1 (Borrow 1 from the third bit, making 10 − 1 = 1).
  • Third Bit: After borrowing, 0 − 1 requires borrowing from the fourth bit, making 10 − 1 = 1.
  • Fourth Bit: After borrowing, 0 − 0 = 0.
  • Fifth Bit (MSB): 1 − 1 = 0.

Result in Binary: 11101₂ − 10111₂ = 00110₂

Example 3 – Binary Subtraction with Borrow

The following diagram shows binary subtraction 11001₂ − 01111₂  with borrowing.

Binary Subtraction With Borrow - Example 03

Example 4 – Binary Subtraction with Borrow

The following diagram shows binary subtraction 11001010₂ − 10011011₂  with borrowing.

Binary Subtraction With Borrow - Example 4

3. Binary Subtraction with Fractions

Binary subtraction with fractions involves subtracting binary numbers that contain fractional parts separated by a binary point. The binary points must be aligned before subtracting the numbers. Binary subtraction is performed from right to left, just like decimal subtraction.

Binary Subtraction with Fractions – Example

The following diagram shows the binary subtraction of the fraction. Let’s solve 110.1010 − 100.1011.

Binary Subtraction With Fraction - Example

Binary Subtraction Summary Table

Here are simple binary subtraction examples covering different types, including subtraction without borrowing, subtraction with borrowing, and binary fractions.

Binary Subtraction Example Example Type Decimal Subtraction
101101 − 010010 = 011011 Without Borrow 45 − 18 = 27
1100101 − 0011010 = 1001011 Without Borrow 101 − 26 = 75
10110110 − 01001001 = 01101101 Without Borrow 182 − 73 = 109
101101 − 011011 = 010010 With Borrow 45 − 27 = 18
1101101 − 1011011 = 0010010 With Borrow 109 − 91 = 18
10110110 − 01101101 = 01001001 With Borrow 182 − 109 = 73
1011.101 − 110.011 = 0101.010 Fraction 11.625 − 6.375 = 5.25
1101.101 − 101.111 = 0111.110 Fraction 13.625 − 5.875 = 7.75
10110.1101 − 1101.1011 = 01001.0010 Fraction 22.8125 − 13.6875 = 9.125
110101.101 − 10111.011 = 001110.010 Fraction 53.625 − 23.375 = 30.25

Binary Fraction to Decimal :Hint

Binary fractions use place values similar to decimal fractions, but the digits after the binary point represent negative powers of 2, such as 1/2, 1/4, 1/8, and so on. Understanding these place values helps you verify binary subtraction involving fractional numbers.

The following diagram shows the example of binary fraction to decimal conversion

Binary Fraction to Decimal