Tip:
Highlight text to annotate it
X
JAMES CLEWETT: Today we are talking about Pac-Man, which
is a game from the early '80s, and obviously one of the
definitive arcade games.
[VIDEO GAME SOUNDS]
And something that probably a lot of people don't know,
because most people don't spend their time compulsively
playing video games, is that Pac-Man comes to a dead halt
at level 255.
We are going to be talking today about the number 255.
BRADY HARAN: Have you ever got to level 255?
JAMES CLEWETT: No.
Pac-Man's not my game, so I've made it to level 20 or 30, and
then normally I need a wee or something, and so.
I guess what this relates to is the way computers and
microchips were built back in the early '80s.
They were all just 8-bit processors.
And what that meant was that they had eight lines inside
the processor for carrying the numbers on, which limited what
the computers could do.
Today I'm going to show you how and why that limits what
computers can do.
Well, I'm going to start by showing you
how computers count.
Computers count in a thing called binary, which basically
means they have on and off.
So let's start with off.
And we're going to pretend that this is a
computer with 4 bits.
And for the number 0, each one of those lines is set to 0.
So all I'm going to do is start adding numbers to the
rightmost column.
I'm going to add a 1 to the 0, and then the rest of the
numbers stay the same.
And that is the number 1.
So now we're going to aim to add another 1 to go
to the number 2.
So when I add a 1 to this column in binary, there's no
more space in this column.
OK, so what we're going to have to do now is carry 1 into
the next column, exactly the same as adding 1 to 9 would be
in decimal.
So I add 1, that becomes a 0, and we carry 1
into the next column.
And the rest of the columns stay the same.
And that is the number 2.
So for number 3, what we're going to do is add 1 to the 2,
so 0 plus 1 is 1.
This column remains unchanged, and these
columns remain unchanged.
OK, now then, the number 4.
Well, that's 3 plus 1.
So I add 1 to this column, and it has to carry.
So we get a 0, which means I add 1 to this column, and
again it has to carry.
So I get another 0, and I carry into this column.
And that is unchanged again.
That is the number 4.
OK, let's rattle through a few more.
I'm going to write down the number 6, which is 0, 1, 1, 0.
The number 7, 0, 1, 1, 1.
The number 15, 1, 1, 1, 1.
And then we get to the number 16, and we have a problem.
OK, because I'm going to add 1 to this column, which means
it's got to carry, which means I add 1 to this column.
It has to carry.
I add 1 to this column, it carries.
I add 1 to this column, and so it carries.
We've run out of space.
I don't have another line to add a number to.
Because what I want to do is put 1 here.
But that, as far as the computer's concerned, this
simply doesn't exist.
So what's happened?
We've wrapped back to where we started from.
So we've hit a dead end, and we can only count to 15 using
a 4-bit number.
And what I want to do is take this back to the Pac-Man
problem, OK?
So Pac-Man had a microprocessor which was an
8-bit microprocessor, not a 4-bit microprocessor.
And what that means is that if we want to represent the
number 0, we need eight 0's.
1, 2, 3, 4, 1, 2, 3, 4.
OK, let's do it again.
The number 1.
What about the number 2?
I'm going to be drawing a lot here, but OK.
I'm going to do the number 8.
Now let's skip up just a few more to what would be the
number 253.
OK, so we're getting close to the end here.
1, 0, 1.
OK, the number 254.
The number 255.
And we've come back to a point where we
reach a familiar problem.
If I want to count to 256, here we go.
I'm going to add 1 to 255.
So it carries here, it carries here, it
carries here and here.
And again, it carries here, here, here, and here.
And I want to put 1 here.
But the computer, Pac-Man simply doesn't have a number
big enough to store that value.
And we're scuppered.
OK, so that's it.
That is why 8-bit computers can only count
to the number 255.
And as a child, I was fascinated by this.
Absolutely fascinated, but it's taken me 15 years to get
to the point where I can explain it to you.