*************** Numeral Systems *************** .. tags:: tiny, math We’re used to counting in the decimal numeral system, which uses 10 digits: 0 through 9. This system likely developed because humans counted on their fingers, and most people have 10 fingers. But other number systems exist. Computers make use of binary, a numeral system with only two digits, 0 and 1. Programmers also sometimes use hexadecimal, which is a base-16 numeral system that uses the digits 0 to 9 but also extends into the letters A to F. We can represent any number in any numeral system, and this program displays a range of numbers in decimal, binary, and hexadecimal. .. collapse:: numeral_systems.py .. literalinclude:: numeral_systems.py :language: python :linenos: https://inventwithpython.com/bigbookpython/project52.html