The Arduino Uno has 20 usable GPIO pins. That feels like a lot until you try to build a 16-LED panel, a 7-segment display with 4 digits, or a matrix keyboard with 5×4 keys. Suddenly you're out of pins. The 74HC595 — a 16-pin chip from the 1980s that still costs 30 cents — solves this elegantly: convert serial bit-streams into parallel outputs.

How serial-to-parallel conversion works

The 74HC595 has three input pins that matter for writing data:

  • SER (data) — one bit at a time, the value you want to push.
  • SRCLK (shift clock) — on each rising edge, the chip reads SER and shifts the whole internal 8-bit register one position. The bit at SER enters position 0; whatever was in position 7 falls off (or feeds the next chip if chained).
  • RCLK (latch / register clock) — on a rising edge, the chip copies the internal shift register to the output pins, all 8 at once. Until you latch, the outputs don't change.

So to set all 8 outputs at once: pulse SER+SRCLK 8 times (each pulse writes one bit into the shift register), then pulse RCLK once (latches the lot to the outputs). 17 pin toggles to update 8 outputs. The chip handles the rest.

The Arduino library does the timing

shiftOut(dataPin, clockPin, MSBFIRST, value) handles the 8-bit shifting in a single call. You write to the LATCH pin manually around it:

digitalWrite(LATCH, LOW);
shiftOut(DATA, CLOCK, MSBFIRST, 0b00010001);  // Q0 and Q4 high, rest low
digitalWrite(LATCH, HIGH);

Three Arduino pins, eight outputs. To drive 16 outputs, chain two shift registers: the first one's Q7' (overflow) pin feeds the next chip's SER. Send 16 bits with two consecutive shiftOut calls, latch both registers together. The architecture scales linearly — each chip costs three IO pins, no matter how many you've stacked.

Why this pattern matters everywhere

The same idea — convert a slow narrow serial stream into a wide parallel output — is how every LED matrix, every 7-segment display module, every dot-matrix printer head, every old-school memory module worked. Your phone's display driver does it. Your computer's USB-to-SPI adapters do it. Modern multiplexers do it. The 74HC595 is the canonical educational example of a pattern that powers half the digital world.