Binary Arithmetic


Digital Electronics – Binary Arithmetic



”;


Binary arithmetic is one of the fundamental concepts in the field of digital electronics and computer engineering. It is basically the mathematics of binary numbers allow to perform various arithmetic operations on binary numbers. We know that the binary number system has two digits, i.e., 0 and 1 which are used to represent the ON or OFF states of the digital systems. Hence, binary arithmetic forms the foundation of the digital computing.

In this chapter, we will discuss the following four main binary arithmetic operations −

  • Binary Addition
  • Binary Subtraction
  • Binary Multiplication
  • Binary Division

Let’s discuss each of these binary arithmetic operations in detail along with solved examples.

Binary Addition

In binary arithmetic, the process of adding two binary numbers is called binary addition. Where, the binary numbers consist of only 0 and 1. In the binary addition, a carry is generated when the sum is greater than 1.

Rules of Binary Addition

The addition of two binary numbers is performed according to these rules of binary arithmetic −

  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 10 (Sum = 0 & Carry = 1)

Let us consider some examples to understand the binary addition.

Example 1

Add two binary numbers, 1101 and 1110.

Solution

The binary addition of the given binary numbers is described below −


Binary Addition

Explanation

Add 1 (rightmost bit of first number) and 0 (rightmost bit of the second number). It gives 1 + 0 = 1 (thus, write down 1 as sum bit).

Add 0 (second rightmost bit of first number) and 1 (second rightmost bit of the second number). It gives 0 + 1 = 1 (write down 1 as sum bit).

Add 1 (third rightmost bit of first number) and 1 (third rightmost bit of second number). It gives 1 + 1 = 10 (write down 0 as sum and 1 as carry).

Add 1 (leftmost bit of the first number), 1 (leftmost bit of second number) and 1 (carry). It gives 1 + 1 + 1 = 11 (write down 1 as sum and 1 as carry).

Write the end around carry 1 in the sum.

Thus, the result is 11011.

Example 2

Add 1010 and 11011.

Solution

The binary addition of given numbers is explained below −


Binary Addition Numbers

Explanation

Add 0 (rightmost bit of first number) and 1 (rightmost bit of second number). It gives 0 + 1 = 1 (write down 1 as sum).

Add 1 (second rightmost bit of first number) and 1 (second rightmost bit of second number). It gives 1 + 1 = 10 (write down 0 as sum and 1 as carry).

Add 0 (third rightmost bit of first number), 0 (third rightmost bit of second number), and 1 (carry). It gives 0 + 0 + 1 = 1 (write down 1 as sum).

Add 1 (leftmost bit of first number) and 1 (second leftmost bit of second number). It gives 1 + 1 = 10 (write down 0 as sum and 1 as carry).

Add 1 (leftmost bit of second number) and 1 carry. It gives 1 + 1 = 10 (write down 0 as sum and 1 as the end around carry).

Hence, the sum of 1010 and 11011 is 100101.

Binary Subtraction

In binary arithmetic, binary subtraction is a mathematical operation used to find the difference between two binary numbers.

In binary subtraction, each bit of the binary numbers is subtracted, starting from the rightmost bit.

Also, a borrow bit can be taken from higher bits if require.

Rules of Binary Subtraction

The binary subtraction is performed as per the following rules of binary arithmetic −

  • 0 – 0 = 0
  • 1 – 0 = 1
  • 0 – 1 = 1 (borrow 1 from the next higher bit)
  • 1 – 1 = 0

Let us see some examples to understand the binary subtraction.

Example 1

Subtract 1100 from 1101.

Solution

The subtraction of given binary numbers is given below −

1101 – 1100 = 0001


Binary Subtraction

Explanation

Subtract 0 (rightmost bit of second number) from 1 (rightmost bit of first number). It gives 1 – 0 = 1 (write down 1 as difference).

Subtract 0 (second rightmost bit of second number) from 0 (second rightmost bit of first number). It gives 0 – 0 = 0 as result.

Subtract 1 (third rightmost bit of second number) from 1 (third rightmost bit of first number). It gives 1 – 1 = 0 as result.

Subtract 1 (leftmost bit of second number) from 1 (leftmost bit of first number). It gives 1 – 1 = 0 as result.

Thus, the difference of 1101 and 1100 is 0001.

Example 2

Subtract 101 from 1111.

Solution

The subtraction of given binary numbers is explained below −


Binary Subtraction Numbers

Explanation

Subtract rightmost bits: 1 – 1 = 0

Subtract second rightmost bits: 1 – 1 = 1

Subtract third rightmost bits: 1 – 1 = 0

Subtract leftmost bits: 1 – 0 = 1

Thus, the result is 1010.

Example 3

Subtract 1011 from 1101.

Solution

The binary subtraction of 1101 and 1011 is given below −


Binary Subtraction Numbers

Explanation

Subtract rightmost bits: 1 – 1 = 0.

Subtract second rightmost bits: 0 – 1 = 1. A borrow 1 is taken from the next higher bit.

Subtract third rightmost bits: 0 – 0 = 0. The 1 borrow is given to previous bit.

Subtract leftmost bits: 1 – 1 = 0.

Thus, the difference of 1101 and 1011 is 0010.

Binary Multiplication

In binary arithmetic, binary multiplication is the process of multiplying two binary numbers and obtain their product.

In binary multiplication, we multiply each bit of one binary number by each bit of another binary number and then add the partial products to obtain the final product.

Rules of Binary Multiplication

The multiplication of two binary numbers is performed as per the following rules of binary arithmetic −

  • 0 × 0 = 0
  • 0 × 1 = 0
  • 1 × 0 = 0
  • 1 × 1 = 1

It is clear that the binary multiplication is similar to the decimal multiplication. Let us understand the binary multiplication with the help of solved examples.

Example 1

Multiply 1101 and 11.

Solution

The binary multiplication of given numbers is described below −


Binary Multiplication

Explanation

Multiply the rightmost bit of the second number, 1 by each bit of the first number (1101).

Now, shift the partial product one position to the left to perform the next multiplication.

Multiply the leftmost bit of the second number, 1 by each bit of the first number (1101).

Finally, sum up all the partial products to obtain the final product.

Hence, the product of 1101 and 11 is 100111.

Example 2

Multiply 11011 and 110.

Solution

The multiplication of given binary numbers is demonstrated below −


Binary Multiplication Numbers

Explanation

Multiply rightmost bit of the second number (0) by each bit of the first binary number (11011).

Shift the partial product one position to the left.

Multiply the second rightmost bit of the second number (1) by each bit of the first binary number (11011).

Again, shift the partial product one position to the left.

Multiply the leftmost bit of the second number (1) by each bit of the first number.

Then, sum up all the partial products to obtain the final product.

Hence, the product of 11011 and 110 is 10100010.

Binary Division

Binary division is one of the basic arithmetic operations used to find the quotient and remainder when dividing one binary number by another.

Rules of Binary Division

The following rules of binary arithmetic are utilized while diving one binary number by another −

  • 0 ÷ 0 = Undefined
  • 0 ÷ 1 = 0 with remainder = 0
  • 1 ÷ 0 = Undefined
  • 1 ÷ 1 = 1 with remainder = 0

Binary Division Procedure

  • Start dividing from the leftmost bits of the dividend by the divisor.
  • Multiply the quotient obtained by the divisor and subtract from the dividend.
  • Bring down the next bits of the dividend and repeat the division process until all the bits of given divided are used.

Let us consider some solved examples to understand the binary division.

Example 1

Divide 110011 by 11.

Solution

The division of the given binary numbers is explained below −

110011 ÷ 11 = 10001


Binary Division

In this example of binary division, the quotient obtained is 10001 and the remainder is 0.

Example 2

Divide 11011 by 10.

Solution

The binary division of 11011 by 10 is explained below −

11011 ÷ 10 = 1101


Binary Division Numbers

In this example, the quotient is 1101 and the remainder is 1.

Conclusion

Binary arithmetic involves arithmetic operations performed on binary numbers. In general, the four basic arithmetic operations namely addition, subtraction, multiplication, and division are performed on binary numbers.

In this chapter, we explained the rules and procedure to perform all the four basic binary arithmetic operations along with solved examples.

Advertisements

”;

Leave a Reply

Your email address will not be published. Required fields are marked *