1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
-
+
|
# Notation
We must first settle on a bit of notation.
PDP-8 addresses are traditionally written as [octal](https://en.wikipedia.org/wiki/Octal) numbers. That means when we write 123 in this context, we aren't saying "one hundred and twenty-three," we're talking about the quantity (1 × 8²) + (2 × 8¹) + (3 × 8⁰) = 83 in ordinary decimal notation. When I write an octal number below, I will write it as 123₈ to make this clear, the subscript meaning "base 8," also called "octal." If you see a multi-digit number without the base-8 subscript, it's a decimal number.
We use octal when talking about PDP-8 addresses and memory values because the [PDP-8's major registers](http://homepage.cs.uiowa.edu/~jones/pdp8/man/registers.html) are all multiples of 3 bits in size.¹ Since an octal digit encodes as 3 [bits](https://en.wikipedia.org/wiki/Bit), that makes octal the most convenient way to write PDP-8 addresses. The more common ways to write computer numbers are inconvenient: [binary](https://en.wikipedia.org/wiki/Binary_number) takes too many digits even with the tiny PDP-8 memories, and [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) numbers don't divide evenly by 3-bit chunks until you get to 24-bit addresses, which is beyond the PDP-8's limits.
Another bit of notation we need to establish here is our unit suffixes. In this article...
* ...the unit modifer **k** is the computer-centric 1024 multiplier, not the more correct [SI](https://en.wikipedia.org/wiki/International_System_of_Units) 1000 multiplier. Thus, 6 kB is six [kibibytes](https://en.wikipedia.org/wiki/Kibibyte): 6144 bytes, not 6000 bytes; and
* ...the unit kW means killowords PDP-8 memory, not "killowatts." Although a fairly small PDP-8/I setup dissipates about one killowatt of power, this article is purely concerned with PDP-8 memory, so I think we can safely repurpose this unit notation here. Original PDP-8 documentation would often just use "k" alone, and you were expected to understand that it meant kWords, not kBytes.
* ...the unit kW means kilowords of PDP-8 memory, not "kilowatts." Although a fairly small PDP-8/I setup dissipates about one kilowatt of power, this article is purely concerned with PDP-8 memory, so I think we can safely repurpose this unit notation here. Original PDP-8 documentation would often just use "k" alone, and you were expected to understand that it meant kWords, not kBytes.
# Bytes
The base PDP-8 memory configuration is 4 kW of [core memory](https://en.wikipedia.org/wiki/Magnetic-core_memory). We speak of PDP-8 memory in terms of words, rather than bytes, because the PDP-8 predates the modern notion of an 8-bit byte. Back in the PDP-8's day, a "byte" was a more slippery concept. You could speak of 6-bit bytes, 7-bit bytes, 9-bit bytes... It all depended on what your particular task needed.²
Since the PDP-8 uses a 12-bit native word size, 6-bit "bytes" are quite common in the PDP-8 world, often used for some kind of "packed [ASCII](https://en.wikipedia.org/wiki/ASCII)" representation. [One common scheme](http://homepage.cs.uiowa.edu/~jones/pdp8/faqs/#charsets) gets rid of most of the 32 control characters defined in 7-bit ASCII, all of the lowercase letters, and a whole bunch of the punctuation in order to pack two characters into a 12-bit PDP-8 word. There are actually a few different 6-bit packed ASCII representations for the PDP-8, so you have to know which scheme you're looking at before you can turn the data back into 7-bit ASCII.
|