Mechanical CPU Clock
An anonymous reader writes "I designed this CPU clock to help people learn about how a CPU works. The Mechanical CPU Clock shows the basic building blocks of a CPU (ALU, buses, RAM, registers, and a Control Unit). It executes a set of instructions which will emulate a simple wall clock. A detailed build/explanation is available on instructables.com."
Looks like he's trying to serve webpages with a mechanical CPU or something....
Remember "News for Nerds, Stuff that Matters"? Help make it a reality again! http://soylentnews.org
Are you still listening? This is something I would watch on Slashdot TV.
http://www.youtube.com/watch?v=0H4LTOYpAM4
Join the Slashcott! Feb 10 thru Feb 17!
That was fast.
Occasionally living proof of the Ballmer peak.
She sent it back. It was too small. Don't use your own as a life sized model.
So this is a neat counter. But it functions nothing like a CPU. The article tries to describe some instruction set, memory, bus, and registers. But it's only as close as most car metaphors (really off the mark).
//TODO: signature
If you use this mechanical CPU to implement a clock, then how do you implement the clock of the CPU?
I have always been wondering why my CPU would make some "clonk" noises every so often, now I know it is because of the ball. Thanks.
I breadboarded a digital wall clock (typical 24 hr cheapo alarm clock circuit) in high school. It's just a bunch of decade and divide-by-six counters, the only real trick is getting a solid 1hz timing signal. Which isn't really a trick, but I'd just used the built-in freq generator in the breadboard trainer, and didn't roll my own with a 555.
The fun part, was I hooked it up to an old magnetic-dot bus-sign I'd rehabilitated. It looked pretty funkadelic when it was all done.
But anyways, I followed this instructible called a 'schematic' and there are plenty of those out there.
Brilliant work, but I find his terminology confusing.
From what I can see, there's really only one register - since the "registers" are linked, he can only store a 4-bit number (plus an instruction counter in the form of the track "flag"). "Register B" is really an instruction to clear both the register and the instruction pointer, and "'registers A&C"' are really an [inc A, if A<11 then IP=0 else IP=1] instruction. From this perspective, it's a two-instruction, one-register machine.
I only did that because I just couldn't get nine instructions and three different registers from watching the device function.
Am I the only one to see it that way? Are both ways (at least partially) valid?
You are right. The [inc A, if A11 then IP=0 else IP=1] is actually one instruction that was optimised after the first prototype. Originally I had these as separate registers with three other flip flops at the top for the program counter. However, I noticed that I can remove that (which made the clock simpler and more compact) if I combined both instructions together and only use one ball drop for the inc and check. I would love to figure out other ways of explaining this to people who don't even know there is a CPU in a computer. So any suggestions are welcome.
It just looks like a divide by 12 counter to me. All it does is takes the clock signal and makes it happen 12x less frequently. I don't see how it could be considered a cpu at all.
Mechanically it a very cool toy, but when trying to use it to explain the inner workings of a cpu it kind of falls flat.
It's neat and nicely implemented, but it's not emulating a CPU at all.
Instead, what he has made is a 4-bit counter with an AND gate to detect the count of '11' which then resets the counter. The minutes are given by the position of the ball bearing in the outer rotating ring, so the timing of the system derives from the rotational speed of this, which presumably is driven by a motor (stepper?).
The wires linking the gates are not a bus, but are equivalent to the wiring between gates. What we have here is a 4-bit counter and AND gate.
There is no stored program and the configuration of the "ALU" cannot be changed and so by any definition, this is not a computing machine.
Reminds me of the Digi-Comp II that I had as a kid. It had the same rocker type mechanisms which simulated registers. See: "http://www.oldcomputermuseum.com/digicomp_2.html#"
It's not the model of a generic programmable CPU but of a purposebuilt circuit. He just used assembly logic during the planning.
The design is hosted on thingiverse: http://www.thingiverse.com/thing:21494
You guys are missing the point. Its not meant to be a CPU and run Doom, but meant to explain the inner working of a CPU to a layman.
it is the vibration of the quartz crystal that generates the clock frequency.... http://en.wikipedia.org/wiki/Quartz_clock#Mechanism
Your optimization kind of ruined the 'its a CPU' aspect, don't you think? It looks more like a clock inspired by how CPU's work now.
A libertarian shat on my carpet once. Claimed the free market would sort it out. -Ford Prefect(8777)
I think it would just confuse more than anything.
I agree. The main driving force was size. Implementing a full general purpose CPU takes allot of room using ball logic (even more then using relays, because of gravity). This makes the CPU very tall (see http://brain.wireos.com/?p=2226 for how to implement ROM,RAM and other gates). I originally started by trying to implement a mechanical binary clock, but it became challenging when you need to count to 12 and not to 16. So I used the concepts of a CPU (in particular a program counter, comparisons, and branches). I actually started with the assembly language program and programed it mechanically. However, I believe that this clock can still be used to explain what is inside a CPU (even though its seems confusing). Due to the mechanical nature of the clock, it makes people (not computer scientists) believe that they have the potential of understanding it, so they try. Try that with a silicon blob and a schematics, people loose interest very quickly.
As long as you're accepting suggestions (this is more or less unrelated to the CPU itself), you can't see the "minute" position for ~50% of each hour. Why not lengthen the arm, add a 3rd magnet, and put a 2nd steel ball in its own track to mark the minutes? (and move the engraved numbers outward)
Here's a suggestion, don't use an arcane mechanical form of logic as an explanation. I design digital logic in chips for a living and this confused even me.
It sounds like you're just implementing a counter with a 4 bit register to decode the hour. The value input to the register is either the current value plus one or 0 if the current value is 4'hB (or 0xB for software guys). This is literally a 4 bit register, incrementing adder, comparator and a mux or two. Draw a block diagram of that and people will understand a lot better, although it won't be as exciting because this is really just a tiny "circuit" which has nothing to do with a CPU. There's no fetch, decode, memory etc.
Re-label as: interesting project implementing simple ASIC using mechanic parts. I thought the most interesting thing about it was the flip-flops that actually flip-flop.
You guys need to define a CPU first before exclaiming its not a CPU (just brush up on your CS). It is a Turing Machine and therefore a computer, which is useful in explaining a CPU. It might not be a CPU, based on the definition of a Universal Turing Machine (UTM). A UTM is capable of simulating every possible Turing Machine, so you will need to prove that the instruction set can not do that. This is not that easy: see http://en.wikipedia.org/wiki/Wolfram%27s_2-state_3-symbol_Turing_machine