Converting between binary, decimal, hexadecimal, octal

Terry Reedy tjreedy at udel.edu
Mon Sep 15 20:29:13 CEST 2008


A. Joseph wrote:
> Converting between binary, decimal, hexadecimal, octal
> Where can I find good tutorial on numbering system?

These are number representation systems that can be applied to or used 
with integral, rational (numberator,denominator), and 'point' numbers.

Try Wikipedia or any search engine.

 > I really want to know the process of converting between all the numbers.
 > I may soon start HLA (assemply).

There are standard algorithms for converting between representations.
See above.  Good programmer calculators have these built in.

If you want to use the Python interactive interpreter, check the docs 
for the various integer literals and the hex, oct, and bin functions.
Binary literals and bin are only available in 2.6 (I believe) and 3.0 
(for sure).

tjr





More information about the Python-list mailing list