Professional Documents
Culture Documents
5 - Python - Number System
5 - Python - Number System
System
CSIR12 Introduction to computer Programming
NIT Trichy
Binary, octal, hexadecimal numbers
• The decimal system is the most widely used number system.
However, computers only understand binary.
• Binary, octal and hexadecimal number systems are closely related.
! ! ! ! !
1x +0x +0x +1x +1x
"! "" "# "$ "%
= 0.59375
344 / 8 = 43 remainder = 0
43 / 8 = 5 remainder = 3
5 / 8 = 0 remainder = 5
344 / 16 = 21 remainder = 8
21 / 16 = 1 remainder = 5
1 / 16 = 0 remainder = 1
910 / 16 = 56 remainder = 14 or E
56 / 16 = 3 remainder = 8
3 / 16 = 0 remainder = 3