Introduction to Digital Computers

This page accumulates the show notes for each of the videos in the “Introduction to Digital Computer” series.


While putting together my video series on how digital computers work, I did a little basic research to verify my facts. And some of the pages I encountered are very interesting or very cool.

Part 1: Transistors

It’s worth noting there are many different types of transistors out there. The transistor I’m using in this series is a very common NPN transistor: specifically the 2N3904, which can be purchased (as of this writing) on Amazon for $5.90 for a set of 100.

The reason why I’m using this transistor is twofold. First, it’s a very common hobbyist transistor, whose characteristics are very well known. Second, it’s relatively inexpensive. One could easily follow along in the circuit diagrams to actually build the circuits I outline in the video. (In fact, I did, to make sure the circuits I was diagramming worked.) And this is important to me because later on I’d like to actually have circuit boards built which show each of the basic logic circuits in action–and even more complex circuits, such as a 1 bit adder.

Because I believe hands-on is extremely important. (Too often tutorials like this start at a very abstract level, like “this is a CMOS transistor, and an AND gate is made by blah blah blah”–all theoretical stuff. But if you start with NPN transistors, you can get a breadboard, some wires, some resistors–and actually build a working AND gate yourself.)

Sparkfun has a fantastic tutorial on transistors, which cover the basic NPN transistor, complete with equations. But one of the best explanations of how a transistor works can be found here: What is the difference between a transistor and a resistor? Frankly, this answer to the question is eye-opening, and at some point I may animate the steps shown, if only for my own edification. (With the author’s permission, of course.)

As to making gates, while the video itself should make it clear how gates can be made from NPN transistors, there is also an Indestructables tutorial on the subject. Of course when I built the circuits I made sure I had a current limiter resistor (330Ω) on my LEDs because I was using a 3V source and LEDs rated at 1.5V.

Further, I have a Quick Video which shows each of our five circuits constructed on a breadboard, with show notes giving complete circuit diagrams (including resistor values), as well as a list of parts and where they can be ordered from.

I also want to touch a moment on encapsulation.

I think the importance of encapsulation in computer science and computer engineering is one of the most underrated concepts ever. Encapsulation–the idea that you build complex things by building them out of simple parts, each of which is made up of it’s own parts, and so on–is a very under-rated concept and an under-rated idea. Too often we see a lack of the ability of a software developer to abstract concepts through encapsulation–and it shows up in spaghetti code, confused engineers and over-constructed stuff.

It’s like if an architect was forced to build a skyscraper first by considering each and every nail they hammer into a board. No wonder if builders built buildings like programmers built programs, the first woodpecker to come along would destroy civilization.

We will be hitting the concept of encapsulation–including the idea that once you’ve built the black box, it doesn’t matter what is inside the black box so long as it works the same. This becomes important when we talk about exclusive-OR gates, adders, latches, and other components.

And being able to visualize what you are working on at a wide variety of levels of encapsulation–for a time consider an ALU, then visualize the gates inside the ALU, then visualize the ALU’s place inside a processor, for example–is a highly important skill to develop. It allows us to visualize things that may consist of millions of transistors without getting confused or going mad.

Blog at WordPress.com.

Up ↑