August 10, 2015 by Marco Cecconi
In the first installment of "A computer from scratch", I've built a NAND gate. I've also introduced the my "scaling" rule: if I build something, I can buy it pre-made, because I only have one lifetime to spend on this :-)
Therefore. I've bought a bunch of 4011 CMOS NAND gates, here they are:
And here's what they do:
With this in mind, and with the diagrams in my second installment, I proceeded with building NOT, AND and OR gates. Of course this wasn't without confusion and questions, but fortunately I could count on the help of the Electronics Stack Exchange community when I got stuck.
Here's what I built. Honestly, after getting stuck on where to put my resistors, all the builds were super easy.
A NOT gate is built by short-circuiting the inputs of a NAND. The circuit is very simple, it connects a button to pins A3 and B3, and connects the output Q3 to a LED.
The build looks like this
An AND gate is built by taking the result of a NAND and inverting it through a NOT. The circuit is also simple, it connects a button to pins A2 and another to B2, and connects the output Q2 to the previous NOT gate at A3/B3.
The build looks like this
An OR gate is built by negating both inputs and passing them throug a NAND. The circuit thus requires three NANDS. It connects a button to pins A2/B2 creating a NOT gate, and another button to A1/B1, creating another NOT. It then connects the two outputs Q1 and Q2 to A3 and B3 respectively. Q3 is connected to the LED as before
The build looks like this
In the next steps I'd like to try and build XORs, half adders and full adders. I'd also like to build some testing script via Arduino, although I'm not sure I can pull it off.
Hi, I'm Marco Cecconi. I am the founder of Intelligent Hack, developer, hacker, blogger, conference lecturer. Bio: ex Stack Overflow core team, ex Toptal EM.
Read moreMarch 12, 2023 by Marco Cecconi
Stack Overflow could benefit from adopting a using conversational AI to provide specific answers
Read moreOctober 15, 2021 by Marco Cecconi
Multiple people with my name use my email address and I can read their email, chaos ensues!
Read moreSeptember 29, 2021 by Marco Cecconi
After years of building, our top-notch consultancy to help start-ups and scale-ups create great, scalable products, I think it is high time I added an update to how it is going and what's next for us.
Read moreFebruary 03, 2021 by Marco Cecconi
A lesson in building communities by Stack Overflow's most prominent community manager emeritus, Shog9
Read moreDecember 02, 2020 by Marco Cecconi
Some lessons learned over the past 8 years of remote work in some of the best remote companies on the planet
Read moreNo, I don’t want to subscribe to your newsletter. No, I don’t want to complete a short survey. And no, I don’t want to become a member.
Read more…