Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
Hardware Hacking Toys Science

Lego Logic Gates 271

Thud457 writes "LEGO Logic Gates - It's like Babbage, but with bricks. All the gates except XOR are here, and he goes on to develop a clocked flip-flop. While practical mechanical computers may be out, even at the nanotechnological scale, nanomechanical memory may be in. "
This discussion has been archived. No new comments can be posted.

Lego Logic Gates

Comments Filter:
  • cool (Score:2, Interesting)

    by mirko ( 198274 )
    can one create robots with these or is it only to create simple electronic circuits ?
    I guess these could be combined with mindstorm, couldn't these ?
    • Re:cool (Score:4, Interesting)

      by mirko ( 198274 ) on Wednesday December 15, 2004 @07:14AM (#11091123) Journal
      I just realised : this doesn't use electricity, it's some mechanical representation of these electronic devices.
      I however think this still could be used in non electrical devices (quote any "infernal machine" here, like the one that get triggered after Indiana Jones picks a statuette)...
      • Re:cool (Score:2, Insightful)

        by Anonymous Coward
        Anything too complex would likely need so much force applied to make its state change that the lego would break first.
    • Re:cool (Score:5, Funny)

      by flumps ( 240328 ) <matt,corby&gmail,com> on Wednesday December 15, 2004 @07:24AM (#11091157) Homepage
      Have you seen the size of these things? Putting them in any kind of robot would be kinda stupid.

      "Here I am, brain the size of a planet...made out of lego.."

      I think you'd have more luck with the nano versions of these gates. But good luck trying eh :)

      • Re:cool (Score:3, Insightful)

        The trick would be programming it. You'd need some way of storing information. My thinking would be to use a chain with links denoting one and zero. Then you'd just need a mechanism to read and write the chain.

        And you never thought that automata class was going to come in handy ;-)
  • by Anonymous Coward on Wednesday December 15, 2004 @07:13AM (#11091120)
    'Tis but a small step to a 64-bit processor with 2 MB of cache. Of course, the bricks might burn up upon power-up, but it's a small price to pay!
    • by Idarubicin ( 579475 ) on Wednesday December 15, 2004 @02:03PM (#11094322) Journal
      Hmmm...3 GHz...

      Since the push/pull distance for the gate outputs described is about one LEGO stud length, or 8 millimeters.

      At 3 GHz we have a cycle every 3e-10 seconds (~300 picoseconds), and so a mean speed of 8 mm / 300 ps, or nearly 25 million meters per second. That's nearly 10% of the speed of light, so you're going to have to watch out for relativistic effects. :D

      I don't know the mass of the LEGO axles used in the figure, but if they're 5 grams apiece, then each would have a kinetic energy of about 1.5 terajoules. That's about the same as the kinetic energy possessed by a Nimitz class aircraft carrier travelling at 300 knots.

      If you think P4s have heat dissipation issues....

  • No need for XOR (Score:5, Informative)

    by Anonymous Coward on Wednesday December 15, 2004 @07:16AM (#11091126)
    XOR can be constructed by combining other gates. You acctually just need NAND-gates to be able to create any other gate or larger structure.
    • Re:No need for XOR (Score:4, Informative)

      by ricotest ( 807136 ) on Wednesday December 15, 2004 @07:27AM (#11091166)
      However, while NAND is the cheapest gate to make with silicon, it's quite a hefty Lego structure. So alternatives would be more desirable.
      • I thought it was NOR that was used in silicon. Am I confused or something?
        • If you are using static complementary CMOS logic, nands are cheaper. If you happen to be using an older logic family like NMOS or RTL logic, nor gates are cheaper. In any logic family, xor gates are quite a bit more complex than either.
        • I thought it was NOR that was used in silicon. Am I confused or something?

    • by Gopal.V ( 532678 )
      The road to hell is paved with NAND gates.

      -- /usr/bin/fortune
    • NAND isn't even needed for XOR, just NOT, AND and OR:

      A XOR B = ((NOT A) AND B) OR (A AND (NOT B))
      • While you're correct, I think that you (and the parent post) are missing the concept of a NAND gate. First of all, all you need is NOT and AND. OR can be constructed with them. Secondly, a NAND gate is a type of electronic gate that can be modified to become either a NOT or an AND. This brings down the cost of hardware considerably because you're only producing one type of logic gate. After the NAND gates are placed on the silicon they're burned so that each is either a NOT gate or an AND gate.

        As far
        • You are correct, but I am speaking from the computer engineering curriculum and XOR's are very important to us because we use them alot and the increase in hardware cost and footprint for having to substitute I mentioned in the grandparent instead of a single XOR gate is unacceptable. However, yes, a NAND in a more general logic design is pretty useful.
    • Re:No need for XOR (Score:4, Insightful)

      by Taladar ( 717494 ) on Wednesday December 15, 2004 @08:43AM (#11091353)
      With this being mechanical Gates suffering from friction using gates to emulate other gates isn't desirable.
  • Can it play .Ogg files?
  • by flumps ( 240328 ) <matt,corby&gmail,com> on Wednesday December 15, 2004 @07:18AM (#11091136) Homepage
    ... just as long as we don't get a little lego man instead of that bloody paperclip I don't really care
  • by Anonymous Coward on Wednesday December 15, 2004 @07:20AM (#11091143)
    Let us know when theres a NetBSD for it so we can build a LegoLAN
  • Mechanical Analogs (Score:5, Interesting)

    by nyekulturniy ( 413420 ) on Wednesday December 15, 2004 @07:22AM (#11091148)
    There may be no obvious immediate use for mechanical analogs of digital circuits, when digital circuits are orders of maginitude faster than mechanical circuits, but dismissing the idea out of hand reminds me of old scientists telling the newspaper that "There's no need for flying machines here!"

    Besides, a steam-powered computer would be really fun to build!

    • by Viol8 ( 599362 )
      I guess the best use of mechanical digital circuits would be if you don't care about speed but want something almost indestructable. Build the cogs out of titanium with teflon coating for lubrication and who knows what the possibilities could be. Just think of the dangerous places you could send a robot built out of this stuff. Output could be an issue though unless you have the thing wave little semaphore flags and some guy with binoculars notes them down!
    • by Ford Prefect ( 8777 ) on Wednesday December 15, 2004 @07:33AM (#11091190) Homepage
      There may be no obvious immediate use for mechanical analogs of digital circuits, when digital circuits are orders of maginitude faster than mechanical circuits

      If you scale things down a bit [], mechanical 'circuits' can become a lot faster - and combined with the electrical properties of the components there might be an interesting hybrid some point in the future.

      Still, using Lego is just a little insane, and there is the minor problem of a '1' or a '0' slowly degrading into '0.5's further along the Lego logic chain... :-)
      • If you scale things really down, you arrive to quantum mechanics [], and there things go really interesting (or will go, if we eventually get a scallable hardware candidate for quantum computing).

        By the way: a slash site on quantum computing: QubitNews []. Join us and discuss the computational platform of the future :)

      • by LWATCDR ( 28044 ) on Wednesday December 15, 2004 @11:48AM (#11092689) Homepage Journal
        "Still, using Lego is just a little insane,"
        actually it is very sane. It makes a great learning tool. I remember building simple logic gates with my radio shack electronics kit. This lets students build some simple logic "circuits" and see them work with there own eyes.
        Not to mention that mechanical skills in the US really seem to be going down hill. When was the last time you saw a kid build his own skateboard, tree house, or model airplane.
        • When was the last time you saw a kid build his own skateboard, tree house, or model airplane.

          Since before when lawyers encouraged anybody and their dog to sue the "evil companies" to get the "settlement you deserve." That, and the various "home owner associations" which placed strict rules on property improvement and usage.

    • by roxtar ( 795844 )
      There may be no obvious immediate use for mechanical analogs of digital circuits

      I think that they can be used to teach young children the basics of electronics. It will be fun as well as education.

    • "Besides, a steam-powered computer would be really fun to build!

      Build schmild... I would be really fun to operate!

      "More coal on the fire, Martha! I'm about ready to totally frag this noob!"
    • When my brothers physics professor first started studying physics his professor showed the class a transistor. "This is a transistor, it does this and that, but it will probably not be very useful." So, in 50 years we WILL have computers made out of Lego, right?
    • My old college had a steam powered computer

      - an Elliot 803 powered by a 3 cylinder marine compound, driven from the central heating boilers (North London Polytechnic in Hollway Road)

    • Brings to mind the book, "Souls in the New Machine" by Sean McMullen. ( Don't want to say more without SPOILERS, but it envisions a computer in the future where processing elements are slaves, and there's a darned good reason why it's not electronic.

      Also on the fringe, one story from "Tales of the Flying Mountains" by Poul Anderson. The computering technology on a warship is TEMM - Thermionic Emission Micro Miniaturized, selected for its radiation hardness. It turns out
      • I've read Souls in the Great Machine, and its sequels, The Miocene Arrow and Eyes of the Calculor, and I thought they were all three really good. If you have ever read Dune, Butlerian Jihad (approved by the estate of Frank Herbert), you will find some other interesting human-powered computation. Also, The Difference Engine by Gibson and Sterling is a great book about mechanical steam powered computing. (i.e. if Mr. Babbage had successfully built the Analytical Engine, the industrial revolution and the in
    • It's knowledge. If your componenets are limited to mechanical, you have an edge over someone else. The simplest I can think of, are locks. If you wished to have a two key system where both keys match, one of these mechanical gates would work well. No electricity required.
    • > Besides, a steam-powered computer would be really fun to build!

      Are you nuts? Valve's [] DRM system eats up 25-30 megabytes even when HL2 isn't running. Do you have any idea how much Lego costs these days? :)

    • There may be no obvious immediate use for mechanical analogs of digital circuits

      Actually many people believe that rod computers are the way of the future. Miniaturized to an atomic scale, of course.

      If you google around you can find a paper from a few years ago that discusses one possible configuration for such a computer, right down to molecular structures and the thermal tolerances of the system!

      The only thing this guy DIDN'T figure out was how to build the bloody thing!
  • Dudududupe (Score:3, Funny)

    by Repugnant_Shit ( 263651 ) on Wednesday December 15, 2004 @07:23AM (#11091152)
    Next, CmdrTaco will build a duplicate article out of Dupe-lo blocks!
  • "The previous bandwidth issues should be solved now that I have a new server." ...or not...
  • Well , kind of inevitable really.
  • Before you read on, if you have had trouble accessing this page then please accept my apologies. The previous bandwidth issues should be solved now that I have a new server.

    That is, until /. arrived....5:30am and the site's already running slow. How much longer you think it will hold up?

  • Imagine (Score:2, Funny)

    by Anonymous Coward
    .. a Bionicle cluster of these ...
  • by goldcd ( 587052 ) * on Wednesday December 15, 2004 @07:42AM (#11091211) Homepage
    and projected power decimated."
    A spokesman said Steve would only use the white bits of Lego.
  • Competition (Score:2, Funny)

    by anum ( 799950 )
    How long will we have to put up with this LEGO monopoly? Will Megablox answer this challenge? That upstart Knex, perhaps?

    Back in my day we had to build our mechanical analogs of digital circuits out of Tinkertoys! And we liked it! What's this new fangled "plastic" stuff anyway. Wood! that's the way to go.

    On a slightly more serious note: If we had built some of these in my CS3?? class instead of just diagraming them on paper I might have paid more attention. But I doubt it.
  • I would love to play with logic gates like these. Trying to create early computers, or just a simple "addition machine" with a series of logic games would be of immense intellectual interest.

    *But* physical stuff is a pain; has anyone put together a program that allows me to simulate basic electronic gates, and "build" these things. It would help me understand a lot better how computers' internal logic work.


    • by a24061 ( 703202 ) * on Wednesday December 15, 2004 @08:22AM (#11091299)
      If you mean software to simulate building digital circuits out of gates, look at TKGate [].
    • what's wrong with using the contructs in most programming languages? | & ^ etc.
  • Speed? (Score:3, Funny)

    by the_Twisted ( 838440 ) on Wednesday December 15, 2004 @07:59AM (#11091252)
    At how many (K)hz will this thing operate when it's finished? How many FLOPS will it achieve? Could you overclock it by adding oliveoil to the gears?
  • by Jude T. Obscure ( 721864 ) on Wednesday December 15, 2004 @08:00AM (#11091254)
    Have a look - it's identical [].
  • by Fleetie ( 603229 ) on Wednesday December 15, 2004 @08:29AM (#11091322) Homepage
    There is much friction inherent in these, and as shown, no "gain stages" to overcome these losses. So the "fan-out" would be appalling as implemented here. This would preclude their use to build anything other than the simplest logic constructs. However, I think it would not be too hard to add "gain stages" to act as "buffers", which could, for example, use falling weights to act as "supply rails" to increase "fan-out", thereby facilitating construction of far more complex circuits. Martin
    • falling weights? (Score:2, Insightful)

      Why not drive the clock at various stages and take some power out of it.
    • I think a more realistic version would have each gate draw power individually from a main rotating shaft, whichc would double as clock.
      Much like a machanical cash register.

      It might also be possible to come up with even simpler designs if the gate is powered: the swithching could depend on pushing unstable systems in one direction or the other. This would obviate both the need for precisely metered responses, and reduce the needed power on the inputs, thus improving fan-out.
  • A couple problems. (Score:5, Interesting)

    by PenguiN42 ( 86863 ) <taylork.alum@mit@edu> on Wednesday December 15, 2004 @08:54AM (#11091375) Journal
    As another poster mentioned, there's no gain in these devices, so after a few stages of friction loss and imperfections in the mechanisms, the whole thing will lock up. Electronic gates have inherent gain, and thus are resistant to noise and slight differences between gates.

    Another problem is the way his clock works -- the clock has to go to zero before the set or clear bits can change. This won't happen in a real circuit -- generally everything changes just after the clock rises. One solution is some sort of two-phase system, where alternate flip flops use the rising and falling clocks, but I'm not sure how much this would limit the circuits you can build.

    He mentions that "It is possible to build an edge detector for the clock signal. It requires a few more NAND gates. The advantage of doing this is that it no longer matters when the clock signal goes back to 0 and the indeterminant state is avoided." But I want to see it in action before I believe it.

    Giving the gates gain may be possible, too, but it would require powering each gate, either with electrical power or some sort of funky mechanical setup.
    • by RPI Geek ( 640282 ) on Wednesday December 15, 2004 @10:44AM (#11092052) Journal
      Giving the gates gain may be possible, too, but it would require powering each gate, either with electrical power or some sort of funky mechanical setup.

      When I read the title of this article, I tried coming up with a design in my head of how I would do this, and my idea is to make the clock pulse out of a rotating shaft with cams (easy enough for Lego pieces). The cams are what would actually power the pieces, thereby eliminating the effects of backlash and fanning. The only problem comes with a lack of torque, but it would be easy to simply tie in more motors (or more hand-cranks) to get more power down the line. I think that this is a more elegant solution than having a person manually slide a shaft back and forth for the clock pulses.
    • As another poster mentioned, there's no gain in these devices, so after a few stages of friction loss and imperfections in the mechanisms, the whole thing will lock up.

      Maybe mechanical gain could be obtained from a pulley-weight-escapement mechanism, like the one from the Lego grandfather clock [] ? Each state-change of an output rod might allow the escapement to turn a notch and provide extra power (so the input rods aren't under any extra load).

  • .... Means, like what already has been said, that after a few gates, the movement (and therefore the on/off state) deteriorates to nothing. However, this is exactly what would happen in an electronic circuit, if said circuit was built like this (Inputs and outputs only, no Power). Now I'm wondering, if it is possible to add a third rotating input to the gate, for power, so the logical output was of the same (or better quality) of the inputs....
    • no but using springs would. the toggle state could be built so that the output has two helper springs that resist state change unles they are acted upon by a reset lever. trigger the gate and the output lever get's snapped into position with the help of the spring and the only mechanical advantage over that spring is the reset bit that is sent before every state change.

      add the input to also have a spring to help avoid partial detection and you are closer.

      problem is that you now need a stronger clock to
    • Ok, off the head design .... (I'll have to get some Lego).

      1) Rotateing axle power input into gate, with medium cog rotateing freely...

      2) Axle for logical output... with medium sized cog near to power input cog, but not connected

      3) Power input is coupled to logic output via fairly loose rubber band - output will turn in unison with power input, with no other parts added.... both input/output cogs will be turning same direction

      4) Add one logical input.... This will be connected via rubber band to a mecha
  • My wife's 1881 pump-organ has a patent for its arrangement of knobs that control the various sound-modifying apertures. They didnt have names for these concepts at the time, but looking it over with a modern eye, one can see it includes AND gates, OR gates, and open-collector wired-OR pullups, all made out of wooden rods and leather straps.
  • Electrical gates have an inherent gain in that they all use transistors, with the inputs to the gate being inputs to the transistors, and the outputs of the gate being whether or not the transistors flip on, allowing power to come from a power source to the output of the gate. This is why electrical gates all require an always on power input, sort of thing. But it avoids the whole friction/power loss problem.

    If he built a switch (kinda like a transistor) out of LEGO and then used a motor to provide the pow
  • Before you get all enthused about nanotech mechanical computers, pls consider:
    • The mass of a gate goes down as the cube of its linear dimension, while effects like friction and surface tension and static electricity only go down as the square. So if you make a lego gate 1000 times smaller, it only weighs a billionth as much. That's good. But it has only a millionth the surface area, which is bad, proportionally. It is 1000 times more bothered by friction, surface tension, and static. That's very bad
    • > There's nothing like WIRES that can carry mechanical motion
      > without lots of mechanical inertia.

      Actually, *that* particular problem could be addressed by making use of hydraulic fluid lines.

      Actually, that might also solve the amplification problem, the same as the master cylinder / brake cylinder in a typical piston (disc) brake system. Although 1LOTD tells me I'm missing something, because that sounds suspiciously like free energy. :)

      It *does* mean at the very least that buffers could be built
  • before I read the Fine Web Page in Google's cache, was a logic board with individual gates housed on standard lego pieces. You'd build your circuit by placing the lego pieces on a lego board.

    I'm not sure how the traces between the pieces would work, but legoCAD would be fun, like those 10-in-1 electronics kits from Radio Slack.
  • The work depicted in TFA seems awfully similar to the rod logic found in Neal Stephenson's book Diamond Age. This begs the question, is Neal a prophet? Has he foretold the future? Will I be getting my pizza in thirty minutes or else the Mafia comes and apologizes personally?

    Only time will tell. Until then, I have to thank this lego-builder for making my life more interesting. Now I know what I'm gonna do for Christmas, play with Legos and make logic gates!

    Lord, I'm such a geek.
  • by pclminion ( 145572 ) on Wednesday December 15, 2004 @12:59PM (#11093513)
    Although I find this cool from a purely geek standpoint, and while I realize that the guy probably doesn't intend this as a practical device, I can't help but wonder... WHY use a binary representation?

    With electronic computers, binary makes sense. A capacitor is either charged, or not charged. A transistor is either conducting, or not conducting. It's HARD to make electronic devices with some fixed number of states other than two (let's disregard analog computation, with its infinite number of states, for now).

    Yeah, this thing is like Babbage's machine in the sense that it computes mechanically, but Babbage's machine wasn't binary. It's EASY to make multi-state mechanical devices.

    We shouldn't let our current computer technology make us too narrow-minded when designing new computer technologies. Binary representation is no Holy Grail, it's merely a convenience in the world of semiconductor electronics.

    • > It's EASY to make multi-state mechanical devices.

      Yes, but his representation for digits were the concepts "push", and "pull". It's a LOT easier to build a mechanical device which knows the different between "push" and "pull" than it is build one that knows about 10 different dowel positions.
  • Legos? pfff (Score:2, Funny)

    by Tablizer ( 95088 )
    I found a new device, the vacum tube, to be about 60% cheaper and faster than Legos. They are gonna make me rich, I tell ya, rich!
  • by sgage ( 109086 ) on Wednesday December 15, 2004 @02:10PM (#11094415)
    When I was a kid back in the 60's, I had a toy mechanical computer called 'Digicomp'. It was a funky conglomeration of springs-and-rods-and-plastic-things that you built from a kit, and programmed it by putting little pieces of tube over various tabs to affect the flip-flops.

    To operate it, you pushed a sliding thing in and out (a clock cycle). You could add and subtract and multiply and divide in binary, albeit rather small numbers. Hard to describe this thing, but it was very cool!

    Actually, the following year I got Digicomp II for Christmas, which ran by letting a stream of marbles flow through it by gravity, and these marbles toggled the flip-flops. Very cool again!

    These toys came with excellent little books on Boolean Algebra, and sure taught me a lot about the interface between binary math and physical things. I felt right at home when I started programming 6502's and Z-80's in machine language back in the day...

    Are these things, or anything like them, still around?

    - sgage

Adding features does not necessarily increase functionality -- it just makes the manuals thicker.