Binary subtraction is the process of subtracting binary numbers. Binary numbers include only 0 and 1. The process of binary subtraction is the same as the arithmetic operation of subtraction that we do with numbers. Since only 0 and 1 are involved here, we may sometimes need to subtract 0 from 1. In such cases, we use the concept of borrowing as we do in an arithmetic subtraction. A binary number is expressed with a base-2. For example, a binary number is written as1012
There are some rules in which binary numbers are subtracted. They are,
Decimal or base-10 numbers can be expressed as binary numbers. Binary numbers are used in computers to represent data since they understand only binary digits, 0 and 1. Let us understand how to subtract binary numbers with the example shown below.
Case i) - Binary subtraction without borrowing
Subtract 1002 from 11112 .Here number 4 is represented in binary as 1002 and number 15 is represented as 11112.
Step 1: Arrange the numbers as shown in the figure below.
Step 2: Follow the binary subtraction rules to subtract the numbers. In this subtraction, we do not encounter the subtraction of 1 from 0. Hence, the difference is 10112.
Step 3: The decimal equivalent of 10112 is 11. Hence the difference is correct.
Case ii) Binary subtraction with borrowing
Subtract 1012 from 10012. Here number 5 is represented in binary as 1012and number 9 is represented as 10012. Step 1: Arrange the numbers as shown below.
Step 2: Follow the binary subtraction rules to subtract the numbers. In this subtraction, first, let us subtract the numbers starting from the right and move to the next higher order digit. The first step is to subtract (1-1). This is equal to 0. Similarly, we move on to the next higher order digit and subtract (0 - 0), which is 0. In the next step, we have to subtract (0 - 1), so we borrow a 1 from the next higher order digit. Therefore, the result of subtracting (0 - 1) is 1.
Step 3: Therefore the dfference of 10012 and 1012 is 1002. To verify this, let us find the decimal equivalent of 1002, which is 4, Therefore, 9 - 5 = 4.
The 1's complement of a number is obtained by interchanging every 0 to 1 and every 1 to 0 in a binary number. For example, the 1's complement of the binary number 1102 is 0012. To perform binary subtraction using 1's complement, please follow the steps mentioned below.
Let us understand this with an example. Subtract 1100102 - 1001012 using 1's complement. Here the binary equivalent of 50 is 1101012 and the binary equivalent of 37 is 1001012.
Step 1: Find out the 1's complement of the subtrahend (37), which is 0110102.
Step 2: Add it with the minuend(50), which is 1100102.
Step 3: Arrange the numbers as follows and add them.
Step 4: The left-most digit 1 is a carryover of this addition. Since there is a carryover we add it with the result, which is 0011002.
Therefore, the result is 11012. Also, the difference of 50 - 37 is 13. The binary equivalent of 13 is 11012.
139 videos|82 docs|101 tests
|
|
Explore Courses for JAMB exam
|