Decimal system: Let’s now analyze the subtraction of decimal systems. For subtraction we first subtract the least significant digit of subtrahend from that of minuend and if least significant digit of subtrahend is greater than that of minuend then we take borrow from the next digit of minuend and add 10 (base) to the previous digit and then subtract and similarly we proceed further.
Binary system:
There are 4 cases of subtraction of bit by bit:
Subtraction borrow
0 + 0 = 0 0
1 + 0 = 1 0
0 + 1 = 1 1
1 + 1 = 0 0
Let’s now we do subtraction in binary
Octal system: Let’s now apply the same procedure for the octal system
Hexadecimal: We can apply the same rule to this numbering system also