Homebrew — My Own Relay Computer

Computers & Mobile
Homebrew — My Own Relay Computer


When I was a small boy, my dad brought home relays salvaged from a decommissioned telephone exchange. With abundant enthusiasm, I set out to build a computer from a dozen dusty, nonfunctioning telephone relays. I worked on it for a while, but eventually gave up and moved on to other things.

However, I became mesmerized with the idea that machines might someday be made to think, and the possibility of mechanizing consciousness itself. I spent years studying computation in the abstract, but I never lost my fascination with simple machines. This unfinished project remained in the back of my mind, long after my mom tossed out those grimy old relays.

Then one day I realized that I had really, truly grown up. I could now do things I could only dream about as a child. I now had the time, the money, the knowledge, the patience, and the determination to complete this long-abandoned project.

My relay computer contains eight general-purpose 8-bit registers, a 16-bit program counter, and an 8-bit ALU capable of performing addition, logical operations, and shifting. The CPU can execute all common instructions including conditional branching and even procedure call and return. Other than main memory, this is an electromechanical computer, not an electronic computer.

Hand-assembled machine code programs are toggled in bit by bit, by flipping switches on the front panel. The only output is from glowing LEDs that reveal the internal state of the machine. Designing it forced me to think through the question of what truly constitutes the core of any computer. My design makes clear the big picture of how computers work, which so often gets lost in the complexity of contemporary processor designs and society’s relentless quest toward efficiency, optimization, miniaturization, and specialization.

Although the machine contains only 415 relays and runs at a mere 6Hz, the sound of the clicking relays makes this the most physical, alive computer I’ve ever encountered. The experience of finally completing a project once dreamt of as a kid has been enormously gratifying. I can finally check “build a computer out of relays” off my to-do list!

Discuss this article with the rest of the community on our Discord server!
Harry Porter, Ph.D.

Harry Porter teaches computer science at Portland State University. He's married with a sixth child on the way, which he looks forward to programming.

View more articles by Harry Porter, Ph.D.


Ready to dive into the realm of hands-on innovation? This collection serves as your passport to an exhilarating journey of cutting-edge tinkering and technological marvels, encompassing 15 indispensable books tailored for budding creators.