Forgot your password?
Hardware Hacking Hardware

Mechanical CPU Clock 37

Posted by Soulskill
from the time-flies-when-you're-watching-ALUs-flipflop dept.
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"
This discussion has been archived. No new comments can be posted.

Mechanical CPU Clock

Comments Filter:
  • by Ellis D. Tripp (755736) on Monday April 16, 2012 @03:27PM (#39703007) Homepage

    Looks like he's trying to serve webpages with a mechanical CPU or something....

  • by Anonymous Coward on Monday April 16, 2012 @03:38PM (#39703113)

    Are you still listening? This is something I would watch on Slashdot TV.

    • Re: (Score:2, Insightful)

      by Anonymous Coward
      YES!!! Yes Yes yes! Perfect example! Mods, pay attention!
    • by Ihmhi (1206036)

      Whoa, what if they, like, did an Ask Slashdot about stuff we wanted to see, and then they like, showed it to us, man? That's so Web 2.0.

  • That was fast.
  • by Talennor (612270) on Monday April 16, 2012 @04:27PM (#39703715) Journal

    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).

    • by Anonymous Coward

      >> But it's only as close as most car metaphors

      So you're saying it's like an alternator?

  • by Hentes (2461350) on Monday April 16, 2012 @04:33PM (#39703783)

    If you use this mechanical CPU to implement a clock, then how do you implement the clock of the CPU?

  • by yndrd1984 (730475) on Monday April 16, 2012 @05:49PM (#39704627)

    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?

    • Re: (Score:3, Insightful)

      by lelazary (2619181)
      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
      • 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.

        • by lelazary (2619181)
          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 [] 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 branc
      • 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 und

    • 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 not the model of a generic programmable CPU but of a purposebuilt circuit. He just used assembly logic during the planning.

  • by GrahamCox (741991) on Monday April 16, 2012 @08:36PM (#39706241) Homepage
    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.
    • by lelazary (2619181)
      Its a bit more then a counter and an AND gate, since its also needs to check if a value is equal to a number and branch based on that (so it has a one bit program counter). You can also say that a CPU is nothing but switches, or atoms. It is the level of abstractions that give meaning to the physical properties. This particular "computer", could also be reprogrammed by reconfiguring the registers. However, the programing is done by changing the tracks or the flip-flops (see digi-compII or my tutorial on ww
  • by Pokeadot (81723) on Monday April 16, 2012 @08:48PM (#39706333)

    Reminds me of the Digi-Comp II that I had as a kid. It had the same rocker type mechanisms which simulated registers. See: ""

    • by cellocgw (617879)

      My thoughts exactly. I remember the Digi-Comp as my first foray into machine-language programming :-)

  • The design is hosted on thingiverse: []
  • it is the vibration of the quartz crystal that generates the clock frequency.... []

"Text processing has made it possible to right-justify any idea, even one which cannot be justified on any other grounds." -- J. Finnegan, USC.