This is fascinating! Maybe try to enhance the rigidity of the structure and make the i/o more visible. Amazing idea on mechanical logic circuits overall and i’m pretty sure you are the first to build it in lego.
Yep, I wanted to show the boolean values a bit better through editing, but I barely had time today. But you're right, you could pretty simply add levers to make it less confusing...
For these designs, yes "you'd need an environment without friction, bending and 'wiggle'-room". To overcome this, one would need to find a way to input energy into this system (this is how transistor-based computers work -- quantum is a bit weirder). If you could make a buffer that drives the output with more force than was needed to drive the input, then we might be in business!
@@in1 I have no idea how this works, not how to build it, but this dude from 9 years ago managed to make one ruclips.net/video/7EPrSJ242hI/видео.html , it inverts the output but that’s a simple fix
For people who doesn't understand: these are the same logic gates used by your ALU (Arithmetic Logic Unit) in your CPU which is in your computer/device.
What I did for a XOR gate was two gear racks driving either side of a differential and the differential drove an eccentric mechanism so when you push one gear rack it turns the diff independently of the other gear rack and when you turn the eccentric mechanism 180 degrees it pushes out, and 360 degrees pulls it back in, assuming each gear rack turns it 180 degrees.
I think there was a Knex computer, and Nico71 made a replica of a toy computer. And that's just toys, people have also built computers using hydraulics, steam-engines, biology as well as several other technologies. And really computers can be a lot simpler than some people may think. There's a great book/course on it called something like "NAND to Tetris" I think? It does a really great job of bridging the gap between these basic principles and modern computing. That said, it's not everyday you see a video on Lego logic gates so kudos for that!
I find it fascinating how anyone can create a comptuer from scratch. Well, that is definitely simplifying it a lot. But the concepts you build up are simple. Create things that can replicate the truth tables of logic gates, then just follow a diagram on how they are connected to make, idk, an adder. You can create a computer with anything from water to Minecraft redstone, lego to mechanical gears.
As you were building the OR gate, i had the thought of using NOT gates and a AND gate to make a OR gate. Just put NOT gates on the I/O of the AND gate and you have a OR gate. This could also work the reverse on OR gates to make AND gates
No, You wouldn't have an OR gate by negating AND's output. From one of De Morgan's laws: ~(p ^ q) ~p v ~q. (Not (p and q) holds if and only if not p or not q holds.) The logical gate NOT + AND is known as NAND.
Honestly i think working with gears is easier since you can make a transistor out of 3 gears (the input, a movable one and the output.) The input must be spinning (represents the current in a transistor) So if you move the middle gear in-between the in- and output gear, it should work.
I thought about working with rotation, but the problem is, that it's pretty hard to convert rotational into mechanical motion without stopping the rotation. Thanks for the idea though!
@@in1 rotation could cause another gear to move along a track thus translating the rotation into mechanical motion as the second gear moves, or maybe the first gear causes the track to move thus making a piece attacked to the track move?
@@namedindividual3131 That's right, but at the end of the gear rack the gear would stop and you couldn't turn it anymore. If I work with a rubber band and a friction clutch, there would also be a lot of friction, because the rubber band has to be strong enough to pull the gear rack back when the motor is off. Because of that, the friction of the friction clutch has to be big and that's not really good for the motor and the friction clutch...
Cool, very cool. Not sure if the same holds true now, but when I was at school in the ‘90s it was cheaper in the semi-conductor world to make NAND gates, and every other gate was made from a combination of NANDs. It would be very interesting to see that makes out of Lego too!! :)
This is so cool!! I was quite interested in this, but then hit a wall after I couldn't quite get it to work. Your mechanisms are very very cool and I might have to take some inspiration... :)
You'd probably need some kind of repeater for a full adder, like a servo motor... For a half adder you would just need to take an output from the first and-gate in the xor-gate and together with the output of the xor-gate it's a half adder
Those are some nice looking logic gates, but I believe it is not possible to build a computer out of them. The output of one logic gate needs to push at the input of the next gate. The mechanical power required and the manufacturing tolerances keep adding and just after a few gates, it just gets stuck. If you look at electric or electronic logic gates, they don't just have their 2 inputs and 1 output, they are also connected to a power source; it doesn't show up in diagrams for simplicity. The power at the output does not come from the inputs, it comes from the power source and the inputs just decide if it goes through or not. And that is how I believe mechanical logic gates need to be build.
Yeah, it's definitely not a practical solution. The easiest way to solve this is probably some kind of repeater with a lever and a servo between every component, but there are obviously other issues like size and reliability.
For those people wondering what the and gates are im pretty sure they're gates for electricity to pass through in a computer they're called transistors I believe idk where they are but I'm pretty sure they're very small I heard cpu has like a billion transistors so that means it has a billion types of gates or same gates
I really got confused. He stated in the beggining that a false output is a long bar and true ouput is a short one. Right after, he builds a NOT and the input has the same length as the output.
The definition is kinda unclear, you are right. What I wanted to say is that True is the position away from the input and False is the position closer to the input
Nice with a proof of concept :) You could have built a bunch NAND gates (or a NOR) and make every other gates from that gate. A basic task in a digital electronic course at high school or similar.
Thanks! That's right, but I obviously wanted to keep it at least a little bit compact (you probably see, that the last one is already huge). It could be, though, that using nor gates would make it a little bit better, because the and-gates aren't perfect.
This would be more viable if you were able to make it more modular and maybe keep each gate within a rigid frame piece. Maybe a 7x11 technic frame piece sounds like it’d be a good size. Plus having them be modular means it’s easier to connect them in sequence AND you avoid using universal joints to connect axels that don’t line up, because that significantly reduces the transfer of force from one output to the next input which increases the force required on the starting inputs to carry signal through to the final output. Also the off center axels will tend to have a little give so at some point when not enough force makes it through the gates it’ll just compress instead of transferring the force and you’ll drop signals…
Yep, that's right, it could be hard to put an and-gate in there though. The universal joint definetely wasn't the best solution, but you have to consider that the modules have 2 inputs and 1 output, so you can't always line them up. My solution is not better though, even the xor-gate barely worked...
I have a suggestion, but decided to design it myself. Bottom of comment has an Imgur link. I think you would be better off unifying them with a similar body, which could be switched as needed, and mounted onto a sturdier surface. At first I though Part#64179 would work, and it's easily large enough for an OR gate, but clearly wouldn't fit a NOT gate, or an AND gate. So I bumped them up to a Part#39794. -The Or gate is very simple, and was the first one I had done. -The Not gate is just the same design as shown here, but housed in the better frame. -I cannot guarantee the AND gate's functionality, for I have no way to test it's mechanics. If I did it right, the triangle will tilt 1 way or the other if only 1 is pushed, and will push forward when both are pushed. There might be a way to do it with Part#10288 but I didn't want to push my luck trying to fit all the angles together. Connect red parts with rubber bands imgur.com/a/yMY65ow
Thanks for the feedback, these are some really nice designs! You'd probably have to change the AND-gate a bit, because elsewise the output would move in a smaller range than the input... I also can't test this right now, because I don't have the frames, but I'm pretty sure the other designs would work.
@@in1 I was kinda worried it'd be something like that XD. The other 2 it was simple enough to copy your concepts but I couldn't make heads or tails of the AND-gate and had to go with my gut XD.
a lot of these gates can be done easier and with less pieces. AND can be done with a simple differential. NOT can be done with 2 technic gear racks and a gear. Or with just 2 gears (if the computer is rotation based).
The problem is, that to translate the mechanical into rotational movement and back would already take a lot of space. The and-gate would also have the problem, that, if only one gear turns, the output still moves
I'm not seeing how the NOT gate is inverting the input. The diagram you showed previously of true/false looks like isn't really 1:1 visually translating to the NOT gate at all. It looks like they are both showing the same features. Like, when one is "false" it looks to me like the other one is as well, as they are both extended. At least visually and in line with what you previously established that true/false looks like. If it is working as intended, I believe the visual translation needs a better explanation than what is offered.
You're right, thanks for the feedback, the definition of true was, that it's away from the position of the input (I don't know a better way of saying that)
I just got back from vacation 5 hours ago and then made the whole video, so the quality is a bit lower than usual. I hope you enjoy anyways :)
Wintersport?
Of course
I've been around since the "3 ways to control 2 outputs with 1 input" video, and now you're making mechanical computers. Wow!
If you want to compete with Intel you'll need to make your gates a bit more compact...
@@Reth_Hard quite a long way from decimeters to nanometers...
This is fascinating! Maybe try to enhance the rigidity of the structure and make the i/o more visible. Amazing idea on mechanical logic circuits overall and i’m pretty sure you are the first to build it in lego.
Yep, I wanted to show the boolean values a bit better through editing, but I barely had time today. But you're right, you could pretty simply add levers to make it less confusing...
@@in1 It’s alright I’ve already enjoy your videos a lot!
Derek from Veritasium had one in one video but I've never seen a tutorial. Good job, thanks :)
Intelligent people can often be unintelligible.
For these designs, yes "you'd need an environment without friction, bending and 'wiggle'-room". To overcome this, one would need to find a way to input energy into this system (this is how transistor-based computers work -- quantum is a bit weirder). If you could make a buffer that drives the output with more force than was needed to drive the input, then we might be in business!
This is why I’m designing a LEGO computer using rotation. Clockwise is 1, counterclockwise is 0. This makes it easy to add a repeater.
Yep, servo motors could be an idea...
The other thing I tried was rotating: 1 and idle: 0. How did you make things like an and-gate?
@@in1 I have no idea how this works, not how to build it, but this dude from 9 years ago managed to make one ruclips.net/video/7EPrSJ242hI/видео.html , it inverts the output but that’s a simple fix
That actually looks really robust, but I'm neither understanding how that works :)
For people who doesn't understand: these are the same logic gates used by your ALU (Arithmetic Logic Unit) in your CPU which is in your computer/device.
Wow I didn't know there is lego in my computer
Puts a new meaning to _bricking the computer_
:D
What I did for a XOR gate was two gear racks driving either side of a differential and the differential drove an eccentric mechanism so when you push one gear rack it turns the diff independently of the other gear rack and when you turn the eccentric mechanism 180 degrees it pushes out, and 360 degrees pulls it back in, assuming each gear rack turns it 180 degrees.
I think there was a Knex computer, and Nico71 made a replica of a toy computer. And that's just toys, people have also built computers using hydraulics, steam-engines, biology as well as several other technologies. And really computers can be a lot simpler than some people may think. There's a great book/course on it called something like "NAND to Tetris" I think? It does a really great job of bridging the gap between these basic principles and modern computing.
That said, it's not everyday you see a video on Lego logic gates so kudos for that!
I find it fascinating how anyone can create a comptuer from scratch. Well, that is definitely simplifying it a lot. But the concepts you build up are simple. Create things that can replicate the truth tables of logic gates, then just follow a diagram on how they are connected to make, idk, an adder. You can create a computer with anything from water to Minecraft redstone, lego to mechanical gears.
As you were building the OR gate, i had the thought of using NOT gates and a AND gate to make a OR gate.
Just put NOT gates on the I/O of the AND gate and you have a OR gate.
This could also work the reverse on OR gates to make AND gates
Yep, that would probably be smoother than the one I built
But can It run doom?
No, You wouldn't have an OR gate by negating AND's output. From one of De Morgan's laws: ~(p ^ q) ~p v ~q. (Not (p and q) holds if and only if not p or not q holds.)
The logical gate NOT + AND is known as NAND.
@@4nk he said I/O, not the output only, so NOTs on the input and output for AND gate, then it would work
@@geckwwo Oh, it makes sense to me now, thanks.
Great video as always. You’re One of my favourite Lego channels.
Very cool idea, Using the Boolean language.
This is the only channel that youtube reccommends me vids an hour after uploading off
Just to put things into perspective: A modern CPU made of these would be around 15 kilometers on each side.
Would be interesting...
Theres no way it would be only 15km
Honestly i think working with gears is easier since you can make a transistor out of 3 gears (the input, a movable one and the output.) The input must be spinning (represents the current in a transistor)
So if you move the middle gear in-between the in- and output gear, it should work.
I thought about working with rotation, but the problem is, that it's pretty hard to convert rotational into mechanical motion without stopping the rotation. Thanks for the idea though!
@@in1 rotation could cause another gear to move along a track thus translating the rotation into mechanical motion as the second gear moves, or maybe the first gear causes the track to move thus making a piece attacked to the track move?
@@namedindividual3131 That's right, but at the end of the gear rack the gear would stop and you couldn't turn it anymore. If I work with a rubber band and a friction clutch, there would also be a lot of friction, because the rubber band has to be strong enough to pull the gear rack back when the motor is off. Because of that, the friction of the friction clutch has to be big and that's not really good for the motor and the friction clutch...
To make it better it needs to be more modular where the inputs and outputs are at the same spot
You could also do not((and)or(not(or)) for xor gate.
Cool, very cool. Not sure if the same holds true now, but when I was at school in the ‘90s it was cheaper in the semi-conductor world to make NAND gates, and every other gate was made from a combination of NANDs. It would be very interesting to see that makes out of Lego too!! :)
Yesss, im learning exactly that in school rn
So nothing changed 😂
This is so cool!! I was quite interested in this, but then hit a wall after I couldn't quite get it to work. Your mechanisms are very very cool and I might have to take some inspiration... :)
Now that's a unique build, first time that I see one. Well done, very creative !
that and gate was such a cool design
Thanks :)
That’s a great video.
Can you try to make a half adder and full adder?
I want to see the real LEGO calculator.
You'd probably need some kind of repeater for a full adder, like a servo motor... For a half adder you would just need to take an output from the first and-gate in the xor-gate and together with the output of the xor-gate it's a half adder
I'm waiting for you to build full PC (with CPU, RAM, registers, etc.) like people in Minecraft do!
i will try to use the input inverter for an aircraft or spacecraft landing gear. Thx for the nice idea!
I was waiting for the moment you run *excel* on a lego computer
Y’know the graphics are gonna be *amazing.*
You also need some active buffer to metigate friction in system with multiple logic gate in series.
Why every gate outputs reverse value?
This is so cool. Now you need to make a calculator from lego.
Yep, I'd need some kind of repeater for that
This is amazing! I've been trying to build a simple Lego binary calculator and I think you might have just helped me big time! (again) thanks!
Ingenious! It would be even better without the rubberbands.
Those are some nice looking logic gates, but I believe it is not possible to build a computer out of them. The output of one logic gate needs to push at the input of the next gate. The mechanical power required and the manufacturing tolerances keep adding and just after a few gates, it just gets stuck.
If you look at electric or electronic logic gates, they don't just have their 2 inputs and 1 output, they are also connected to a power source; it doesn't show up in diagrams for simplicity. The power at the output does not come from the inputs, it comes from the power source and the inputs just decide if it goes through or not. And that is how I believe mechanical logic gates need to be build.
Yeah, it's definitely not a practical solution. The easiest way to solve this is probably some kind of repeater with a lever and a servo between every component, but there are obviously other issues like size and reliability.
I have no idea what’s going on but I like it, nice video!
Cool the AND gate in the 3:54
This is really cool, even though I don’t fully understand it
What you’ve did Really nice - real computers on scale also needs amplifiers usually, gentle press to input triggers cluster of logical elements.
Yep, I thought about that, but didn't find a good design...
Only one question remains, can it run doom
I wondered how many it would take. We already know how many crabs it would take, this should be easy.
That's cool!
I expect a working lego-8086 by the end of the year.
Finally, this will solve the chip shortage!
:D who needs electricity for mining bitcoin when you have that?
Honestly…I’m very confused lol. But that was fascinating cheers :)
Thanks! Actually, that's just the top of the iceberg of computer science. That's confusing enough for me, though :)
I’ll watch again in the morning, I have had a 🍺!
I Love the ingenuity :)
@@GazRsExtremeBrickMachines :D
Great vid!
now, time to make the most complex counting machine
Respect for creativity and execution, great stuff!
Really cool
could you make some more advence systems in video with this four gates plz ?
As you saw with the xor-gate, bigger thinks like an adder don't really work... You'd need some kind of a repeater for that
very interesting, please continue. let see where they can arrive...
this is fascinating omg
It’s so cool great job
For those people wondering what the and gates are im pretty sure they're gates for electricity to pass through in a computer they're called transistors I believe idk where they are but I'm pretty sure they're very small I heard cpu has like a billion transistors so that means it has a billion types of gates or same gates
Yep, basically a computer is a combination of and (transistor) and not (circuit using resistor)
I really got confused. He stated in the beggining that a false output is a long bar and true ouput is a short one. Right after, he builds a NOT and the input has the same length as the output.
The definition is kinda unclear, you are right. What I wanted to say is that True is the position away from the input and False is the position closer to the input
Cool stuff!
Nice with a proof of concept :)
You could have built a bunch NAND gates (or a NOR) and make every other gates from that gate.
A basic task in a digital electronic course at high school or similar.
Thanks! That's right, but I obviously wanted to keep it at least a little bit compact (you probably see, that the last one is already huge). It could be, though, that using nor gates would make it a little bit better, because the and-gates aren't perfect.
Very cool concept. But at this point why not go full analog (in the sense of continuity of i/o rather than bits)
because in the real world, everything will tend to converge to the value 1/2
@@DrWhom look up mechanical integrator
I don’t think you could make a computer if you’re using rubber bands. I’ll just stick to Mindstorms lol
Really helpful! Thanks!
Sweet! I wonder how much more these ideas can be explored. Full adder when? :)
You'd probably need some kind of repeater for that, but then it would work
Wow really confused but good job
Make 3 inputs to the AND-gate & OR-gate & 4 inputs to the XOR-gate.
Yep, you could realise that by combining multiple gates
I am wondering would someone actually made a working lego calculator without any electronic parts?
Oh, I was wondering about this soooo long! Thank you :)
yay 🥳
This is awesome! Next try to make it play angry birds 😁
Could you do the NOR, NAND and other gates?? That would be awesome, you are a master!!
Thanks! You could combine the gates with a NOT-gate for that...
@@in1 oh, forgot that, sorry😅
I've tried to do this before. The biggest limiting factor is friction, and just as in a real computer, generated heat
this is AMAZING thanks!!!!!!!!!
AND, BUT and OR get you pretty far
This would be more viable if you were able to make it more modular and maybe keep each gate within a rigid frame piece. Maybe a 7x11 technic frame piece sounds like it’d be a good size. Plus having them be modular means it’s easier to connect them in sequence AND you avoid using universal joints to connect axels that don’t line up, because that significantly reduces the transfer of force from one output to the next input which increases the force required on the starting inputs to carry signal through to the final output. Also the off center axels will tend to have a little give so at some point when not enough force makes it through the gates it’ll just compress instead of transferring the force and you’ll drop signals…
Yep, that's right, it could be hard to put an and-gate in there though. The universal joint definetely wasn't the best solution, but you have to consider that the modules have 2 inputs and 1 output, so you can't always line them up. My solution is not better though, even the xor-gate barely worked...
Maybe you could use Lego pneumatic tubes as wires
When I saw this video, I knew i had to click!
wow what a crazy man just mad a computer mechqnisim
I have a suggestion, but decided to design it myself. Bottom of comment has an Imgur link.
I think you would be better off unifying them with a similar body, which could be switched as needed, and mounted onto a sturdier surface. At first I though Part#64179 would work, and it's easily large enough for an OR gate, but clearly wouldn't fit a NOT gate, or an AND gate. So I bumped them up to a Part#39794.
-The Or gate is very simple, and was the first one I had done.
-The Not gate is just the same design as shown here, but housed in the better frame.
-I cannot guarantee the AND gate's functionality, for I have no way to test it's mechanics. If I did it right, the triangle will tilt 1 way or the other if only 1 is pushed, and will push forward when both are pushed. There might be a way to do it with Part#10288 but I didn't want to push my luck trying to fit all the angles together.
Connect red parts with rubber bands
imgur.com/a/yMY65ow
Thanks for the feedback, these are some really nice designs! You'd probably have to change the AND-gate a bit, because elsewise the output would move in a smaller range than the input... I also can't test this right now, because I don't have the frames, but I'm pretty sure the other designs would work.
@@in1 I was kinda worried it'd be something like that XD. The other 2 it was simple enough to copy your concepts but I couldn't make heads or tails of the AND-gate and had to go with my gut XD.
Very good
epico!
Can it run doom?
This is very amazing
One day he is actually gonna make a Lego pc
If you made 4 gates out of the 6 I think you can make why not make the bill gate?
Me encanto el video. ❤❤❤❤❤
There is a problem with end : you need to push both imputs of 2 studs to have only 1 out...
There is a lever at the end which fixes that problem
So, theoretically speaking, if you had enough of these would you be able to play doom?
yep, with a ping of several years
okay great. now make donkey kong.
I need a science fiction story with a giant killer robot that uses mechanical logic
wait
so computers use binary?
a lot of these gates can be done easier and with less pieces.
AND can be done with a simple differential.
NOT can be done with 2 technic gear racks and a gear. Or with just 2 gears (if the computer is rotation based).
The problem is, that to translate the mechanical into rotational movement and back would already take a lot of space. The and-gate would also have the problem, that, if only one gear turns, the output still moves
feel like you'd run into an issue with the combined strength of the elastic bands.
yep
can it run Doom tho
Nice idea, but I think the fraction would make the system unusable
You're right, you'd need some kind of repeater if you want it to run longer than 3 modules
Well done, subbed.
Presenting... The incompetuter.
Jk, interesting video.
I mean... if minecraft has taught us anything, it is that a NOR gate is all you need. Might be more stable, though likely less compact.
I'm not seeing how the NOT gate is inverting the input. The diagram you showed previously of true/false looks like isn't really 1:1 visually translating to the NOT gate at all. It looks like they are both showing the same features. Like, when one is "false" it looks to me like the other one is as well, as they are both extended. At least visually and in line with what you previously established that true/false looks like. If it is working as intended, I believe the visual translation needs a better explanation than what is offered.
You're right, thanks for the feedback, the definition of true was, that it's away from the position of the input (I don't know a better way of saying that)
now make a whole computer and pc
IM WATCHING THIS ON EXACT DATE REALEASED!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :0
Yo, someone should make this
But, can it run Doom?
Scrap mechanic in real life
Haha, looks like im not the only one with that thought!
we got a Minecraft computer now we got a lego computer
All these gates are cool but make me a multiplexer
finish this project and play doom with it!
Given the and gate is complicated and imperfect but the or gate is very simple, you could use the fact that A&&B=!(!A||!B)
Right, it could get a bit big with the not-gates, but you're right
Will this support 4K graphics??
If you think about the pyhsical limits probably not :D
cool now build an ALU lol
But can it run crisis?
I need you to do the math, what would be the price to make this thing run DOOM?