r/compsci • u/ell-hol1 • 5h ago
Designing my own SRAM like it's 1969
I've been going down the rabbit hole lately trying to figure out how to design a computer from scratch using only electronic components and logic gates.
One thing that bothered me was how most explanations go from "transistors are just switches" to "here's how an ALU works, good luck", casually skipping the most interesting question: how is memory implemented ?
So I decided to work it out from first principles and document the whole process.
I started with a single MOSFET, built CMOS logic gates, figured out how feedback loops can remember bits, then moved on to latches, address decoders, and eventually a working SRAM array capable of reading and writing entire bytes.
The funniest part was how naive and wasteful my implementation is: 47 transistors to store and access a single bit, while production-level SRAM cells do it with just 6. So I dug into that too and ended up turning the whole thing into a heavily illustrated article (thank you Claude), with circuit diagrams at every step. It's heavily inspired by Core Dumped's YouTube channel, which I highly recommend.
Would genuinely appreciate some technical criticism. I'm particularly interested in whether I've oversimplified anything to the point of being wrong: the article