3 ms·
Octal has advantages to be more readable when you are dealing with bits in groups of threes (or multiples), just like the decimal is advantageous when dealing w
by anyfoo 1y ago
Octal has advantages to be more readable when you are dealing with bits in groups of threes (or multiples), just like the decimal is advantageous when dealing with bits in groups of fours (or multiples).
In UNIX-like systems (and POSIX in general), POSIX permissions are in groups of threes: rwx for user, group, and others. Hence `chmod 777` means "rwx for user, group, others" (i.e. everyone can do everything), `chmod 0644` means "rw for user, r for group and others", and so on.
Before we standardize on 8 bit bytes, there were all kinds of word sizes. Some machines had 18 bit words, for example. 18 is divisible by 3, but not by 4, so octal made more sense for those at least.
- MBCook 1y agoI’ve noticed octal is common on front panels of computers, seemingly much more than nibbles.
- anyfoo 1y agoIt's interesting. My first idea was that you consciously or subconsciously have the front panels from PDPs in mind (which are very iconic), and a lot of PDP had word sizes that were either only or also divisible by 3 (like 12 or 18). Even for the PDP word sizes that were also divisible by 4, it still made sense to keep it in grouping of threes for the overall line. Looking at the equally iconic IBM s/360 front panel (a 32 bit architecture), or the IMSAI 8080 (the Intel 8080 is 8 bit), you see the bits grouped by fours. But then you have things like the Altair 8800, which is also 8080-based, and which awkwardly groups the bits in groups of 3 anyway, which does not even fit. So now I wonder how common exactly octal was even for multiple-of-4 bit machines.
- MBCook 1y agoThe Altair is probably the one I’m thinking of besides PDP series. Because I too remember that weird extra bit standing out.
- nxobject 1y agoThere's that old chestnut about how the x86 instruction format -- at least up to the 486 -- is easily hand-assembled in octal [1], and that this may be have been the legacy of a design decision made for the Datapoint 2200. [2] [1] https://news.ycombinator.com/item?id=30409100 https://news.ycombinator.com/item?id=30409100 [2] https://en.wikipedia.org/wiki/Datapoint_2200 https://en.wikipedia.org/wiki/Datapoint_2200
- madison256 1y agoI learned octal before hex. The Univac 1100/80 was my first machine. It was 36 bit words, and had circuitry to process multiple data sizes; 6, 9, 12, 18 bit. Octal made perfect sense. http://bitsavers.informatik.uni-stuttgart.de/pdf/univac/1100/datapro/70C-846MM-40_8412_Sperry_1100_80.pdf http://bitsavers.informatik.uni-stuttgart.de/pdf/univac/1100... >FIXED-POINT OPERANDS: One 36-bit single precision word. Addition and subtraction can also be performed upon 2-word (72-bit) double precision operands and upon 18-bit half-words and 12-bit third-words; the leftmost bit holds the sign in each case. Moreover, partial words of 6,9, 12, or 18 bits can be transferred into and out of the arithmetic and control registers. The 11 00/80 can also perform decimal addition and subtraction operations on 9-bit bytes, packed 4 to a word.
- anyfoo 1y agoOops, "the decimal" in my answer should read "hexadecimal", obviously. (Too late to edit.)