Transcript
The following transcript was automatically generated by an algorithm.
- 00:03 : - There it goes.
- Yay!
- 00:04 : I made a 2D version of a
greedy cup siphon recently,
- 00:07 : and Matt Parker suggested that I might
- 00:09 : be able to build a water computer
- 00:11 : by chaining together a
number of these siphons.
- 00:14 : For example, maybe I
could use these siphons
- 00:17 : to add numbers together.
- 00:19 : Computers add numbers by chaining together
- 00:22 : a series of logic gates.
- 00:23 : For example, these logic gates
- 00:25 : add two digit binary numbers together.
- 00:27 : I'll get into the details
of that diagram later,
- 00:29 : but what are the logic gates made out of?
- 00:32 : Well, in a computer, they're
made out of transistors,
- 00:35 : but they don't have to be.
- 00:37 : If you're familiar with
Matt Parker's channel,
- 00:39 : you'll know that logic gates
- 00:40 : can be made out of dominoes, for example.
- 00:43 : But what about using the
flow of water instead?
- 00:46 : This was my first attempt.
- 00:48 : If both inputs are turned on,
- 00:50 : they collide in the middle,
filling up this central bucket,
- 00:52 : and water flows out of
the middle hole there.
- 00:55 : If only one input is turned
on, there's no collision,
- 00:58 : and water flows into one
of the two side buckets.
- 01:02 : In other words, water only
pours out of this output
- 01:05 : if both inputs are turned on.
- 01:07 : In a computer, you call that an AND gate,
- 01:10 : a logic gate where the
output only turns on
- 01:12 : when both inputs are on.
- 01:14 : If I combine these two outer holes
- 01:18 : into a single tube like this,
- 01:21 : then water only flows out of this tube
- 01:23 : if one or the other of
the inputs are turned on
- 01:26 : but not both.
- 01:27 : In a computer, that's
called an exclusive or gate.
- 01:31 : So this should work as
an AND gate or an OR gate
- 01:35 : or both at the same time.
- 01:36 : Actually, this arrangement
fails immediately
- 01:39 : because water is too sticky.
- 01:41 : It sticks to these outer faces,
- 01:43 : and you can't get a jet strong enough
- 01:45 : to pass across the gap.
- 01:46 : But if you can separate
the water from the glass,
- 01:49 : you can get it to work.
- 01:51 : - What I did like about that one
- 01:52 : is you can very easily see why it works.
- 01:56 : - [Steve] Yeah.
- 01:56 : - And that's why I love these
ridiculous physical computers,
- 02:00 : because there's no magic to computing.
- 02:02 : - One slight issue is flow rates.
- 02:04 : So for example, you know,
- 02:06 : if the flow in is slower
than the flow out,
- 02:09 : this is gonna build up and
then it's gonna spill over.
- 02:11 : In the end, this mechanism
had too many issues.
- 02:13 : Also, I really wanted to use
- 02:14 : the greedy cup siphon mechanism,
- 02:16 : which this doesn't have.
- 02:17 : Actually, the reason Matt Parker thought
- 02:19 : of water computers while watching my video
- 02:21 : was because of a mistake that I made.
- 02:23 : I put the siphon in the
middle of the container.
- 02:26 : That actually split the container
- 02:27 : into two independent areas.
- 02:29 : - I did enjoy your video,
watching you having
- 02:31 : to pour both very
carefully to synchronize.
- 02:35 : It had that sense of an AND.
- 02:38 : - There really is an
AND-ness to it, isn't there?
- 02:40 : The problem is you have to
really worry about timing.
- 02:42 : Both those bits from each side
- 02:44 : have to come in at the same time,
- 02:45 : they have to meet at the
same time at the top there.
- 02:47 : Actually, you can get much
more reliable AND gate
- 02:49 : from this thing.
- 02:50 : What you do is you define a one
as a certain volume of water
- 02:55 : that gets just above halfway on here.
- 02:57 : So if you put two ones in,
- 03:01 : the volume of water gets
all the way to the top,
- 03:03 : the greedy cup siphon is activated,
- 03:04 : and your AND response comes out there.
- 03:07 : An exclusive or is a little bit trickier.
- 03:10 : - I sent you a sketch where I had
- 03:12 : a dual-height greedy cup siphon,
- 03:15 : with one on each side
but different heights,
- 03:17 : which I thought would work,
- 03:18 : but I wasn't sure if it would be reliable.
- 03:21 : - So in the end, the solution was
- 03:23 : to drill a small hole here.
- 03:27 : It's a slow leak, and what that means
- 03:29 : is if you put a one in
there and only a one,
- 03:32 : you're not gonna get a greedy cup siphon,
- 03:33 : but you are eventually gonna get it
- 03:36 : to all come out of that slow leak.
- 03:38 : If you put two ones in for your input,
- 03:41 : then the siphon is activated
and the chamber empties.
- 03:43 : It doesn't empty instantaneously,
- 03:45 : so there will be a small amount of leak
- 03:47 : through the exclusive or channel.
- 03:49 : So when you look at the chamber
- 03:50 : that's catching the exclusive or output,
- 03:54 : if there's just a little
bit of the bottom,
- 03:56 : you read that as a zero,
- 03:57 : but if the chamber is full up to here,
- 03:58 : then you read it as a one.
- 04:00 : One thing that's nice is
- 04:01 : that this single device houses two gates.
- 04:03 : You've got two inputs and two outputs.
- 04:05 : One output gives you the exclusive or,
- 04:07 : the other output gives you the AND.
- 04:09 : - Conceptually, we had to switch
- 04:11 : from thinking about
something you would turn on
- 04:13 : and it would just keep flowing
- 04:14 : and settle into some kind of state
- 04:16 : to now you've got packets
of water representing bits.
- 04:21 : - Why don't I show you?
- 04:22 : I can't change cameras,
- 04:24 : so why don't I do a WhatsApp
video call with you?
- 04:28 : I know, I know.
- 04:30 : Oh, you've just, why
did you reject my call?
- 04:33 : That's very rude.
- 04:34 : Are you screening my calls?
- 04:38 : - Hey, all right.
- 04:39 : - Hey.
- 04:40 : - So I'm gonna mute you.
- So I'm gonna mute you here.
- 04:43 : - [Steve] There it is.
- 04:43 : - [Matt] Oh my goodness.
- 04:44 : I have no sense of the scale of what I,
- 04:47 : well, I know the scale of the achievement.
- 04:48 : - It's pretty cool, isn't it?
- 04:50 : But what on earth is it doing?
- 04:51 : Well, it's implementing
this logic gate diagram
- 04:54 : that I showed you before.
- 04:56 : Actually, if I turn it on its side,
- 04:58 : you can start to see they
have a similar shape.
- 05:00 : But what exactly is this
logic gate diagram doing?
- 05:03 : Well, at this point, it's helpful
- 05:05 : to switch up the language that we use.
- 05:07 : Instead of talking
about inputs and outputs
- 05:09 : being turned on or turned off,
- 05:11 : let's talk about ones and zeros.
- 05:12 : So for example, in the
case of an AND gate,
- 05:14 : you would say if both
the inputs are a one,
- 05:17 : then the output is a one.
- 05:18 : Thinking about the
logic gates in that way,
- 05:20 : we'll be able to show that
this particular arrangement
- 05:23 : is actually going through a process
- 05:25 : of long addition of binary numbers.
- 05:27 : You'll know from doing
long addition at school
- 05:30 : that if you add two digits
together and it goes above 10,
- 05:34 : then you carry the one.
- 05:36 : So for example, here,
nine plus four is 13,
- 05:39 : you put the three down there,
- 05:41 : and you put the one up
there into the next column.
- 05:43 : The same thing happens with
long addition of binary numbers.
- 05:47 : If there's a one and
a zero in this column,
- 05:50 : then you put a one down here.
- 05:52 : But if there's a one and a one, well,
- 05:55 : one plus one is two, and
two in binary is written 10.
- 06:00 : So you put the zero down
here, and you carry the one.
- 06:03 : You might already be
noticing some logic gates
- 06:06 : hidden in these operations.
- 06:08 : For example, the number
that you put down here,
- 06:11 : if you think about that as the output,
- 06:13 : what we have is an exclusive or operation.
- 06:16 : You only put a one here in the output
- 06:19 : if one or the other of
the inputs is a one.
- 06:23 : If they're both one, then
you actually put a zero.
- 06:26 : What about the carry?
- 06:27 : Well, the carry is related
- 06:29 : to those two inputs like an AND gate.
- 06:32 : In other words, you only carry a one
- 06:35 : if both of the inputs are a one.
- 06:37 : So let's put that together in a diagram.
- 06:40 : This is called a half adder.
- 06:42 : Moving to the next column
in this long addition,
- 06:45 : there are actually three inputs.
- 06:46 : So the logic diagram is a
little more complicated.
- 06:49 : Here it is.
- 06:50 : I'm not gonna explain it all,
- 06:52 : but feel free to pause the video
- 06:54 : if you want to ponder it for yourself.
- 06:55 : But this is called a full adder.
- 06:58 : And if you want to add, say,
- 07:00 : two four-digit binary numbers together,
- 07:02 : you just chain three full
adders together like this
- 07:06 : with a half adder at the start
- 07:08 : because the first column
doesn't have a carry coming in.
- 07:11 : Because now our devices are an AND gate
- 07:13 : and an OR gate in one, we can simplify
- 07:16 : this logic diagram to look like this.
- 07:18 : Some aspects of this water computer
- 07:20 : aren't completely obvious.
- 07:21 : Like this bit here, for
example, it's a splitter.
- 07:25 : The reason you need a splitter is because,
- 07:28 : well, if this siphon activates,
- 07:30 : it's because you've put two ones in.
- 07:33 : You've got a volume of water
that represents actually a two.
- 07:37 : So you have a two coming out of here.
- 07:38 : But I only want a one to go in here.
- 07:40 : So I need to split it in half.
- 07:41 : A one goes this way and
another one goes this way.
- 07:44 : This is just a drain.
- 07:45 : I originally had one
continuous tube for the drain,
- 07:48 : but that was acting like a siphon
- 07:49 : and preventing any water
going into this one.
- 07:52 : That's why you've got this funnel here.
- 07:54 : It just breaks that siphon effect.
- 07:56 : This bundling is also a bit confusing.
- 07:59 : Honestly, that's just for tube management.
- 08:02 : If you look closely, it is
just two separate inputs,
- 08:05 : this one and this one.
- 08:08 : Really, I should have an
XOR tube coming out of here
- 08:11 : into a readout bucket like this one,
- 08:14 : but it's a lot easier just
- 08:15 : to not bother drilling a hole in here,
- 08:18 : and then this doubles up
as the readout bucket.
- 08:22 : You might be thinking, "Well, hold on,
- 08:23 : "this has got three inputs.
- 08:25 : "How can that work?"
- 08:26 : And actually, these two
inputs should really go
- 08:28 : through an exclusive or
before going into here.
- 08:31 : But it doesn't really matter,
- 08:32 : because you would never actually
- 08:34 : get both of those on at the same time
- 08:36 : if you consider the logic
prior to these two tubes.
- 08:40 : So it's fine to just have
them both go straight in.
- 08:42 : Do you want to give me two numbers to add?
- 08:44 : - I kind of want to see 11 plus five.
- 08:47 : The reason I think that'd be interesting
- 08:49 : is you're gonna have different
types of cascading rollovers.
- 08:54 : - [Steve] So let's put a one in there.
- 08:55 : A one is 10 milliliters, by the way,
- 08:56 : in case you were wondering.
- Oh, that's good to know.
- 08:58 : I've always wondered what
the volume of a one is.
- 09:01 : - So these are the two
numbers we're adding,
- 09:02 : 11 and five, written in binary.
- 09:04 : You take the two digits
from the ones column,
- 09:07 : put them in these syringes;
- 09:08 : the two digits from the twos column,
- 09:10 : put them in these syringes;
- 09:11 : the two digits from the fours column,
- 09:13 : put them in these syringes;
- 09:13 : and the two digits from the eights column,
- 09:15 : and put them in these syringes.
- 09:19 : We're then gonna watch
these five readout buckets.
- 09:22 : You've got the ones
bucket, the twos bucket,
- 09:24 : the fours bucket, the eights bucket,
- 09:26 : and the sixteens bucket.
- 09:28 : 11 plus five is 16, so we want a one
- 09:32 : in that final bucket and nowhere else.
- 09:36 : - There it goes!
- Hey, there you go.
- 09:37 : It worked.
- 09:38 : So now, and then that one should rollover.
- 09:40 : - [Matt] And then the next one?
- 09:42 : - [Steve] Oh, come on.
- 09:44 : Ah, balls.
- 09:45 : Part of it is getting the
right amount in the syringe.
- 09:46 : You don't want too much
- 09:47 : so that there's too much
dribble left over, and so on.
- 09:50 : - [Matt] Maybe a one is 11 milliliters.
- 09:52 : - [Steve] I also think we've
got a bit of an issue here
- 09:53 : where some of the water's
dribbling down the backboard
- 09:56 : - You've got a memory leak, Steve.
- 09:57 : I've never been so proud
of such an easy joke.
- 09:59 : Could be a security issue, if I'm honest.
- 10:01 : - [Steve] Yeah, I think
someone is using this
- 10:03 : to mine Bitcoin, and it's
slowing everything down.
- 10:05 : - What if we generate two random numbers,
- 10:08 : and we'll give the
computer a good clean-out,
- 10:10 : and we'll add the two random numbers
- 10:12 : so we have no way to influence this,
- 10:14 : and if that works, we
declare it a raging success?
- 10:17 : - [Steve] Yeah, sounds good.
- 10:21 : - Got it, so four plus nine.
- 10:23 : And that's pretty close
to the nine plus five
- 10:26 : that we were thinking
would be a good idea.
- 10:28 : That's gonna be pretty boring,
- 10:30 : 'cause it's all just gonna plonk through.
- 10:32 : Tell you what-
- Or do you want to?
- 10:33 : - Oh, I just had a closer look, Steve.
- 10:35 : It was a five.
- 10:36 : Huh.
- 10:37 : - Oh, right.
- 10:38 : - I'm sorry.
- 10:40 : - The reset is like, I lift this up,
- 10:44 : I go like that, and then I go like that.
- 10:47 : - Oh, yeah, the Etch A Sketch
approach to researching.
- 10:51 : Underused in modern computing.
- 10:53 : Although the undo on the
iPhone is a shake, so.
- 10:55 : So the dominoes reset was a day
- 10:58 : if you have a team of like tens of people.
- 11:00 : I got two three digit numbers working
- 11:04 : on the domino computer.
- 11:05 : If you get this to work, this would be
- 11:07 : a substantial increase in computing power.
- 11:10 : - [Steve] All right, here we go.
- 11:12 : - [Matt] Okay, bam, we've had our AND,
- 11:15 : 'cause that still could have gone wrong.
- 11:16 : Like, I know we're saying
it's a trivial calculation,
- 11:18 : but that split had to work.
- 11:20 : And now we just need two slow leaks.
- 11:22 : - [Steve] Which is what we've got.
- 11:23 : It's 01110, which is eight plus
four plus two, which is 14.
- 11:29 : What were we adding together again?
- 11:31 : - [Matt] Nine plus five.
- 11:31 : - [Steve] Is 14, yay!
- 11:34 : - In my experience, the more facetious
- 11:36 : of the commenters on this video
- 11:38 : will point out that you
just went to a lot of effort
- 11:40 : to show that nine plus five
equals eight plus four plus two.
- 11:44 : - Of course, that's really a fair comment
- 11:46 : because you only do the
eight plus four plus two bit
- 11:49 : at the end when you're converting
- 11:50 : back to decimal in your head.
- 11:53 : If you stay in binary like a computer,
- 11:56 : then we've actually done
something really useful.
- 11:57 : We've shown that 0101
plus 1001 equals 01110.
- 12:06 : You know, maybe I could build something
- 12:08 : that converts it to a decimal readout.
- 12:11 : - Your water computer, my domino computer,
- 12:13 : there's discrete states
that it ends up in.
- 12:15 : So it probably can't say it analog.
- 12:17 : But there are actual analog computers.
- 12:20 : So famously, there was a
guy called Bill Phillips
- 12:23 : who was an economist and worked on dams,
- 12:26 : and realized the equations for water flow
- 12:29 : matched the equations that
are used to model the economy,
- 12:32 : and they built a actual
analog water computer
- 12:37 : to model the economy, like with taps
- 12:39 : for like government
spending and interest rates.
- 12:41 : This is kind of before you could
- 12:43 : just numerical solution
your way out of the problem.
- 12:46 : In other news, Steve, I've just looked up.
- 12:47 : You are on 877,000 subscribers.
- 12:51 : I am on also 800 and something.
- 12:54 : We're gonna keep collabing
until we get to a million.
- 12:56 : - [Steve] You challenged
me to the water computer.
- 12:58 : I want to see a video on the game Dobble.
- 13:01 : - That is one of the most
requested video topics.
- 13:05 : - [Steve] Is it?
- 13:06 : - And there's no accessible videos on it.
- 13:09 : - That's gonna be a
really interesting video,
- 13:11 : so make sure you subscribe
to Matt in advance.
- 13:13 : Link in the card and the description.
- 13:14 : He's approaching a million subscribers,
- 13:16 : so let's get him there as quick as we can.
- 13:18 : I'm also approaching
a million subscribers.
- 13:20 : So if you're not subscribed
- 13:21 : and you've watched a few of my videos,
- 13:23 : I'd love you to consider
- 13:25 : whether I've earned your subscription.
- 13:26 : Should we do one more calculation,
- 13:27 : maybe slightly higher numbers or something
- 13:29 : so we get down to that final bucket?
- 13:32 : - Yeah, what about like seven plus 15?
- 13:34 : - Yeah, here we go.
- 13:37 : - [Matt] Okay, units are
in, units are overflowing.
- 13:42 : We've got an AND.
- 13:43 : - [Steve] Yep.
- 13:47 : - [Matt] Oh, yep, twos have overflowed.
- 13:49 : We've got an AND.
- 13:50 : - [Steve] There it goes.
- 13:53 : - [Matt] Okay, the waste
seems to be working.
- 13:55 : Just dump that one.
- 13:56 : - [Steve] There it goes.
- 13:59 : - [Matt] Now we just need one more AND.
- 14:02 : - Come on.
- Come on.
- 14:03 : - [Matt] There's enough, surely
there's enough coming in.
- 14:07 : There it goes!
- 14:08 : - [Steve] Yay!
- 14:12 : - [Matt] You've done it.
- 14:13 : Seven plus 15 equals 22.
- 14:15 : - For completeness, here's
that original calculation,
- 14:17 : 11 plus five, actually
working instead of failing.
- 14:20 : And just for fun, here's 15 plus 15,
- 14:23 : in other words, all the ones.
- 14:25 : I didn't go into detail about
- 14:26 : how binary numbers work in this video.
- 14:28 : If you want to brush up on that,
- 14:30 : I can heartily recommend
- 14:31 : the sponsor of this video, Brilliant.
- 14:33 : The best way to learn something
- 14:35 : is by doing it for yourself.
- 14:37 : Like, if you want a really
long-lasting intuition
- 14:41 : about something, that's
the way to go about it.
- 14:44 : Brilliant took that principle
- 14:45 : and turned it into a website and an app.
- 14:49 : It's a fine-tuned learning experience.
- 14:52 : They throw you in with these problems
- 14:55 : that you have to solve, and
it's all interactive stuff.
- 14:59 : When I say it's fine-tuned,
I mean they've given
- 15:01 : a lot of thought to things
like the difficulty progression
- 15:05 : so you never feel like
you're getting stuck.
- 15:07 : If you ever do get stuck, they
have these clever mechanisms
- 15:10 : for getting you unstuck
without feeling disheartened.
- 15:14 : The result is something
that's incredibly satisfying.
- 15:17 : They've got courses on broad topics
- 15:18 : like science, maths, engineering,
- 15:21 : or you can take a deep dive
into very specific things
- 15:25 : like cryptocurrency or quantum computing,
- 15:29 : and, of course, they have
courses on binary numbers.
- 15:32 : Actually, I used Brilliant to get unstuck
- 15:35 : in my orbital resonance video.
- 15:37 : It really helped me to understand
the papers I was reading.
- 15:41 : But to be honest, I mostly use it for fun.
- 15:44 : You know, a lot of people
might read a book at bedtime.
- 15:46 : Not me.
- 15:47 : You can try out Brilliant.org for free,
- 15:50 : no commitment, using my special URL.
- 15:53 : It's brilliant.org/stevemould.
- 15:56 : The link is also in the description.
- 15:58 : So why not join me and 8
million other lifetime learners
- 16:02 : by going to brilliant.org today?
- 16:04 : I hope you enjoyed this video.
- 16:05 : If you did, don't forget to hit subscribe.
- 16:07 : And I'll see you next time.
- 16:09 : (upbeat music)