4 ms·
Given that this is a 16-bit computer (rather than, say, an 18-bit one), why are they describing things in octal rather than hex...?
by Sniffnoy 6y ago
Given that this is a 16-bit computer (rather than, say, an 18-bit one), why are they describing things in octal rather than hex...?
- aap_ 6y agoBecause with 8 registers and 8 addressing modes octal makes for extremely readable machine code. There's another completely distinct proposal for the PDP-11 architecture which uses hex but it was never built.
- Sniffnoy 6y agoOh, good point -- the instructions break down nicely as one leading bit plus 5 octal digits. Branches are a little bit of an exception, but you're right that octal works overall better here. Still, that doesn't explain the use of octal at the top where it's not referring to instructions.
- aap_ 6y agoUsing two different number bases sounds painful, especially considering hex wasn't very common at the time. Also physical unibus addresses are 18 bits so they divide nicely into octal digits.
- hazeii 6y ago3 bits for the 8 addressing modes, 3 bits for the register. For double operand instructions. that's 12 bits - so only 4 bits left over to encode double-operand instructions. The most important of which was probably MOV (0001, or 01 octal). Thus, something like the C 's++=t++' translates direction to a single 16-bit instruction:- 0001 011 001 011 002 = 012122 The cleverness though was that by using the addressing modes on the PC (R7) things like loading a constant into memory or moving memory contents was all single-instruction as well:- e.g. MOV #7, @#1000 # Put '123' int address 1000 ==> MOV (PC)+,@(PC)+ ==> 012737 7 1000 The same trickery made relative addressing easy, made PUSH and POP nothing more than MOV instructions (though it did take me some time to understand the use of R5 for passing arguments in Fortran).
- Someone 6y agoAside from what others said, the byte as an 8-bit entity wasn’t settled at the time. At PDP, the PDP-5, PDO-8 and PDP-12 were 12-bits and the PDP-6 and PDP-10 were 36 bit, all of which are multiples of both 3 and 4 Memory was expensive at the time, so I would guess most of them had 6-bit character sets. That must have made octal a popular choice. I think https://en.wikipedia.org/wiki/Hexadecimal#History_of_written_representations https://en.wikipedia.org/wiki/Hexadecimal#History_of_written... shows the notation for hex wasn’t settled upon. I think that’s an indication of its rarity (go read it to learn which version was deemed “ridiculous” :-) )
- elvis70 6y agoSee also "The 80x86 is an Octal Machine": https://web.archive.org/web/20200114164700/http://www.dabo.de/ccc99/www.camp.ccc.de/radio/help.txt https://web.archive.org/web/20200114164700/http://www.dabo.d...
- Taniwha 6y agoOctal was actually a lot more common back then, people hadn't settled on hex as the default power-of-two base - just as they hadn't settled on power of 2 word sizes - pdp8 was 12-bit, pdp-6/dec-10/20 were 36 bit, the old B6700 I grew up with had 48/51-bit words - 6-bit bytes were not uncommon
- pmiller2 6y agoOctal works a little better than hex when you actually have to toggle in a boot loader at the front panel, IMO. I think 8 switches are a little easier to manage than 16 for this use case.
- Taniwha 6y agoused to know the pdp11-05 bootstrap by heart .... I'm not sure it matters - I can imagine that 2 lots of 2x4 can be done with 2 hands in 2 operations would probably be faster ... but it's kind of moot because the front panel was marked in octal so that's the way one learned it I think that standardising on 8-bit bytes and power of 2 words is what pushed us to hex as a standard notation
- rswail 6y agoBecause it's easier to program with three fingers on the switches than four :) But it was because there were 8 registers and 8 addressing modes, so a two operand instruction used 6 bits for each, leaving 4 bits for the instruction.