DIP-40 · Z8400A PS · drawing, not a photo
Zilog Z80Zilog
1976
Zilog Z80
The 8-bit processor of the whole Sinclair family, made by the team that had designed the Intel 8080.
Launched by Zilog in July 1976, the Z80 is an 8-bit processor compatible with the Intel 8080, designed by Federico Faggin and Masatoshi Shima. It, or a compatible of it, is in every Sinclair machine from the ZX80 to the +3, and it only went out of production in 2024.
- 8
- 8
- 20
- 8,500
- 64 KB
The 8080 men
At Intel, Federico Faggin had led the work on the 4004 and the 8080, and Masatoshi Shima had been the main designer of the logic and transistors of both chips. In 1974, with Intel treating microprocessors as a sideline for selling memory, and in the middle of a recession, Faggin challenged Ralph Ungermann to start a company with him. Faggin's last day at Intel was Halloween, 31 October 1974.
The company did not even have a name yet when Exxon Enterprises, the oil company's technology investment arm, read a news story about it and put in 500,000 dollars in June 1975. Shima joined in February that year and brought from his experience with NEC minicomputers the idea of having two sets of registers, to respond quickly to interrupts.
The name came up in a conversation between Faggin and Ungermann: Zilog, which they explained as "the last word in integrated logic". The first Z80 samples arrived from Mostek on 9 March 1976 and the official launch was in July. According to Faggin himself, he worked 80 hours a week to meet the investors' schedule.
A better 8080
The Z80 runs most 8080 programs unchanged, including the CP/M operating system, and so it inherited a whole software library in one go. But it makes the rest of the board much simpler: it needs a single 5 V supply (the 8080 wanted −5, +5 and +12 V), a simple single-phase clock, and it refreshes dynamic memory (DRAM) on its own, which otherwise called for separate circuitry.
It also adds instructions that programmers were grateful for: operations on individual bits, relative jumps, block copy and search (LDIR, CPIR), signed 16-bit arithmetic, and two index registers, IX and IY. The interrupt system gained three modes (0, compatible with the 8080; 1, which always jumps to the same address; and 2, with a table of addresses) and a non-maskable interrupt, the NMI.
Inside, explained
A register is a drawer inside the processor, much faster than memory. The Z80 has the accumulator A (where the sums are done), the flags F (which tell you whether the result was zero, whether there was a carry, and so on) and the pairs BC, DE and HL, which can hold either two 8-bit numbers or one 16-bit address. There are also IX and IY, the stack pointer SP and the program counter PC.
Shima's trick is that AF, BC, DE and HL exist twice over: there is a second "shadow" set, AF', BC', DE' and HL'. The EX AF,AF' and EXX instructions swap the two sets in four clock cycles. Meant for interrupts, it ended up used as extra drawers: the ZX81 ROM uses the shadow registers to work with the 40-bit floating-point numbers of its BASIC.
The Z80 addresses 64 KB of memory and, separately, 256 input/output ports. In practice, on every input/output operation it puts all 16 bits on the address bus, and the ZX81 and the Amstrad CPC use the top byte to save on decoding logic.
A surprise for anyone who thinks of it as an 8-bit processor: the arithmetic unit is 4 bits wide, and every 8-bit addition is done in two halves.
The R register and the Sinclair trick
There are two unusual registers. I holds the top part of the address of the mode 2 interrupt table. R is the refresh counter: it adds 1 for every instruction fetched from memory, only counts in its bottom 7 bits, and right after each instruction fetch the Z80 puts I and R on the address bus to refresh the DRAM.
Sinclair turned this into a graphics card. On the ZX80 and ZX81, the processor "executes" the screen memory itself: the video circuit reads each character code, hands the Z80 a NOP instruction (do nothing) and, on the next refresh cycle, combines the I register (which points to the character shapes in ROM), the character code and the line number to fetch from ROM the shape to display. Every line of text ends in a HALT instruction.
R acts as a position counter on the screen. On the ZX81, the interrupt pin is wired to address line A6: when bit 6 of R goes from 1 to 0, an interrupt fires, and the system knows it has reached the end of a line. Fewer components, lower cost, and a processor kept busy drawing, hence the FAST and SLOW modes.
On the Spectrum it is the ULA that draws the picture, but R and I keep counting. Many games use R as a source of random numbers. And if a program sets the I register between 0x40 and 0x7F, the refresh addresses land in the memory shared with the ULA and "snow" appears on the screen (the snow effect).
Variants, copies and clones
In the original NMOS, the top speed kept rising: 2.5 MHz on the Z80, 4 MHz on the Z80A (the one in the ZX81 and the Spectrum, which run it below its limit), 6 MHz on the Z80B and 8 MHz on the Z80H, with a 10 MHz version at the end of the 80s. The CMOS versions go up to 20 MHz and can stop the clock without losing their state, something NMOS cannot do for more than a few thousand cycles.
To have second sources, Zilog licensed the chip to Mostek (MK3880) and SGS (Z8400); Sharp made the LH0080 and NEC the µPD780C. NEC got there by reverse engineering and later reached an agreement with Zilog in a patent dispute, ending up with a licence. The NEC D780C-1 is the processor in most Spectrums and most ZX80s. There were also unlicensed copies, such as the East German U880 and the Soviet T34BM1.
Zilog and NEC are not exactly the same in the dark corners: after SCF and CCF, bits 3 and 5 of the flags, which the manual does not document, end up different on each. Almost no program depends on it, but CPU test programs catch the difference.
On 15 April 2024 Zilog announced the end of the classic Z80, with orders accepted until 14 June 2024: 48 years after launch. The eZ80, a compatible descendant, carries on.
Where else you'll find it
In the 70s and 80s the Z80 with CP/M dominated office computers, from the Osborne 1 to the Kaypros. Among home computers it is in the TRS-80, the Amstrad CPC and PCW, MSX and the SAM Coupé, which uses a Z80B at 6 MHz. The Cambridge Z88, the portable Clive Sinclair made in 1988 after selling the brand to Amstrad, also has a Z80, in a CMOS version.
In games: the Pac-Man arcade machine, the ColecoVision, and Sega's Master System and Game Gear. The Mega Drive has a Z80 beside the 68000, with 8 KB of its own memory; it is there to run Master System games and is often used to handle the sound, but it is not just a sound chip.
And in Texas Instruments graphing calculators, starting with the TI-81, from 1990, with a Z80 at 2 MHz, through to the TI-83 and TI-84 Plus, still on sale in 2025. The newer TI-84 Plus CE already uses the eZ80.
Did you know…
To make copying harder, the team put six "traps" on the chip: transistors altered to behave differently from what the layout suggests. According to Shima, an NEC engineer later told him this delayed their reverse engineering by six months.
Shima was known for working out in his head, in the middle of a meeting, how much chip area an idea would take up, and vetoing it if it did not fit.
It's said that the X in ZX80 was "the mystery ingredient" added to the Z80.
The IX and IY registers can be used in halves (IXH, IXL, IYH, IYL). Zilog never documented it, but it works on the Z80s of the time and programmers used it freely.
On CMOS Z80s, the undocumented OUT (C),0 instruction sends 255 instead of 0.
Bit 7 of the R register never changes by itself: only the LD R,A instruction alters it.
Because on the Spectrum the byte on the bus during an interrupt is almost always 0xFF but not guaranteed, games that use mode 2 fill a 257-byte table with identical bytes, so they always land in the same place.
It was in production for 48 years, from 1976 to 2024.










