Subtracting Binary Numbers
We want to subtract 1 from 10, both represented in base 2 (binary).
Step 1: Line Up the Numbers
First, we write down the two numbers so that they are aligned from the right. This makes it easier to subtract.
10 (in base 2) - 1 (in base 2)
Step 2: Subtract the Rightmost Digits
We start by subtracting the rightmost digits (also known as bits in binary). In this case, that’s 0 from the first number and 1 from the second number.
Since 0 is smaller than 1, we need to borrow 1 from the next left digit (which is 1 in the first number).
Step 3: Perform the Borrow
After borrowing, the rightmost digit of the first number becomes 2 (in base 2, borrowing adds a ‘1’ to the rightmost digit and subtracts ‘1’ from the next left digit).
10 (becomes 01 after borrowing) - 1 ----- 1 (in base 2)
Final Result
The result of subtracting 1 from 10 in base 2 is 1 in base 2.