r/computerscience • • Aug 04 '24

A source that explains how computers work from scratch. (Book, video series)

Hello, I recently got into circuitry design after playing a simulator and am currently working towards creating a turing complete computer in that simulator. It has a path that you follow, from creating the basic gates to creating the memory and adder components but it explains very little of the theory behind the parts, how they work and why they work as they do. I managed to teach myself some boolean algebra to be able to do the ciruits im asked for but the bigger picture alludes me. As such. im searching for a good book or videos that explain how a computer works, in detail, starting from the simple logic gates, then building the more complicated components and eventually finishing with explanation of what turing complete actually means and discusses different types of computer architectures. I would be very thankful if you could share any sources that match my search criteria.

88 Upvotes

25 comments sorted by

View all comments

3

u/Poddster Aug 05 '24 edited Aug 28 '24

but it explains very little of the theory behind the parts, how they work and why they work as they do.

What is it you want to know exactly ? For this kind of question I always recommend Petzold's code as part of a stock answer, but I actually think you might simply be interested in how a transistor works, and therefore how we can make gates out of them? Petzold tends not to go into semiconductors, he sits at a higher level of abstraction, so it might not satisfy you. (But it's a fantastic book that you should read).

Here are some youtube playlists. You can watch all the videos, or if you just want to know about how gates are made, just look at the specific videos I mention. They get progressively more complex, so pick and choose.

3

u/No_Indication_1238 Aug 05 '24

Well, the simulator im playing simply introduces the components without much explanation. I had to google everything, from what is even a gate, to how do I even build the more complex gates alone without guessing (truth table to boolean algebra equation to simplified equation). Googling stuff is ok but having no structure makes it hard to grasp the bigger picture, for me. If there was a book that starts at the transistor level, explains logic gates, a bit of truth tables, boolean algebra and then builds to doing more complex calculations with adders, memory, etc and culminates into a working pc, that would be something I am looking for. Bonus points if it goes into different architectures and explains how the pc ends up reading and writing code. This is all included in the simulator track im following, I should end up making a whole pc, with some version of assembly that can code and run simple games. It simply has barely to any theoretical explanation of what I am doing or why. 

1

u/Poddster Aug 05 '24

If there was a book that starts at the transistor level, explains logic gates, a bit of truth tables, boolean algebra and then builds to doing more complex calculations with adders, memory, etc and culminates into a working pc, that would be something I am looking for. Bonus points if it goes into different architectures and explains how the pc ends up reading and writing code.

Petzold's Code will definitely help you here. It takes a more abstract approach at the start, but it will definitely teach you all of this stuff. There are books and text books that very literally do exactly what you want, but I don't really like them (e.g. "But how do it know?") or they're wrong for your level (e.g. "Computer Organization and Design")

nand2tetris is exactly what you describe, infact it's basically a better version of your simulator/game, but it's intended as a capstone course at university and so you've already covered these topics before you take this course. But the book does a decent job of explaining things incase you're unfamiliar with them.

to how do I even build the more complex gates alone without guessing (truth table to boolean algebra equation to simplified equation)

It simply has barely to any theoretical explanation of what I am doing or why.

Sometimes you don't need a book or a theory to explain things to you, you can observe yourself . As it's a game I imagine it's intended for you to figure this stuff out with logic rather than using more formula methods (e.g. truth tables and Karnaugh map). "How do I make an AND gate using these transistors?" doesn't always need pen and paper, you an just experiment, observe, and iterate.