Base Conversion: Assembly Language Programming by Xorpd
Base Conversion: Assembly Language Programming by Xorpd
10101112 = 1 20 + 1 21 + 1 22 + 0 23 + 1 24 + 0 25 + 1 26 =
20 + 21 + 22 + 24 + 26 =
1 + 2 + 4 + 16 + 64 = 8710
Example (Decimal to Ternary(3))
How to represent 10110 in base 3? (The ternary system).
We will use the remainder evaluation method, because 10 > 3.
This time we will divide by 3, and calculate remainder modulo 3.
101 2
33 0
11 2
3 0
1 1