Machines of Paper and Wood
October 20, 2011 11:49 AM Subscribe
Building a Computer 1: Numerals - recently my kids have been asking me about how computers work. I like to give in-depth answers to such questions, so we set out on a quest to understand how they work... Follow-up parts 2 3 4 5 6 7 8 9 10 11 12 13 14 15.
I wish we had computer classes like this when I was in school.
posted by brenton at 12:22 PM on October 20, 2011
posted by brenton at 12:22 PM on October 20, 2011
My undergraduate engineering program requried a digital engineering class which started from a very similar place - develop binary numbers, develop binary adding, etc. etc., but it was all in software. As a mechanical engineer and a visual/tactile learner, it definitely would have been nice to have some mechanical computers to play with during those first couple of weeks!
posted by muddgirl at 12:36 PM on October 20, 2011
posted by muddgirl at 12:36 PM on October 20, 2011
Cool dad is cool!
posted by bicyclefish at 12:38 PM on October 20, 2011
posted by bicyclefish at 12:38 PM on October 20, 2011
Whatever you do, never give your children a functionally-complete set of logical connectives. Such a course of action can only lead to disaster. Give them a nice ∨, or perhaps ¬, but not both at the same time. And never, ever, let them near a Sheffer stroke.
posted by qxntpqbbbqxl at 12:44 PM on October 20, 2011
posted by qxntpqbbbqxl at 12:44 PM on October 20, 2011
This can only end in Dwarf Fortress.
The singularity will come about when someone manages to simulate Dwarf Fortress inside of Dwarf Fortress faster than real time. Mark my words.
posted by qxntpqbbbqxl at 12:45 PM on October 20, 2011 [2 favorites]
The singularity will come about when someone manages to simulate Dwarf Fortress inside of Dwarf Fortress faster than real time. Mark my words.
posted by qxntpqbbbqxl at 12:45 PM on October 20, 2011 [2 favorites]
Most small children come equipped with ¬ by default, in my experience.
posted by Wolfdog at 1:09 PM on October 20, 2011 [2 favorites]
posted by Wolfdog at 1:09 PM on October 20, 2011 [2 favorites]
Magnificent.
In answering questions from friends about computers work, I've often been painfully aware about how many years of college level education I hand-waved over with my answers. Recently somebody asked my about Tor and onion routing. My answer took less than one minute, and the concept was understood. Now start with ones and zeroes, a pair of copper wires, and two computers, and work yourself up to onion routing, going over *every* *single* *detail* along the way - how many hours have you been talking?
posted by DreamerFi at 1:19 PM on October 20, 2011 [2 favorites]
In answering questions from friends about computers work, I've often been painfully aware about how many years of college level education I hand-waved over with my answers. Recently somebody asked my about Tor and onion routing. My answer took less than one minute, and the concept was understood. Now start with ones and zeroes, a pair of copper wires, and two computers, and work yourself up to onion routing, going over *every* *single* *detail* along the way - how many hours have you been talking?
posted by DreamerFi at 1:19 PM on October 20, 2011 [2 favorites]
Most small children come equipped with ¬ by default, in my experience.
Only the boys.
posted by Crabby Appleton at 2:18 PM on October 20, 2011 [3 favorites]
Only the boys.
posted by Crabby Appleton at 2:18 PM on October 20, 2011 [3 favorites]
I took a class that used The Elements of Computing Systems as a textbook. It was one of the best classes I ever took.
It followed more or less the same progression as this blog, going from binary numbers to a full CPU. Later, with a group of friends we built a 4 bit ALU, using simple integrated circuits, the ones that come with 8 AND gates or 4 NANDs, and a clock. It the 4 of us took around 40 hours to build it, 320 man-hours. It was an awesome experience.
I recommend the book or something similar to anyone who is interested in computers.
Now I work programming computers in high level languages. I understand computers both from a dopes silicon and a high-level programming point of view. I am missing the stuff at the middle, compilers and interpreters.
posted by Ayn Rand and God at 3:36 PM on October 20, 2011 [3 favorites]
It followed more or less the same progression as this blog, going from binary numbers to a full CPU. Later, with a group of friends we built a 4 bit ALU, using simple integrated circuits, the ones that come with 8 AND gates or 4 NANDs, and a clock. It the 4 of us took around 40 hours to build it, 320 man-hours. It was an awesome experience.
I recommend the book or something similar to anyone who is interested in computers.
Now I work programming computers in high level languages. I understand computers both from a dopes silicon and a high-level programming point of view. I am missing the stuff at the middle, compilers and interpreters.
posted by Ayn Rand and God at 3:36 PM on October 20, 2011 [3 favorites]
Neat! Related: Teaching kids binary using the Socratic method
posted by Tom-B at 4:00 PM on October 20, 2011 [3 favorites]
posted by Tom-B at 4:00 PM on October 20, 2011 [3 favorites]
Oh mean - I tried to write a binary tutorial back in late 97/early 98.
Here's the Reocities archive of it. Yes, the obligatory black background. And yes, if you know me, you know that nothing else ever came of it, despite my grand plans for such a thing.
posted by symbioid at 5:01 PM on October 20, 2011
Here's the Reocities archive of it. Yes, the obligatory black background. And yes, if you know me, you know that nothing else ever came of it, despite my grand plans for such a thing.
posted by symbioid at 5:01 PM on October 20, 2011
Speaking of building circuits from the ground up and books there's the book Code by Charles Petzold that really gets into the details, I think.
posted by symbioid at 5:03 PM on October 20, 2011 [1 favorite]
posted by symbioid at 5:03 PM on October 20, 2011 [1 favorite]
DreamerFi: Now start with ones and zeroes, a pair of copper wires, and two computers, and work yourself up to onion routing, going over *every* *single* *detail* along the way - how many hours have you been talking?
Oh I'll play, I'll play!
1. Ones and zeros.
2. Basic arithmetic (what we see in the videos, multipliers).
3. Basic logic gates. (AND, OR, XOR, NOR)
4. Compound logic (using gates in concert)
5. Memory (to store the results of logical operations)
6. Turing machines 1 (fundamental computer operation, a roadmap of what's to come)
7. Turing machines 2 (relating what came before to elements of the Turing machine)
8. Memory addressing
9. Instruction sets
10. Machine code programming.
Now that we're here we've got everything we need to make a basic computer. I'm not up on onion routing, so let's assume a like number of steps. 20 steps x 1 minute would be 20 minutes, but I think there was probably some unique combination of audience and speaker that made it easier for you to communicate it, and taking all this stuff in at once would require breaks at least. So let's assume 5 minutes per topic. 20 items x 5 minutes is 100 minutes, an hour forty. Note that this is just to cover the basics, not to actually be able to construct each of these things.
Ayn Rand and God, I remember loving the Computer Archetecture class I took back at college too. My class project was to construct a 4 bit multiplier our of wires and logic gates. I'm currently jazzed up to play around with Arduino, but I don't have the time or money to get into that right now.
I was going to explain the basics of compilers and interpreters here for you, but I don't really have the time for it right now. Simply, in an interpreter you read in the source file into a form of bytecode, which you then interpret. You're basically doing in software what you did in hardware. For a compiler, you just interpret it into actual machine code -- either by inlining the actual instructions, or maybe including a certain basic run-time library which you can JSR many of your instructions into.
posted by JHarris at 5:07 PM on October 20, 2011 [2 favorites]
Oh I'll play, I'll play!
1. Ones and zeros.
2. Basic arithmetic (what we see in the videos, multipliers).
3. Basic logic gates. (AND, OR, XOR, NOR)
4. Compound logic (using gates in concert)
5. Memory (to store the results of logical operations)
6. Turing machines 1 (fundamental computer operation, a roadmap of what's to come)
7. Turing machines 2 (relating what came before to elements of the Turing machine)
8. Memory addressing
9. Instruction sets
10. Machine code programming.
Now that we're here we've got everything we need to make a basic computer. I'm not up on onion routing, so let's assume a like number of steps. 20 steps x 1 minute would be 20 minutes, but I think there was probably some unique combination of audience and speaker that made it easier for you to communicate it, and taking all this stuff in at once would require breaks at least. So let's assume 5 minutes per topic. 20 items x 5 minutes is 100 minutes, an hour forty. Note that this is just to cover the basics, not to actually be able to construct each of these things.
Ayn Rand and God, I remember loving the Computer Archetecture class I took back at college too. My class project was to construct a 4 bit multiplier our of wires and logic gates. I'm currently jazzed up to play around with Arduino, but I don't have the time or money to get into that right now.
I was going to explain the basics of compilers and interpreters here for you, but I don't really have the time for it right now. Simply, in an interpreter you read in the source file into a form of bytecode, which you then interpret. You're basically doing in software what you did in hardware. For a compiler, you just interpret it into actual machine code -- either by inlining the actual instructions, or maybe including a certain basic run-time library which you can JSR many of your instructions into.
posted by JHarris at 5:07 PM on October 20, 2011 [2 favorites]
I once designed (but never built) a computer based on 7400 series MSI IC's. The exercise was enough to convince me that computers do not run on magic, which is probably what the OP's kids are trying to determine.
I would put the steps in this order:
You now have all the conceptual tools to build a PDP-8. And while modern computers are far more complicated, most of that is cruft piled on to make the basic design faster or more efficient. If you understand how a Volkswagen Beetle works, you know how a car works even if you don't know all the secrets of a Bugatti Veyron.
posted by localroger at 5:59 PM on October 20, 2011 [2 favorites]
I would put the steps in this order:
- Binary math
- And, Or, etc. logic functions and, importantly, multiplexers and demultiplexers
- Counters
- Adders. Adders are fucking magic.
- Static memory, treated as magic for now (the details will become clear)
- Using a counter as the PC
- IDEA you could use a multiplexer to break out part of the opcode returned from static memory to trigger various functions
- microcode and a microcode PC, with one of the microcode bits incrementing the real PC
You now have all the conceptual tools to build a PDP-8. And while modern computers are far more complicated, most of that is cruft piled on to make the basic design faster or more efficient. If you understand how a Volkswagen Beetle works, you know how a car works even if you don't know all the secrets of a Bugatti Veyron.
posted by localroger at 5:59 PM on October 20, 2011 [2 favorites]
Elements of Computing Systems looks 100% amazing. The book was on my reading list already, but I had no idea it had projects to build the hardware, write an OS, etc.
posted by DU at 5:39 AM on October 26, 2011
posted by DU at 5:39 AM on October 26, 2011
Update: TECS is amazing. I've already completed all the projects through chapter 5 and my 12 year old is working on chapter 4. I've already (re)learned several things I supposedly already knew and we are both having a great time.
posted by DU at 3:07 AM on November 6, 2011
posted by DU at 3:07 AM on November 6, 2011
« Older It took braaaaaaains. | Jonit: have the beat tell the story Newer »
This thread has been archived and is closed to new comments
posted by kaibutsu at 12:11 PM on October 20, 2011 [2 favorites]