LGP-30 Hex
The LGP-30 wrote numbers in hexadecimal, like most binary machines, but not with the digits you know. After 0 to 9 it used f, g, j, k, q and w:
| Value | Usual hex | LGP-30 hex | Flexowriter code |
|---|---|---|---|
| 0 | 0 |
0 |
0000 10 |
| 1 | 1 |
1 |
0001 10 |
| 2 | 2 |
2 |
0010 10 |
| 3 | 3 |
3 |
0011 10 |
| 4 | 4 |
4 |
0100 10 |
| 5 | 5 |
5 |
0101 10 |
| 6 | 6 |
6 |
0110 10 |
| 7 | 7 |
7 |
0111 10 |
| 8 | 8 |
8 |
1000 10 |
| 9 | 9 |
9 |
1001 10 |
| 10 | A |
f |
1010 10 |
| 11 | B |
g |
1011 10 |
| 12 | C |
j |
1100 10 |
| 13 | D |
k |
1101 10 |
| 14 | E |
q |
1110 10 |
| 15 | F |
w |
1111 10 |
So 250, which is FA in ordinary hexadecimal, is wf on the LGP-30, and
the word holding -6, fffffff4 in ordinary hexadecimal, is
wwwwwww4.
Why those letters
The answer is in the typewriter. Everything the LGP-30 read came from a Friden
Flexowriter, and each key on it sends a six-bit code. The codes were not assigned at
random. For the digit keys, the first four bits are the digit's value and the last
two are always 10. The key 5, for example, sends
0101 10. When the machine reads a number, those four value bits
are what count.
To type the values 10 to 15, the machine needed six more keys whose codes carried on
the same pattern: 1010 10, 1011 10 and so on
up to 1111 10. On the Flexowriter those six codes belong to the
keys f, g, j, k, q and w. The letters were chosen by the code, not by the alphabet.
The usual letters were already spoken for. a, b, c, d and e are instruction
letters, and their codes follow a different pattern: an instruction letter's code
is the instruction's four-bit number followed by 01. The key a sends
1110 01, and 1110 is the number of the Add instruction. That is
how the instruction letters themselves were chosen: typing a puts the
Add code straight into the word, and b, 0001 01,
puts in Bring. The whole instruction set works this way, which is why the
letters look like a jumble: z, b, y, r, i, d, n, m, p, e, u, t, h, c, a, s are
simply the keys whose codes count from 0 to 15.
Where you will meet it
LGP-30 hex appears in the original manuals, in program listings and anywhere a word was written out in full. The IDE uses it too: the debugger's memory, drum and register panes show words in LGP-30 hex. A switch in the Memory pane's header, and next to the calculator's Word field, changes them all to ordinary hexadecimal if you prefer. Addresses are not affected. The LGP-30 wrote those as decimal track and sector numbers, and so does the IDE.