[Tutor] String Replace..... [octal numbers]

Jörg Wölke lumbricus@gmx.net
Mon, 29 Jan 2001 23:46:25 +0100 (MET)


> The PDP computers that Unix was born on used octal 
> for representing binary data. So Unix did the same. 
> C was built to write Unix so used the same convention. 
> Python is written in C and so followed C I guess.
> 
> Accidents of history are all around. :-)
> 
> Alan g
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor

There's a practical reason:
octal and hexadecimal numbers are easily translated to binary numbers
and vice versa.
you take your binary number, take four (hexa)/three(octal) digits
and translate them and you get the right hexa/octal number right away.
cuz computers can handle bin-nums for technical reasons only,
it is easyer to take hex or oct nums instead of decimals.
right?
greets jö!

-- 
Sent through GMX FreeMail - http://www.gmx.net