3 ms·
Tar was in Unix very early on. The first versions of Unix were IIRC written for a PDP-8 and later ported to a PDP-11. Most of the PDP era DEC machines are desi
by st_goliath 6y ago
Tar was in Unix very early on. The first versions of Unix were IIRC written for a PDP-8 and later ported to a PDP-11.
Most of the PDP era DEC machines are designed favoring an octal encoding. The PDP-8 was a 12 bit machine (12=4 * 3). They also had few 18 (=6 * 3) and 36 bit (=12 * 3) machines.
The PDP-11 being a 16 bit machine with 8 bit granular memory access was an odd man out, but still had many aspects designed around splitting words into groups of 3 bits, e.g. if you look at the instruction set encoding. Or just take a look at the front panel[1].
Because of the DEC machines that early Unix was developed on (and the people involved in early Unix development being very familiar with them), octal encoding crept into many places where it stayed until today, including the C programing language and some Unix specific file formats.
Using octal, stored as plain text ASCII makes it very easy for a human to debug, for whom reading octal is second hand nature.
[1] https://en.wikipedia.org/wiki/File:Pdp-11-70-panel.jpg https://en.wikipedia.org/wiki/File:Pdp-11-70-panel.jpg
- xurukefi 6y agoVery interesting, thx!