The result of binary subtraction between 1001 and 101 is :
1011
1001
001
100
Answer is Wrong!
Answer is Right!
This question was previously asked in
UPSC CISF-AC-EXE – 2022
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.