Department of Computer Scien
ce and Information Engineering
National Cheng Kung University, TAIWAN
HANEL
NUMBERING AND CODING SYSTEMSConverting from Binary to Decimal
Know the weight of each bit in a binary numberAdd them together to get its decimal equivalentEx. Convert 11001Use the concept of weight to convert a decimal number to a binary directly
to decimal 2
Weight:
(^42)
(^32)
(^22)
(^12)
(^02)
Digits: 11001Sum:
16 +8 +0 +0 +1 = 25
10
Ex. Convert 39
to binary 10
32 + 0 + 0 + 4 + 2 + 1 = 39 Therefore, 39
= 100111 10
2