The result of binary subtraction between 1001 and 101 is :

The result of binary subtraction between 1001 and 101 is :

1011
1001
001
100
This question was previously asked in
UPSC CISF-AC-EXE – 2022
To subtract 101 (binary) from 1001 (binary), we perform binary subtraction:
1001 (which is 9 in decimal)
– 0101 (which is 5 in decimal, added a leading zero for alignment)
——-
Starting from the rightmost bit:
1 – 1 = 0
0 – 0 = 0
0 – 1: Cannot subtract. Borrow from the leftmost digit (1). The leftmost 1 becomes 0. The borrowed 1 moves to the left, making the next position 2 (in base 2). So, we have 2 – 1 = 1.
The leftmost digit is now 0.
Result: 0100 (binary), which is 100 (binary) when the leading zero is dropped.
100 (binary) is 1*2^2 + 0*2^1 + 0*2^0 = 4 (decimal). 9 – 5 = 4.
Binary subtraction follows similar principles to decimal subtraction, using borrowing when a smaller digit is being subtracted from a larger one.
Binary arithmetic is fundamental in digital electronics and computer science. Subtraction can also be performed using two’s complement representation and binary addition. In this case, direct subtraction is straightforward.