Navigation Menu+

The Quest For Wonder Special Features – Episode 4

After hard day’s questing for Wonder with his puppet pal Professor Brian Cox, puppet Robin is left with a few questions.  So after each episode he’s taking time to video chat with one of our Cosmic Genome scientists.

The Quest For Wonder Episode 4 Subscriber Exclusive

Maths and Computers with Matt Parker

Robin - Matt Parker, so, if computers used to be made of vacuum tubes and then hamsters and then transistors, and then someone said you made one out of dominoes, so, I’m confused.  What makes a computer?

Matt - Yeah, so a computer is based on switches; all of those things you mentioned work as kind of a switch, but it’s slightly more complicated than a switch for a light bulb or something.  You could imagine, OK, here we’ve got our switch and it’s attached to a light bulb, which I’m going to draw incredibly badly up there, so that light bulb can turn on and off and down here you’ve got a button, right, and you press the button that turns the switch on and the light bulb lights up.  Computers have switches with two buttons and then they have different rules for how you…what happens when you press the buttons for the light switch.  So a normal light switch, press the button, switch comes on.  Computers have some switches where you have to push both the buttons before it comes on, other ones you have to push one button but not the other one before it comes on, and you get lots of complicated rules for if you push the two buttons on the switch, whether or not something comes out the other side.  And vacuum tubes were the first thing we had that did this reliably, but they were quite big, they were like an actual tiny bit of glass with all the air removed from it, it had bits of wire in there, and you were able to heat them up and they had electrons moving around such that you’d get this weird behaviour.  Since then we’ve had transistors, they’re made of silicon; silicon often has a few impurities in it and depending on those you get this weird kind of behaviour where current doesn’t just flow through it, but it flows through it in weird ways depending on where the current’s coming into more than one input, and that’s why they’re called semi-conductors because they don’t just conduct, they don’t just not conduct, it changes depending on what’s happening around them.  But now that we have really clever semi-conductor components, we can make complicated switches, we can make them absolutely tiny, and so modern computers work because they’re made up of tiny, tiny silicon switches.

Robin - That’s fine, but Brian also told me that everything now gets sent around in binary.  So if it’s all just zeros and ones, just zeros and ones, zeros and ones, zeros and ones, zeros and ones, zeros and ones, zeros and ones, why do we even need the other numbers?

Matt - We don’t need the other numbers; they are hugely overrated.  So, everything works in binary for a computer, because if you think of pushing these buttons you can either push them or not push them: they’re the only options.  So we could say, if you push a button we’ll call that a one, if you don’t push it we’ll call it a zero, and same with a light bulb, it’s either on or it’s off.  And there’s no other real option in the way we’ve built computers, it’s all on or off, but the great thing about binary is you can still write down every number; so you can take any number you want and we would normally write it down as…using all the other…so, actually, what number would you like, what two digit number as an example?

Robin - Think of a number, OK, er, Pi!

Matt - You jerk, OK, so if you want pi…I’m going to ignore that you said pi and we’re going to do 31, which is the first two digits of pi, actually that’s a terrible example, I’m going to do 314, which is the first three digits of pi as a number, and that there is the units column: that’s how many ones are in the number; that there is the tens column, there’s one ten, and that there is the hundreds column.  So we know when I say three, I mean three hundreds, so three hundreds, one ten and then four units, that’s 314.  But we can write that down other ways: we don’t have to just put it with those columns.  If we change the columns, so instead we’ve got a units column and then we’ve got a twos column, and then fours and then eights and sixteens, 32, 64, and this time instead of each column being ten times the previous one I’m doubling them, so they’re getting twice as big.  So if I wanted to do…I haven’t got enough room for 314, I’m just going to do 14 because I’m lazy!  So if we wanted to do 14…if I did…er, let’s do one eight, one four, one two and no units, and eight and a four and a two all add up to 14, and so you could say 1110 is 14 - totally ignoring that - in binary. And so we don’t actually need all the other numbers: they’re quite handy for us as humans, that’s because historically we kind of, we count on our fingers and we have ten fingers, and everyone learns to count and add and do mathematics using our normal digits, but you don’t have to use them; it works just as well in binary, and for computers that’s a lot easier.

Robin - Hmm, so when Brian’s on TV, then, and he gets sent into space as zeros and ones, zeros and ones, zeros and ones, zeros and ones, how does it end up back down on my telly then, looking all lovely?

Matt - No, that’s a very good point, so when we send information through any kind of computer or, you know, any kind of network, we have to send it as binary because all the circuitry only deals in ones and zeros.  So if you wanted to send a picture of Brian’s smiling face, you have to turn it into ones and zeros initially.  I can do a very, very simple version of that: so, here I’ve got a box and I’m going to split that up into a tiny little grid, so here’s a wee grid, and that’s a four by four box, and so I’m going to do a very, very simple version of his face.  Right, so if I sent the information for his face,  if I sent 0000010100000111, that’s just ones and zeros, right, I could send that through a computer network, but to turn it back into an image at the other end I might say, right, all you have to do is put it in a grid and colour in where all the ones are, and so you go oh, OK, there’s a one there so I’m going to colour in that pixel, in this case, I’m going to colour in that one over there, oh there’s some down here, I’m going to colour in that one, and then that one, and then that one.  Now, you will admit that is not a fantastic likeness for Brian’s face, it’s not smiling for a start, but I’ve managed to take a series of ones and zeros and turn it into a picture, and if I had more squares, if they were a lot smaller, I could get a much better picture, and what I can start to do is, if I want to have colour pictures I can actually start grouping the binary together: I could have more than a single digit in each square and I could have binary numbers for how bright or dark each cell is, or what colour has to go in that cell, so when they take a picture of Brian in a TV show they split that image into tiny, tiny little pixels, they work out what colours are in that pixel, how bright they are, and they turn that into a binary number and then they send it off as binary code.

Robin - Now that it’s all HD and 4K, is that because we have new maths or just better ways to use old maths?

Matt - So, the old maths we use in computing hasn’t changed much in a very long time: we’ve had binary codes almost as long as we’ve had computers, the way we do images is not particularly exciting, in fact, that’s pretty much how faxes work, almost exactly, and the new mathematics that’s happening now - new research in maths - kind of sits on top of the hardware. So when it comes to how I send that binary information, when it has to go up to a satellite and it has to come back down again, often that goes wrong: on the way as we’re sending the data bits of it get lost, there are mistakes, and we don’t want to get Brian’s face wrong when the data comes back from the satellite.  If you’re watching it on TV and your antenna loses some signal, you don’t want to lose picture quality, and so new mathematics, research that’s happening now, is finding safe ways to send that data.  We use very clever bits of modern mathematics to encode the data before it’s sent, so if it comes back and bits of it are missing, we can use the maths that’s hidden in the data to recreate all the missing information: we can use what’s called an error-correcting code, and that is current mathematics that’s making those better and better, and we get much better quality images.

Robin - Ooh, before you go, how does Skype work then?

So, you’re looking at me right now on Skype, that’s very good point, you’re not actually looking at me, you’re looking at a binary set of information, you’re looking at the data that represents my face and exactly the same with the sound: whenever you listen to sound on your computer or on your phone you’re listening to a digital audio file, you’re listening to lots of ones and zeros that tell you what those sound waves should look like.  So you think you’re looking and talking to me, you’re actually looking at and hearing a lot of ones and zeros.

Matt Parker’s book and a whole lot of other maths goodies are available now from his site

Watch all episodes of The Quest For Wonder here.