• Home
  • /
  • Blog
  • /
  • Addition and Subtraction of Binary Numbers

Addition and Subtraction of Binary Numbers

Addition-and-Subtraction-of-Binary-Numbers

This post is also available in: हिन्दी (Hindi) العربية (Arabic)

The computers understand only the language of 0s and 1s, i.e., binary numbers. In computers, the numbers such as 234 or 837 all are represented in a series of 0s and 1s. In this article, let’s take a look at the addition and subtraction of binary numbers. That’s how the numbers (in binary form) are added and subtracted by the computers.

Addition and Subtraction of Binary Numbers

Addition and subtraction are two basic arithmetic operations. In fact, other operations in mathematics can be derived from these two basic operations. Let’s understand how these two operations are performed on binary numbers.

Addition of Binary Numbers

Binary addition follows the following four basic rules –

0 + 0 = 0

0 + 1 = 1

1 + 0 = 1

1 + 1 = 0 (1 carried forward)

For example, 14 + 12

14 in binary is 1110 and 12 in binary is 1100.

addition and subtraction of binary numbers

1110 + 1100 = 11010 (which is 26 in decimal number system).

Subtraction of Binary Numbers

Now, let’s see how subtraction is performed. The following process is used in the case of subtraction.

2’s complement of a number to be subtracted is obtained which is then added to the other number.

For example, 14 – 12.

14 in binary is 1110 and 12 in binary is 1100. Using a 8-bit format 14 in binary is 00001110 and 12 in binary is 00001100.

To find 2’s complement of a number, first of all, 1’s complement is computed and then 1 is added to 1’s complement to get 2’s complement of a number.

1’s complement is obtained by interchanging 0 with 1 and 1 with 0 in a number.

1’s complement of 00001100 is 11110011.

Therefore, 2’s complement of 11110011 is 11110011 + 00000001 = 11110100.

addition and subtraction of binary numbers

1110 + 0100 = 100000010 (Leftmost 1 is discarded, since only 8 digits are accommodated in a byte). The final answer is 00000010  

So, 14 – 12 in binary is 00000010 which is 2 in decimal number system. You can practice few more such problems here.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>