# Kenbak-1

The Kenbak-1 is considered by the Computer History Museum, the Mimms Museum of Technology and Art and the American Computer Museum to be the world's first "personal computer", invented by John Blankenbaker (born 1929) of Kenbak Corporation in 1970 and first sold in early 1971. Less than 50 machines were ever built, using Bud Industries enclosures as a housing. The system first sold for US$750. Today, only 14 machines are known to exist worldwide, in the hands of various collectors and museums. Production of the Kenbak-1 stopped in 1973, as Kenbak failed and was taken over by CTI Education Products, Inc. CTI rebranded the inventory and renamed it the 5050, though sales remained elusive.
Since the Kenbak-1 was invented before the first microprocessor, the machine did not have a one-chip CPU but was instead based purely on small-scale integration TTL chips. The 8-bit machine offered 256 bytes of memory, implemented on Intel's type 1404A silicon gate MOS shift registers. The clock signal period was 1 microsecond (equivalent to a clock speed of 1 MHz), but the program speed averaged below 1,000 instructions per second due the many clock cycles needed for each operation and slow access to serial memory.
The machine was programmed in pure machine code using an array of buttons and switches. Output consisted of a row of lights.
Internally, the Kenbak-1 has a serial computer architecture, processing one bit at a time.

## Technical description
### Registers

The Kenbak-1 has a total of nine registers. All are memory mapped. It has three general-purpose registers: A, B and X. Register A is the implicit destination of some operations. Register X, also known as the index register, turns the direct and indirect modes into indexed direct and indexed indirect modes. It also has a program counter, called Register P, three "overflow and carry" registers for A, B and X, respectively, as well as an Input Register and an Output Register.

### Addressing modes

Add, Subtract, Load, Store, Load Complement, And, and Or instructions operate between a register and another operand using five addressing modes:
* Immediate (operand is in second byte of instruction)
* Memory (second byte of instruction is the address of the operand)
* Indirect (second byte of instruction is the address of the address of the operand)
* Indexed (second byte of instruction is added to X to form the address of the operand)
* Indirect Indexed (second byte of instruction points to a location which is added to X to form the address of the operand)

### Instruction table

The instructions are encoded in 8 bits, with a possible second byte providing an immediate value or address. Some instructions have multiple possible encodings.
Opcode matrix for the Kenbak-1 instruction set :
| High octal digits | Low octal digit | Low octal digit | Low octal digit | Low octal digit | Low octal digit | Low octal digit | Low octal digit | Low octal digit |
| High octal digits | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 00 | HALT | SFTR A1 | SET 0 b0 XXX | ADD A #XXX | ADD A XXX | ADD A (XXX) | ADD A XXX, X | ADD A (XXX), X |
| 01 | HALT | SFTR A2 | SET 0 b1 XXX | SUB A #XXX | SUB A XXX | SUB A (XXX) | SUB A XXX, X | SUB A (XXX), X |
| 02 | HALT | SFTR A3 | SET 0 b2 XXX | LOAD A #XXX | LOAD A XXX | LOAD A (XXX) | LOAD A XXX, X | LOAD A (XXX), X |
| 03 | HALT | SFTR A4 | SET 0 b3 XXX | STORE A #XXX | STORE A XXX | STORE A (XXX) | STORE A XXX, X | STORE A (XXX), X |
| 04 | HALT | SFTR B1 | SET 0 b4 XXX | JPD A ≠0 XXX | JPD A =0 XXX | JPD A <0 XXX | JPD A ≥0 XXX | JPD A >0 XXX |
| 05 | HALT | SFTR B2 | SET 0 b5 XXX | JPI A ≠0 XXX | JPI A =0 XXX | JPI A <0 XXX | JPI A ≥0 XXX | JPI A >0 XXX |
| 06 | HALT | SFTR B3 | SET 0 b6 XXX | JMD A ≠0 XXX | JMD A =0 XXX | JMD A <0 XXX | JMD A ≥0 XXX | JMD A >0 XXX |
| 07 | HALT | SFTR B4 | SET 0 b7 XXX | JMI A ≠0 XXX | JMI A =0 XXX | JMI A <0 XXX | JMI A ≥0 | JMI A >0 XXX |
| 10 | HALT | ROTR A1 | SET 1 b0 XXX | ADD B #XXX | ADD B XXX | ADD B (XXX) | ADD B XXX, X | ADD B (XXX), X |
| 11 | HALT | ROTR A2 | SET 1 b1 XXX | SUB B #XXX | SUB B XXX | SUB B (XXX) | SUB B XXX, X | SUB B (XXX), X |
| 12 | HALT | ROTR A3 | SET 1 b2 XXX | LOAD B #XXX | LOAD B XXX | LOAD B (XXX) | LOAD B XXX, X | LOAD B (XXX), X |
| 13 | HALT | ROTR A4 | SET 1 b3 XXX | STORE B #XXX | STORE B XXX | STORE B (XXX) | STORE B XXX, X | STORE B (XXX), X |
| 14 | HALT | ROTR B1 | SET 1 b4 XXX | JPD B ≠0 XXX | JPD B =0 XXX | JPD B <0 XXX | JPD B ≥0 XXX | JPD B >0 XXX |
| 15 | HALT | ROTR B2 | SET 1 b5 XXX | JPI B ≠0 XXX | JPI B =0 XXX | JPI B <0 XXX | JPI B ≥0 XXX | JPI B >0 XXX |
| 16 | HALT | ROTR B3 | SET 1 b6 XXX | JMD B ≠0 XXX | JMD B =0 XXX | JMD B <0 XXX | JMD B ≥0 XXX | JMD B >0 XXX |
| 17 | HALT | ROTR B4 | SET 1 b7 XXX | JMI B ≠0 XXX | JMI B =0 XXX | JMI B <0 XXX | JMI B ≥0 XXX | JMI B >0 XXX |
| 20 | NOOP | SFTL A1 | SKP 0 b0 XXX | ADD X #XXX | ADD X XXX | ADD X (XXX) | ADD X XXX, X | ADD X (XXX), X |
| 21 | NOOP | SFTL A2 | SKP 0 b1 XXX | SUB X #XXX | SUB X XXX | SUB X (XXX) | SUB X XXX, X | SUB X (XXX), X |
| 22 | NOOP | SFTL A3 | SKP 0 b2 XXX | LOAD X #XXX | LOAD X XXX | LOAD X (XXX) | LOAD X (XXX) | LOAD X (XXX), X |
| 23 | NOOP | SFTL A4 | SKP 0 b3 XXX | STORE X #XXX | STORE X XXX | STORE X (XXX) | STORE X XXX, X | STORE X (XXX), X |
| 24 | NOOP | SFTL B1 | SKP 0 b4 XXX | JPD X ≠0 XXX | JPD X =0 XXX | JPD X <0 XXX | JPD X ≥0 XXX, X | JPD X >0 XXX |
| 25 | NOOP | SFTL B2 | SKP 0 b5 XXX | JPI X ≠0 XXX | JPI X =0 XXX | JPI X <0 XXX | JPI X ≥0 XXX | JPI X >0 XXX |
| 26 | NOOP | SFTL B3 | SKP 0 b6 XXX | JMD X ≠0 XXX | JMD X =0 XXX | JMD X <0 XXX | JMD X ≥0 XXX | JMD X >0 XXX |
| 27 | NOOP | SFTL B4 | SKP 0 b7 XXX | JMI X ≠0 XXX | JMI X =0 XXX | JMI X <0 XXX | JMI X ≥0 XXX | JMI X >0 XXX |
| 30 | NOOP | ROTL A1 | SKP 1 b0 XXX | OR #XXX | OR XXX | OR (XXX) | OR XXX, X | OR (XXX), X |
| 31 | NOOP | ROTL A2 | SKP 1 b1 XXX | — | — | — | — | — |
| 32 | NOOP | ROTL A3 | SKP 1 b2 XXX | AND #XXX | AND XXX | AND (XXX) | AND XXX, X | AND (XXX), X |
| 33 | NOOP | ROTL A4 | SKP 1 b3 XXX | LNEG #XXX | LNEG XXX | LNEG (XXX) | LNEG XXX, X | LNEG (XXX), X |
| 34 | NOOP | ROTL B1 | SKP 1 b4 XXX | JPD UNC XXX | JPD UNC XXX | JPD UNC XXX | JPD UNC XXX | JPD UNC XXX |
| 35 | NOOP | ROTL B2 | SKP 1 b5 XXX | JPI UNC XXX | JPI UNC XXX | JPI UNC XXX | JPI UNC XXX | JPI UNC XXX |
| 36 | NOOP | ROTL B3 | SKP 1 b6 XXX | JMD UNC XXX | JMD UNC XXX | JMD UNC XXX | JMD UNC XXX | JMD UNC XXX |
| 37 | NOOP | ROTL B4 | SKP 1 b7 XXX | JMI UNC XXX | JMI UNC XXX | JMI UNC XXX | JMI UNC XXX | JMI UNC XXX |

## History

The Kenbak-1, released in early 1971, is considered by the Computer History Museum to be the world's first personal computer. It was designed and invented by John Blankenbaker of Kenbak Corporation in 1970, and was first sold in early 1971. Unlike a modern personal computer, the Kenbak-1 was built of small-scale integrated circuits, and did not use a microprocessor. The system first sold for US$750. Only 44 machines were ever sold, though it's said 50 to 52 were built. In 1973, production of the Kenbak-1 stopped as Kenbak Corporation folded.
With a fixed 256 bytes of memory, input and output restricted to lights and switches (no ports or serial output), and no possible way to extend its capabilities, the Kenbak-1 was only really useful for educational use.
256 bytes of memory, 8 bit word size, and I/O limited to switches and lights on the front panel are also characteristics of the 1975 Altair 8800, whose fate was diametrically opposed to that of the Kenbak. However, there were three major differentiating factors between the Altair and the Kenbak which led to the later Altair 8800 selling over 25000 units and influencing many, while the Kenbak-1 only sold 44, and influenced mostly no one.
* The Kenbak-1, designed before the invention of the microprocessor, had a limited instruction set that was professionally considered "incompatible with microcomputer application goals", according to a citation pointing at the KENBAK-1 programming manual in the contemporary February 1974 issue of RCA Engineer Magazine.
* The Kenbak-1 had no ability for expansion. There were no expansion slots, and tragically, no serial port or any other way to get data out of the machine (other than the 8 lamps on the front). There was also no way to load data into the machine other than its physical switches. There was no ability to upgrade the capacity of the RAM, and even if there were, there would have been no way to simultaneously address more than 256 bytes of RAM due to limitations of the machine code language.
* The Kenbak-1 was not advertised outside of the educational market. It was advertised in Science magazine and in-person at a local teacher's convention. There was no attempt to market the machine at the hobbyist market as later successful computers did. John Blankenbaker would later cite this as the reason that his machine failed, as the educational market was "too slow" to adopt his machine while it could have been relevant. However, it is also worth noting that in the educational market, the Kenbak-1 was competing against timeshares of more capable and established computers such as the PDP-8.
If the Kenbak-1 were advertised better, and the machine had at least one serial port to make it more useful, it may have done very well at its price-point of $750 in 1971, which no other Turing-complete computer on the market came close to. However, it would not be very long before personal computers based on the much more capable Intel 8008 would come to market, followed shortly after once again by the ten-times-as-fast Intel 8080, in the highly-expandable Altair 8800.