
0-24
Computer Programming with C
Example 3:
Determine the hexadecimal equivalent of (5112)
10
.
16 5112 Remainder Least Signicant Bit
16 319
8 = 8
16 19
15 = F
16 1
3 = 3
16 0
1 = 1
Most Signicant Bit
us, the hexadecimal equivalent of (5112)
10
is (13F8)
16
.
Converting Binary, Octal, and Hexadecimal to Decimal
e method used for the conversion of a binary, octal, or hexadecimal number to a decimal number
involves each digit of the binary, octal, or hexadecimal number to be multiplied by its weighted posi-
tion, and then each of the weighted values is added together to obtain the decimal number.
Example 1:
Determine the decimal equivalent of (11010)
2
.
Binary Number ...