Binary Subtraction




Binary Subtraction

Binary subtraction is one of the four binary operations, where we perform the subtraction method for two binary numbers (comprising of only two digits, 0 and 1). This operation is similar to the basic arithmetic subtraction performed on decimal numbers in Maths. Hence, when we subtract 1 from 0, we need to borrow 1 from the next higher order digit, to reduce the digit by 1 and the remainder left here is also 1.

The principles of decimal subtraction hold good for substraction of numbers in other number systems. It consists of two steps, repeated for each column of the numbers. The first step is to determine of it is necessary to borrow. If the subtrahend (the lower digit) is larger than the minued (the upper digit), it is necessary to borrow from the column to the left. It is important to note here that the value borrowed depends upon the base of the number system and is always the decimal equivalent of the base. Hence, in decimal 10 is borrowed, in binary 2 is borrowed, in octal 8 is borrowed, and in hexadecimal 16 is borrowed. The second step is simply to subtract the lower value from the upper value. The complete table for binary subtraction is as follows:-

0-0=0
	0-1=1 with a borrow from the next column
	1-0=1
	1-1=0

Observe that the only case in which it is necessary to borrow is when we subtract 1 from 0.