The following technique is used to convert any number system to its equivalent decimal number.
Technique
- Multiply each bit by Xn, where ‘X’ is the base and ‘n’ is the “weight” of the bit
- Add all the results to get the final decimal number
Examples
1010112 = 1×25 + 0x24 + 1×23 + 0x22 + 1×21 + 1×20 = 32 + 0 + 8 + 0 + 2 + 1 = 4310
7248 = 7×82 + 2×81 + 4×80 = 7×64 + 2×8 + 4×1 = 448 + 16 + 4 = 46810
ABC16 = Ax162 +Bx161 +Cx160 = 10×256 + 11×16 + 12×1 = 2560 + 176 + 12 = 274810