Annoying octal notation
Grant Edwards
invalid at invalid
Sat Aug 29 08:21:11 EDT 2009
On 2009-08-28, Neil Hodgson <nyamatongwe+thunder at gmail.com> wrote:
> Steven D'Aprano:
>
>> Obviously I can't speak for Ken Thompson's motivation in creating this
>> feature, but I'm pretty sure it wasn't to save typing or space on
>> punchcards.
>
> The original implementation of UNIX was on a PDP-7 which was an
> 18-bit machine. Octal = 3 bits at a a time which evenly divides an
> 18-bit word whereas the 4 bits of hexadecimal do not. Early
> implementations of B were (according to Wikipedia) on the PDP-7, PDP-11
> (a 16-bit machine) and Honeywell 36-bit mainframes.
>
> Octal was widely used on the PDP-11.
The PDP-11's 16-bit instruction word consisted mainly of 3-bit
fields for destiation-mode, destination-register, source-mode,
source-register. So, it was quite easy for the progammer to
read/write machine code in octal.
--
Grant Edwards grante Yow! I've read SEVEN
at MILLION books!!
visi.com
More information about the Python-list
mailing list