Play free

1971 · Intel

Intel 4004

The first microprocessor sold to the public was built for a calculator. It worked on four bits at a time, ran at under a megahertz, and put a whole CPU on a sliver of silicon smaller than a fingernail.

3 min read · Updated

Designed byFederico Faggin, Ted Hoff, Stanley Mazor (Intel) and Masatoshi Shima (Busicom)
Released1971
Data width4 bits
Transistorsabout 2,300
Clockup to 740 kHz
Registers4-bit accumulator, sixteen 4-bit index registers, 12-bit program counter plus a 3-level return stack
Instructions46
Program memoryup to 4 KB of ROM (12-bit addresses)
Package16 pins

Why it was built

In 1969 the Japanese company Busicom asked Intel to make the chips for a new family of printing calculators. Busicom’s plan called for a set of custom chips, each wired for its own job. Ted Hoff at Intel suggested something different: a small general-purpose processor that would get its calculator behavior from a program stored in ROM. Change the program, and the same chips become a different product.

Stanley Mazor worked on the architecture, Federico Faggin turned it into silicon using his new silicon-gate process, and Busicom engineer Masatoshi Shima worked on the logic and the calculator software. The result was a four-chip family called MCS-4: the 4001 ROM, the 4002 RAM, the 4003 shift register, and the 4004 processor.

How it worked

The 4004 handles numbers four bits at a time. That sounds tiny, but it suits a calculator well: four bits hold one decimal digit, and there is an instruction to help with decimal arithmetic. Bigger numbers are processed one digit after another, which is how you add on paper anyway (see how binary adders work).

Inside there is a 4-bit accumulator, a carry flag, and sixteen 4-bit index registers that can also be used as eight 8-bit pairs. Program addresses are 12 bits, so the chip can reach 4,096 bytes of ROM. Instead of a stack in memory, the chip keeps four 12-bit address registers on board: one is the program counter and the other three remember return addresses, so subroutines can nest only three deep.

With only 16 pins, there was no room for separate address and data buses. The 4004 sends everything over four shared lines, a few bits per clock step. One instruction cycle takes eight clock periods, about 10.8 µs at full speed.

The instruction set

The 4004 has 46 instructions. Most are one byte: four bits of opcode and four bits of operand, often a register number. A few, such as long jumps, take two bytes to hold a full 12-bit address.

GroupExamples
ArithmeticADD, SUB (register and accumulator, with carry), INC
AccumulatorCLB, CMA, IAC, RAL, DAA (decimal adjust)
Data movementLD, XCH, LDM (load immediate), FIM
ControlJUN, JCN (conditional), ISZ, JMS, BBL (return)
Memory and I/OSRC, RDM, WRM, WRR, RDR

Why it mattered

Busicom originally held the rights to the design. When the calculator business got tough, Intel negotiated a lower price in exchange for the right to sell the chip to everyone, and in late 1971 it went on the market. The 4004 itself was too small for most jobs, but it proved the idea: a whole CPU could be one cheap, mass-produced part. Intel followed it with the 8-bit 8008 and then the 8080, and the line that leads to today’s x86 chips runs through them.

The 4004 in NANDSIM

The museum 4004 is rebuilt from NAND gates and runs real 4004 programs. Watch the index registers and the little three-level stack as a program runs, or open it up and inspect registers and memory between steps.

Run the 4004 live