WEBVTT
Kind: captions
Language: en-US

00:00:01.920 --> 00:00:08.360
Happy Pi day everyone. This is the Pi machine.
It’s a device that progressively approximates

00:00:08.360 --> 00:00:13.080
the value of pi, and prints it out digit by
digit. The longer you let it run, the more

00:00:13.080 --> 00:00:17.120
digits that come out, and the more accurate
its approximation gets, all the while you

00:00:17.120 --> 00:00:22.960
get to enjoy blinkenlights, a bell ding on
each digit, and lots clicking, since yes,

00:00:22.960 --> 00:00:28.760
all the computation going on in this machine
is being done by electromechanical relays.

00:00:28.760 --> 00:00:33.680
But anyways, Pi… I mean everyone likes pi.
It’s gotta be the most famous number in

00:00:33.680 --> 00:00:37.800
popular mathematics, or at the very least
the most famous transcendental. And what’s

00:00:37.800 --> 00:00:42.360
not to love? It’s got a name far too easy
to pun on dessert items, something about a

00:00:42.360 --> 00:00:48.920
circle I guess, and ALL, THOSE, DIGITS. Pedants
will argue that every number has an infinite

00:00:48.920 --> 00:00:53.320
expansion of digits, but for any rational
number those digits end up repeating, and

00:00:53.320 --> 00:00:55.400
a lot of irrational numbers you see are just&nbsp;

00:00:55.400 --> 00:00:59.200
square roots of a rational&nbsp;
number. Pi is transcendental,

00:00:59.200 --> 00:01:03.520
which means neither of these apply, and though
we haven’t proven it, pi also appears to

00:01:03.520 --> 00:01:08.880
be a normal number, which means the digits
are as good as random. And yet Pi is one specific

00:01:08.880 --> 00:01:13.080
set of random digits that ends up all over
mathematics.

00:01:13.080 --> 00:01:17.040
As one might expect, there is a proud history
of computing this series of digits to greater

00:01:17.040 --> 00:01:22.480
and greater precision. There’s the single
fraction approximations like 22/7ths or 355/113

00:01:23.680 --> 00:01:27.480
usually worked out through geometric reasoning,
but things get even more precise when you

00:01:27.480 --> 00:01:31.320
define pi as a sum of fractions, since the
further you carry out the sum, the tighter

00:01:31.320 --> 00:01:35.960
your approximation will get. It’s approaches
like these that let Isaac Newton compute 16

00:01:35.960 --> 00:01:38.760
places, Ludolph van Ceulen compute 35
[pronounced as 32]&nbsp;

00:01:38.760 --> 00:01:41.200
(and engrave it on his tombstone) and much later

00:01:41.200 --> 00:01:46.480
let William Shanks set the record for by-hand
computations of pi with 707 digits over the

00:01:46.480 --> 00:01:52.160
course of his life. Though sadly, due to human
error, only 527 of these were correct.

00:01:52.160 --> 00:01:56.320
But that was back in the 1800s when work was
done with pen and paper. Things really took

00:01:56.320 --> 00:02:01.520
off once mechanical computation came on the
scene. Suddenly one person with a desk calculator

00:02:01.520 --> 00:02:05.840
could compute over a thousand digits, and
with electronic computers, that same thousand

00:02:05.840 --> 00:02:10.920
digits could be computed in the order of minutes.
Then it became hundreds of thousands, then

00:02:10.920 --> 00:02:15.560
millions, billions, trillions, and at our
current rate, I wouldn’t be too surprised

00:02:15.560 --> 00:02:19.920
to see us surpass the quadrillionth digit
of pi within a decade or so.

00:02:19.920 --> 00:02:23.200
I’ve always liked the idea of a machine
that could do one of these pi approximations

00:02:23.200 --> 00:02:26.920
right in front of you, kinda like bornach’s
“Pi Spigot” where you can get the digits

00:02:26.920 --> 00:02:32.000
of pi literally on tap. Absolutely charming,
but one of the things I just couldn’t get

00:02:32.000 --> 00:02:35.720
over is how you can never be sure with one
of these things that the creator isn’t just

00:02:35.720 --> 00:02:39.760
“cheating,” and by cheating I mean, it’s
just as easy to store the first 10,000 digits

00:02:39.760 --> 00:02:43.600
of pi in the device and then stream them out
one by one. That’s not computing, that’s

00:02:43.600 --> 00:02:49.840
just remembering. Impressive when humans do
it, sure, but computers? That’s just lame.

00:02:49.840 --> 00:02:54.120
To be clear, as far as I’m aware, the “Pi
Spigot” is legit, but it got me thinking.

00:02:54.120 --> 00:02:55.960
If there's one thing this world needs,

00:02:55.960 --> 00:03:00.120
it's a pi machine you can be sure is doing
the computations right in front of you.

00:03:00.120 --> 00:03:05.360
Something you couldn’t miss if you
tried. Something clicky…

00:03:05.360 --> 00:03:09.320
When it comes to digital logic, it’s hard
to get much simpler than the relay. It’s

00:03:09.320 --> 00:03:13.680
a form of switching that predates integrated
circuits, transistors and tubes, since it’s

00:03:13.680 --> 00:03:18.440
just a regular mechanical switch but articulated
by an electromagnet. Commonly, relays will

00:03:18.440 --> 00:03:22.640
have a dual-throw arrangement, so that the
center switch jumps between one of two contacts

00:03:22.640 --> 00:03:27.480
depending on whether the coil is active or
not. In a way, relays are a way for a circuit

00:03:27.480 --> 00:03:29.840
to “rewire” itself, kinda like a railroad&nbsp;

00:03:29.840 --> 00:03:32.240
switch, and in doing so,&nbsp;
with the right connections,

00:03:32.240 --> 00:03:36.080
they let you do things like: make a circuit
that inverts its input, make a circuit that

00:03:36.080 --> 00:03:39.760
only turns on if both inputs are on, make
a circuit that latches itself on or off whenever

00:03:39.760 --> 00:03:44.160
it gets a pulse, or even one that generates
pulses. All the logic gates you’re used

00:03:44.160 --> 00:03:48.080
to from digital electronics can be made out
of relays, and with enough of them chained

00:03:48.080 --> 00:03:52.440
together you can even start to do computation.
In fact, the very first electrical computers

00:03:52.440 --> 00:03:57.760
were built on relays before work shifted towards
the considerably faster vacuum tube.

00:03:57.760 --> 00:04:02.320
Doing math with relays works the same exact
way you learn arithmetic in elementary school,

00:04:02.320 --> 00:04:07.560
except being in binary, it actually ends up
being even simpler. I'm sure a number of you

00:04:07.560 --> 00:04:12.520
would strongly disagree, but think about it.
In base 10, even to do single digit addition,

00:04:12.520 --> 00:04:14.560
you need to memorize how to sum 100 pairs&nbsp;

00:04:14.560 --> 00:04:17.880
of numbers. In binary, there&nbsp;
are only 4 combinations

00:04:17.880 --> 00:04:22.080
and it’s easy enough to reduce them down
into just a few logic operations. With just

00:04:22.080 --> 00:04:26.120
two relays, you can make a circuit like this
one, which adds three one bit numbers into

00:04:26.120 --> 00:04:29.880
a two bit output.
And, just like with by-hand addition, if you

00:04:29.880 --> 00:04:34.040
want to add numbers bigger than a single digit,
you just chain the smaller addition operations

00:04:34.040 --> 00:04:38.560
together with carries. The same works here.
String a couple of these adder circuits together,

00:04:38.560 --> 00:04:44.160
and you can start adding 4 bit numbers, 8,
16, as wide as you want. This works well for

00:04:44.160 --> 00:04:48.280
relatively short numbers, but it still costs
2 relays per bit, which means if you want

00:04:48.280 --> 00:04:54.480
to add really long numbers like 128 or 256
bits, this circuit gets really big, and really

00:04:54.480 --> 00:04:59.720
expensive. But remember, a four bit adder
is really just four copies of the same circuit

00:04:59.720 --> 00:05:04.480
doing the same logical operations. We could
just as easily re-use one adder and feed in

00:05:04.480 --> 00:05:09.120
the inputs for each column one at a time and
get the same output. In fact, as long as you

00:05:09.120 --> 00:05:12.920
have some form of memory to pass the carry
bits from the last column into the next one,

00:05:12.920 --> 00:05:17.720
we can set up one adder to add really long
numbers one bit at a time. For each pair of

00:05:17.720 --> 00:05:21.640
addend bits you stream in, you’ll get out
one bit of their sum.

00:05:21.640 --> 00:05:24.880
The really cool thing here is that there’s
no longer a length limit to the numbers this

00:05:24.880 --> 00:05:29.760
circuit can add. It could be one bit, it could
be 5 bits, it could be a thousand. They all

00:05:29.760 --> 00:05:34.640
take two relays. The only trade-off here is
time, since the wider the number is, the longer

00:05:34.640 --> 00:05:38.960
it takes to work through all the bits.
We can do the other basic arithmetic operations

00:05:38.960 --> 00:05:41.480
with relays too. Subtraction is really similar&nbsp;

00:05:41.480 --> 00:05:44.520
to addition. A bit shift is&nbsp;
basically a multiplication

00:05:44.520 --> 00:05:48.800
by two. And you can combine several additions
with bit shifts to get multiplication by any

00:05:48.800 --> 00:05:53.920
number. In a similar vein, division can be
reduced to shifting bits and subtracting.

00:05:53.920 --> 00:05:58.360
It works using the same long division algorithm,
except, remember how you needed to guess what

00:05:58.360 --> 00:06:03.320
the next digit would be, then do a multiplication
to check? Well, in binary that multiplication

00:06:03.320 --> 00:06:10.800
is either by 0 or 1, so guess and check boils
down to just, check. To divide A by B, you

00:06:10.800 --> 00:06:15.280
shift in A one bit at a time, and every time
your accumulator is greater than B, the next

00:06:15.280 --> 00:06:20.560
output digit is a 1 and you subtract B, otherwise
it’s a zero and you leave it alone.

00:06:20.560 --> 00:06:25.000
In other words, the logic is, “shift in
the numerator, subtract if you can.” Using

00:06:25.000 --> 00:06:28.640
the building blocks we’ve already established,
it’s pretty easy to make a circuit which,

00:06:28.640 --> 00:06:33.800
given a denominator, takes the numerator bit
by bit, and outputs the quotient bit by bit.

00:06:33.800 --> 00:06:37.280
What’s neat about this circuit is that,
watching the internal bits, you can see it

00:06:37.280 --> 00:06:42.880
get into loops, like here. What you’re seeing
is the binary version of a repeating decimal.

00:06:42.880 --> 00:06:51.640
Just like how in base 10 ⅓ is 0.33333...,
in base 2 it’s .010101...

00:06:51.640 --> 00:06:55.280
You’ve probably noticed that for some of
this wiring, I’m using printed circuit boards

00:06:55.280 --> 00:07:00.120
rather than doing everything by hand, and
it’s for good reason. Relay logic circuits

00:07:00.120 --> 00:07:04.760
very quickly can devolve into wiring spaghetti.
Check out one of my first attempts at a relay

00:07:04.760 --> 00:07:09.520
calculator from years ago that I tried to
hand wire. This board is functionally equivalent

00:07:09.520 --> 00:07:12.880
to these four printed ones.&nbsp;
Now, purely hypothetically,&nbsp;

00:07:12.880 --> 00:07:14.600
I want you to imagine that there was a bad

00:07:14.600 --> 00:07:21.480
component right in the middle of all this…
Yeah. Even on neater breadboards though, with

00:07:21.480 --> 00:07:25.360
all the mechanical action going on, these
relays like to loosen themselves up and just

00:07:25.360 --> 00:07:29.520
jump right out of their sockets. Try
debugging a circuit like that. That’s why

00:07:29.520 --> 00:07:34.520
this time around, I decided to design some
common modules into PCBs to clean up the wiring.

00:07:34.520 --> 00:07:40.240
Things like adders, subtractors, counters,
memory circuits, selectors, and a couple LED

00:07:40.240 --> 00:07:45.709
panels for debugging. These boards boil down
a lot of the repetitive wiring to traces on

00:07:45.709 --> 00:07:49.160
the board, and they even line up the input
and output connections, so a lot of the signals

00:07:49.160 --> 00:07:52.880
can be carried over ribbon cables 8 bits at
a time.

00:07:52.880 --> 00:07:57.000
This was actually my first time doing PCB
design, and I gotta say, it turned out way

00:07:57.000 --> 00:08:00.480
easier than I thought it would be. All you
have to do is design the circuit board you want

00:08:00.480 --> 00:08:04.360
in KiCAD and then lay out the components on
the board. The software will tell you what

00:08:04.360 --> 00:08:07.360
pins need to be connected, and then it’s
up to you to route traces between them

00:08:07.360 --> 00:08:09.080
like the game "Free Flow." (Flow Free, my bad)

00:08:09.080 --> 00:08:12.080
I find it makes for a pretty enjoyable puzzle,
though maybe if I

00:08:12.080 --> 00:08:16.000
was a professional electrical engineer working
on much harder routing problems for circuits

00:08:16.000 --> 00:08:20.880
with far stricter tolerances this process
wouldn’t be quite as fun.

00:08:20.880 --> 00:08:24.920
At this point we’ve got the relays, we’ve
got the arithmetic circuits. How do we wire

00:08:24.920 --> 00:08:30.000
all these things together to actually approximate
pi? Luckily for us, there are plenty of different

00:08:30.000 --> 00:08:35.320
ways to go about this, from empirical methods, to
Monte-Carlo methods, and a slew of different

00:08:35.320 --> 00:08:38.000
infinite summations. The algorithm I chose&nbsp;

00:08:38.000 --> 00:08:41.240
is a relatively recent one known&nbsp;
as the Bailey-Borwein-Plouffe

00:08:41.240 --> 00:08:46.440
formula, first discovered in 1995, and it
looks like this. You can get it from some

00:08:46.440 --> 00:08:50.880
weird integral tricks, which I think Michael
Penn does a good job of explaining. What’s

00:08:50.880 --> 00:08:54.760
most notable about this formula in particular
though, is that it gives us an efficient digit

00:08:54.760 --> 00:08:59.560
extraction algorithm for pi. You can actually
use this formula, with a few manipulations,

00:08:59.560 --> 00:09:04.240
to compute any arbitrary digit in pi, like
say the 10 millionth, without actually having

00:09:04.240 --> 00:09:10.480
to work out the preceding 9,999,999, just
as long as you’re ok with the digits being

00:09:10.480 --> 00:09:16.800
in base-16. BBP also isn't the fastest converging
approximation of pi, but this superpower of

00:09:16.800 --> 00:09:20.720
being able to pick out digits of Pi makes
it really useful for confirming the results

00:09:20.720 --> 00:09:24.280
of other algorithms when doing long computations
of pi.

00:09:24.280 --> 00:09:29.000
In our case though, I’m gonna use the original
summation, no fancy digit extraction tricks.

00:09:29.000 --> 00:09:33.640
And the summation itself is actually pretty
eerily well suited for a binary system. All

00:09:33.640 --> 00:09:38.600
the multiplications are powers of two. Like,
8k+1 in the denominator; it’s the same as

00:09:38.600 --> 00:09:44.480
taking k, shifting it over 3 bits, and filling
in a 1. Dividing by 16k is the same as shifting

00:09:44.480 --> 00:09:49.880
4k bits to the right. All the numerators of
the fractions are powers of two, so, you guessed

00:09:49.880 --> 00:09:55.760
it, bit shifts. And maybe a bit more subtly,
each iteration of the summation has four terms,

00:09:55.760 --> 00:10:00.360
which we can number with exactly two bits.
All those observations make this formula in

00:10:00.360 --> 00:10:05.400
particular a lot simpler than others to implement
in relays. Pull out all the bitwise operations,

00:10:05.400 --> 00:10:07.760
and there are really only&nbsp;
two arithmetic operations&nbsp;

00:10:07.760 --> 00:10:11.960
that we need: division and addition. The relays

00:10:11.960 --> 00:10:16.840
here work in two passes for each term. One
works out the long-form value of each fraction,

00:10:16.840 --> 00:10:19.800
and the other adds that&nbsp;
value into the accumulator.&nbsp;

00:10:19.800 --> 00:10:21.600
The only other thing I needed to add was a

00:10:21.600 --> 00:10:26.280
circuit to count up for each value of k and
use that value to fill in the denominators.

00:10:26.280 --> 00:10:30.160
That’s the really cool part about there
being exactly four fractions, if you use two

00:10:30.160 --> 00:10:34.400
bits to determine what fraction we’re on,
the whole state machine is just a counter.

00:10:34.400 --> 00:10:38.320
The lowest bit decides whether to divide or
add, the next two bits pick which fraction

00:10:38.320 --> 00:10:43.080
to use, and all the upper bits fill in for
k. The other neat thing is that thanks to

00:10:43.080 --> 00:10:46.840
the bit streaming tricks from before, this
circuit can carry out the calculations to

00:10:46.840 --> 00:10:51.280
as many decimal places as you like. The only
limiting factor is the number of bits for

00:10:51.280 --> 00:10:54.600
k.
Well… and we need somewhere to store the

00:10:54.600 --> 00:10:58.920
approximation of pi while it’s being computed.
I mean, at four bits per decimal digit, you’d

00:10:58.920 --> 00:11:03.200
need one more of these boards for every two
added digits of precision, and pretty soon

00:11:03.200 --> 00:11:07.840
the majority of the relays in this device
would just be there to act as memory. Boring!

00:11:07.840 --> 00:11:10.120
Plus, I’m not up to soldering all that.&nbsp;

00:11:10.120 --> 00:11:13.640
Instead, this is where I&nbsp;
cheat. All the computation

00:11:13.640 --> 00:11:18.240
happens on relays, but some of the storage
happens on an appropriately named raspberry

00:11:18.240 --> 00:11:24.800
pi. But, let’s be clear here, only storage,
and generating clock pulses. You might say

00:11:24.800 --> 00:11:29.240
that me asking for your trust is a little
ironic considering the goals of this project.

00:11:31.080 --> 00:11:35.080
Anyways, here are all the PCBs hooked together.
This section counts what iteration we’re

00:11:35.080 --> 00:11:39.400
on, this section does the division, and this
one does the addition. The part in between

00:11:39.400 --> 00:11:43.520
the rest is the “glue” board, since it
passes signals between the other components

00:11:43.520 --> 00:11:47.760
and the raspberry pi. And on the raspberry
pi, there’s a short program that reads from

00:11:47.760 --> 00:11:52.360
to the machine and displays the output on
screen. Let it run, enjoy the blinky lights,

00:11:52.360 --> 00:11:56.760
all the clickety clicks, and sure enough,
that’s pi we’re getting.

00:11:56.760 --> 00:12:00.840
Being able to see the results converted to
decimal also helps to demystify what exactly

00:12:00.840 --> 00:12:04.920
is going on with each pulse. You can watch
the result for each division get closer and

00:12:04.920 --> 00:12:09.160
closer to the real value the more bits get
written out. Having a better look inside the

00:12:09.160 --> 00:12:14.480
machine also helped a ton with debugging,
which believe me, there was a lot of. I mean,

00:12:14.480 --> 00:12:18.920
look at this wiring. The PCBs do a lot to
organize things, but even then, it’s still

00:12:18.920 --> 00:12:22.640
a bit of a rat’s nest, and it’s way too
easy to get wires crossed plugging one board

00:12:22.640 --> 00:12:27.720
into another. Even with the PCBs there were
problems. One of my designs actually has a

00:12:27.720 --> 00:12:32.560
defect in it where, during routing, I accidentally
made a trace that crossed positive to negative.

00:12:32.560 --> 00:12:37.000
I didn’t even notice until I built and plugged
in the board. Luckily this one ended up being

00:12:37.000 --> 00:12:41.360
salvageable, since I was able to physically
sever the traces and hand wire a jumper around

00:12:41.360 --> 00:12:44.320
them.
When it comes to bugs though, the absolute

00:12:44.320 --> 00:12:47.360
biggest contributor here&nbsp;
are the relays themselves.&nbsp;

00:12:47.360 --> 00:12:49.560
After all, relays are mechanical objects,

00:12:49.560 --> 00:12:54.600
and that gives room for lots of failure modes.
I’m lucky enough mine are sealed on the

00:12:54.600 --> 00:12:58.840
sides, so I don’t have to relive the moth-filled
days of yore, but heat and mechanical wear

00:12:58.840 --> 00:13:03.280
are still very real problems. Originally,
one of my boards was designed to run at 12

00:13:03.280 --> 00:13:07.280
volts, but with all the active relays on it
acting like little heaters, it would get pretty

00:13:07.280 --> 00:13:11.880
warm in a short amount of time. Not very long
into its life, it actually mechanically broke,

00:13:11.880 --> 00:13:16.640
and now just generates binary gibberish. Now,
everything runs at 6 volts, and is a fair

00:13:16.640 --> 00:13:20.040
bit cooler.
The other annoying thing is that the memory

00:13:20.040 --> 00:13:25.560
latches do occasionally like to stick, ignoring
whatever bit was actually supposed to be stored.

00:13:25.560 --> 00:13:28.040
This one adds a frustrating&nbsp;
level of non-determinism&nbsp;

00:13:28.040 --> 00:13:29.960
that seems to be brought about by high clock

00:13:29.960 --> 00:13:35.920
rates, bad choices in voltage, and, of all
things, gravity. In my testing, I found that

00:13:35.920 --> 00:13:39.680
one way I could seriously reduce my error
rate was to stand the boards up sideways,

00:13:39.680 --> 00:13:45.720
rather than laying on their backs. No kidding.
Relays are fickle things, and since I was

00:13:45.720 --> 00:13:50.080
getting a little annoyed at long streams of
calculations getting ruined by a single misplaced

00:13:50.080 --> 00:13:55.640
bit, I added a tiny bit of error correction
logic to the raspberry pi. Now, the pi runs

00:13:55.640 --> 00:13:59.840
the calculation in tandem with the relays,
and if it detects an error, it resets the

00:13:59.840 --> 00:14:04.520
relays to a clean state and starts that section
over again. Don’t worry, the computation

00:14:04.520 --> 00:14:08.720
is still all happening on the relays. This
just helps smooth out the occasional glitches

00:14:08.720 --> 00:14:12.800
in this electromechanical hardware. And to
be clear, I have seen this thing run almost

00:14:12.800 --> 00:14:18.040
an hour without a single error occurring.
The last two things I felt this machine really

00:14:18.040 --> 00:14:23.080
needed were a bell to ding on every successive
digit, and a printer to spit out an ever growing

00:14:23.080 --> 00:14:27.520
tape of pi. This one is a thermal receipt
printer being controlled by the raspberry

00:14:27.520 --> 00:14:31.520
pi, but believe it or not, the conversion
from binary to base-10 is still happening

00:14:31.520 --> 00:14:36.200
on the relays. Base conversions like that
aren’t too bad for small integers, but they

00:14:36.200 --> 00:14:40.720
get kinda tricky for really long fractional
values, since a single binary digit can touch

00:14:40.720 --> 00:14:46.160
many decimal digits. The trick I came up with
is that each time a digit is computed, I pick

00:14:46.160 --> 00:14:50.480
off the integer part of the approximation,
and then multiply the whole thing by 10. So

00:14:50.480 --> 00:14:56.280
for instance, we pick off the 3, and continue
approximating the value 1.4159…, then take

00:14:56.280 --> 00:15:02.280
off the 1 and approximate 4.1592… Each time,
the next digit is in the integer part of the

00:15:02.280 --> 00:15:06.400
number, so it’s always easy to extract.
And don’t worry about the multiplication

00:15:06.400 --> 00:15:11.320
by 10, since that’s really just two bit
shifts and an add. It costs all of four extra

00:15:11.320 --> 00:15:15.840
relays to compute, and takes no extra time
since it runs in parallel with the addition

00:15:15.840 --> 00:15:21.320
step. It’s incredibly minor, but that hack
has got to be my absolute favorite in this

00:15:21.320 --> 00:15:24.440
machine.
But anyways, let’s take a look at the whole

00:15:24.440 --> 00:15:29.000
thing in action. Press the start button, and
it’s off. And every once in a while *ding*

00:15:29.000 --> 00:15:34.080
it spits out a digit. As for speed? Well,
this thing is definitely not setting records

00:15:34.080 --> 00:15:38.960
anytime soon. At the fastest, I’ve had it
running at 32 clock ticks per second, though

00:15:38.960 --> 00:15:43.760
20 Hz is much more stable. The runtime also
depends on the level of digits you want to

00:15:43.760 --> 00:15:48.600
compute, since more digits means more iterations,
and each iteration needs to be computed to

00:15:48.600 --> 00:15:54.280
more digits of precision. For 6 digits though,
it takes under 2 minutes. For 16, it’s about

00:15:54.280 --> 00:15:59.920
10 minutes, and 32 takes well over a half
hour. It has a quadratic complexity which

00:15:59.920 --> 00:16:03.800
means that to reach digit 4,096, which is
the furthest this machine should be able to

00:16:03.800 --> 00:16:08.760
compute, by my estimates, it would take about
a year and a half of non-stop operation, assuming

00:16:08.760 --> 00:16:14.240
nothing breaks and I don’t go absolutely
crazy from all that loud clicking 24/7. That

00:16:14.240 --> 00:16:19.080
same computation on my computer takes about
a second. But hey, building relay computers

00:16:19.080 --> 00:16:23.840
hasn’t been about speed since the 1940s.
And besides, we already know pi to trillions

00:16:23.840 --> 00:16:28.920
of digits. For this machine, it’s all about
the process. Being able to stretch out the

00:16:28.920 --> 00:16:33.480
computation into a more human appreciable
timescale. “Savoring the computation,”

00:16:33.480 --> 00:16:39.040
one might say, though that one would not be
me, since that sounds irredeemably nerdy.

00:16:39.040 --> 00:16:43.920
Anyways, there you have it, the relay-powered
Pi Machine. I’m gonna be honest, this project

00:16:43.920 --> 00:16:47.880
was a tricky one, but I’m pretty happy with
how it all turned out, and I learned a lot

00:16:47.880 --> 00:16:53.920
from it. Pi approximations, PCB design, relay
logic, laser cutting, and let’s not forget

00:16:53.920 --> 00:16:56.360
all those crazy bitwise manipulations.

00:16:56.360 --> 00:16:59.000
Which reminds me, there is&nbsp;
one last ability of this&nbsp;

00:16:59.000 --> 00:17:01.520
machine which I’ve so far neglected to mention.

00:17:01.520 --> 00:17:05.120
I mean we all know a left bit shift is basically
a multiply by two,

00:17:05.120 --> 00:17:06.960
and so it’s really cheap
to take the value of Pi&nbsp;&nbsp;

00:17:06.960 --> 00:17:10.320
we’ve computed and shift it, and basically,

00:17:10.320 --> 00:17:13.560
yeah this machine
has a Tau mode. I don’t necessarily endorse

00:17:13.560 --> 00:17:18.080
it, but like, come on it was just too easy
not to implement, and all I could think of was

00:17:18.080 --> 00:17:28.840
doubling my ad revenue when June 28th rolls
around. Anyways. Happy Pi Day.

