B0 – 1 = AF in hexadecimal system?
Hello,
Why does the result here look like AF? And how do you calculate in hexadecimal when the minuend (here: 0) is smaller than the subtrahend (here: 1)? I only get A0. I would appreciate a simple explanation.
Hello,
Why does the result here look like AF? And how do you calculate in hexadecimal when the minuend (here: 0) is smaller than the subtrahend (here: 1)? I only get A0. I would appreciate a simple explanation.
For comparison: How would you calculate, for example, 70 – 1 in the decimal system? You would say: I can't subtract 1 from the 0 in the ones place, so I'll get something from the tens place. The tens place is reduced by 1 (from 7 to 6), but you then have 10 in the ones place, from which you can subtract 1, resulting in a 9 (the largest digit in the decimal system). The result: 69.
And that's basically how it works here too. You take something from the 16th place. Accordingly, the 16th place is deducted by 1, so that you now have A₁₆ instead of B₁₆. In return, you now have 16₁₀ more in the ones place, and you can calculate 16₁₀ – 1₁₀ = 15₁₀. For the value 15₁₀ in hexadecimal, you write F₁₆ (the largest digit in the hexadecimal system). Result: B0₁₆ – 1₁₆ = AF₁₆.
[The subscripts are for clarity only, as I switched to the decimal system at some point during my explanation, which is indicated by “₁₀”.]
You can proceed in the same way as in the decimal system. You can subtract by hand, but you have to remember the carryovers. The only difference is that the base is 16.
First the one:
Since 0 is less than 1, you calculate 10 – 1 instead (in the hexadecimal system)
You then get F and a carry, since you added the ten.
Now the sixteenth:
Since you still have a carryover from the one, you need to calculate B – 1. That's A.
So the final result is AF.
The minuend here is B0.
If you use the decimal system
90 – 1
If you calculate, you get 89 and not 80, because 89 + 1 = 90.
In the hexadecimal system,
B0 – 1
just AF out because AF + 1 = B0.
In the hexadecimal system you don't have the normal digits 0-9 but also the letters AF, like this: 0 1 2 3 4 5 6 7 8 9 ABCDE F.