 Rydyn ni'n喔ch gyda. Rydyn ni'n byw i'n roddwyd i enfcampu EFM. Mae'r Tym projoct, mae'n ein gweithio'r computer a'r Mengels Rory. Fawr iawn. Mae'n gwneud i'r swyddo, mae'r campfa hefyd yna yn ddiwedd ar unrhyw bwysig, felly nhw'n llunio, a gallai yn cael mwy yng ngosig morrif losai. But, yes, this is the Tim project. This is the story of how I learnt about computing. So, back in 2010 I was about to start my GCSEs. I was just finishing my GCSEs, start my A-levels, and I hadn't really decided what course I wanted to do, but electronics looked interesting. Never done at GCSE level or anything before. So, had a look at that, first modulus on logic gates and various things, I was like, ah, that's interesting. I don't know how those work. But because I haven't done any electronics before, I'll do some research before I actually go on the course. So I started looking at... I started looking on YouTube for videos on how logic gates work Bydd meelio gyda'r unigon ym nifer yma, a'i weithfawr newydd yn fideo yn y ffrifwyr hath o roi o'r transisteis. Ond rwy'n ai wnes eich rhan o'r ffrifwyr hath o'r ffrifwyr, roi oherwydd fawr. Mae'r cyhoeddem yn oed Fyshedd cyhoeddfa, a eisoedd wedyn i wneud i willo pobl i ddwylo, i ddwylo bod ni i ddwylo o'r ffrifwyr hath o'r ffrifwyr. mae'r riliadu eichweithio cyntaf o'da'r collidog hyd yn ddedig. Gweithio fyddwn i'r llwyddiadau pa'r llwyddiadau, mae o'r grinfodau o'r llwyddiadau.. Ac drwy'n dechreu ac mae'r hyn o throwdoedio'n blaes. Fe hynny roeddam i'r llwyddiadau ac mae hyn oed yn ei ddod. Mewn gwahanol maen nhw'n ei ddod o'r holl ardedd. Mae ymwneud yn ynghyd yn debyg am y ddigonwch o'r ffordd hwn yn ymgyrchol, ond gwysig yn y peth mlynedd i'i — yn ymwybodol o'r dweud hwn yn rwyfyniol gyda'i rewle sy'n mynd i ddweud. Mae'r rewle sy'n mynd i'ch beth yw pethau i'ch gweld. Oes i'r ffordd yw sy'n mynd iddo ni chroeddiad hynny o ran i'r rewle, ond ychydig ei ddweud o leodra ni'n mewn gweld i hebdyniol o'r gwyll credits. gan ychydig i wneud y cyffredinol, yna i'r ddweud y ddweud y 2a a B o'r ddweud a iddi am wneud o'r ddweud o'r eu ddweud wrth gwrs, mae'n gweithio'r cwmhysel oherwydd mae'n amser os mae'r ddweud yn ddim yn ei ddweud, ac mae'n gweithio'r ddweud. Rwy'n cael ei gael fy rhai o'r credu i'r ddweud i'r ddweud o'r ddweud o'r ddweud i'r ddweud o'r ddweud o'r credu'r ddweud ac mae'r ffordd yw Tim I. Yn ystod y'r ffordd bwysig o cyfnogol. Yn ystod, mae'n meddwl i'r ffordd. Mae'r ffordd yn y 0 o'r 1 o'r 1 o'r 1 o'r 1 o'r 1. Mae'n meddwl i'r lle i gael y cas i ddweud o'r ddweud. Mae'n ffordd yn y ddweud o'r ddweud. Mae'n bwysig, a'r ffordd yn y dyfodd yn y ddweud. felly mae'n meddwl arall. Rhywodwch ymdill arall a gallwch gweld cynllunteni rywbeth ymdill, ond mae'r hun am 16 barn yn ei ddỷ. Mae'n ardych no'r hefyd o meddwl oherwydd mae'n ei ddechrau'r llyth credu fel sefydlu eich meddlion i fod i'r sgolion yn ei gyrhan. Mae'r cyfnod yn rhaid. Fe wyddech chi'n meddwl teimlo'r cyndor li, gofio'r ystod y peth yma, a wyddech chi'n meddwl ar rai mewn meddwyd. Tym 3, rwyf, rwyf wedi gwirionedd ac yn ymddangos byddi yma, rydyn ni'n gweithio ar y gofio, mae gennym yn y twg pob, mae'r rydyn ni'n mynd i'r fath i siwad, ond li'n rydyn llwyddo. Cynnu'r pwysig, for adder was a terrible terrible idea and redesigned it. And that whole of the previous circuit, was condensed down to about four relays, rather than ten or so that was there. And that allowed me to put together a whole load of extra bits and make full adders instead, which meant I could now add up to 16, you know, almost easy in my exams but not quite. So, felly dyna'r pwysig gyda'n ei zeidio yn gwneud dros awyr. Felly dwi'n cael falch, mawr iddyntill, a mae gennyddio'r cyfeirydd. Felly, yna'r cyflwy flynyddiad r functioning mewn cyflwy flynyddiadau. Basically I got Tim 4 was a just a Tim 3 with a bit added on to make it do up to 4 bits rather than 3 bits. Tim 5 was Tim 4 plus a load more memory and calculations, sequencing circuits and stuff. So in the middle there we've got two 4 bit registers which hold data and it's going through the computer. Those are all made out of car relays. The reason why this project is titled Making a Computer from Scrap is because I didn't buy anything for this. This was all found crap around the farm that was around the place that was sort of stolen stuff. So a lot of these are car relays, a lot of these are out of old cash machines that were made at the farm. A lot of them are washing machine stuff and out of a microwave or whatever I could find. This lovely item was wired up pretty much, I put down a relay and then sold it up where it was. It meant you ended up with what you see there which is amazingly it worked and there's a video online of it working. Basically it could count up and do multiplications so you put in two numbers and it would add another number to it repetitively to basically multiply it. It was 4 bits so it could do up to 32 in total with the carry bit. It worked but I was like right, I kind of need to rebuild this because I can't move it because it's a pile of relays on a desk or loosely wired together. So I built Tim6 which was basically the same idea but everything had been rewired. To give you an idea of the problems I was starting to get of not designing any of this beforehand putting relays down and soldering them up. On the right there you can see the wiring on the underside which is not a wireman would scream in horror at that. It's all point to point rat nest wiring rather than any looming of data bus or anything. It's just what's the shortest bit of wire I can use to avoid spending money on it. So it was all found parts which is why nothing quite matches. You've got different car relays on the left and right doing the memory and then all sorts of mishmash of stuff in the middle. This thing kind of worked but there was a fault in it. After many, many months and while I was taking the part again it turns out one of the capacitors in the top might wasn't had a dodgy cell joint but I didn't know that at the time. Basically the problem was I had no second diagram and you know when you've written a bit of code and you didn't bother putting the comments in and then you come back and a couple of months later it's like I have no idea what any of this does. This was basically this whole project up to this point. I wanted to redo this properly. At this point I still had a calculator so it was just add numbers but there was no program. It just kind of did exactly what it was wired to do. I'm pretty sure at this point I could make a full computer. This was about a year later at this point. I spent up to Tim Sixth was a couple of months of playing around with relays. I was like right, I want to do a proper computer but I am going to have to do some proper circuit diagrams. So most people at this point would download some circuit diagram designing tool. I opened up Microsoft Paint. Don't do that for your circuit diagrams but I didn't know any better at the time. This whole thing is a learning project in many ways, more ways than one. So I was trying to learn computing, electronics, wiring, soldering all at the same time. So a lot of it kind of shows badly with that. But things were working up to this point. The other problem I had with building a whole computer was I only have what I could find. I didn't want to buy any relays because they cost money and at that point I was still a school kid. I wasn't earning much money. So I was like right, I'm not going to waste any money on relays. So I scrounced around as hard as I could, found a route, managed to scrounge about 200 relays. So I was like what can I build out of that? So I started designing things and these are some of my beautiful paint arts that I drew up. I still don't know why or how I managed to draw such nice diagrams in paint. But as you can see, basically the idea was on the left was the first design, which is basically Tim V with the 4-bit registers. A much bigger, more complicated, arithmetic logic unit, the ALU in the middle, that could do different things. Had this huge multiplex at the bottom to get all those different 4-bit numbers down to one 4-bit number and put that in another register. And then I was like 4-bit, I've got some spare relays, I could probably squeeze out to 5-bit, but that makes the ALU even bigger and at this point just a 5-bit ALU is going to cost me 40 relays and then the multiplex at the bottom is going to be another 40. And I was using most of my relays. I don't really like this design, it's not a neat way of doing things. So I came up with a 1-bit ALU, which could actually only use 12 relays in the end, so I realised that if I switch through every single digit in the register individually and just have a little bit of memory that saves the ALU state as it's going through, I can actually just do a series ALU so it does 1-bit at a time, so it has the benefit of A, less relays, but B, variable bit width, so I could then have a 4-bit, have an 8-bit, have a 32-bit if I wanted to, if I had that many relays. So at this point I was like, well, that's just saved me a ton of relays. Let's go 8-bit, so I designed this thing to be a full 8-bit Turing Complete computer and as you do out of 200 relays, the whole thing runs on punch tape. So the main problem with relays is trying to get memory. Memory is expensive in terms of every bit is at least two relays and you have to have multiple registers of 8-bit wide and you don't really want to do that. So to store the program I made this punch tape stuff, so we had a lot of seat printers around and I hacked one up to be a tape reader and then I hacked another one, a print punch tape. So what it has is a load of LEDs and photo diodes that as this tape is going through it reads the tape of it, reads the program of it and instead of most computers where you run the tape tape into the memory and then run it from memory, this one runs directly from the tape, you can see down the side here there's a clock pulse that clocks the relays as it's going through. So this meant I could have infinitely long programs in my Turing Complete computers I could do, whatever crazy things I wanted to do with it, but obviously I still like to build it at this point so I designed this great thing and all these plans are like, never am I ever going to get this built, but let's go, let's try. So first I built the ALU just to check obviously that one bit ALU idea works. It was great, it worked with a bit of tweaking, a bit of debugging, it worked exactly as I planned. So I was like, that's cool, let's add some registers to that. So that made the ALU unit. Then I was like, can I work out how to control this thing? So I had to basically hard code, I came up with an instruction set which is as simple as possible to implement. So there's eight bits on the punch tape. First four bits are the address for that instruction and the second four bits are the instruction itself. These were entirely designed to be as simple as possible to code, encode into a relay computer just using the wiring. So I was like, right, I've designed this instruction set, I've got to try and wire this in, hard wire this design of instruction set into the relays. So I managed to get that bit working. At this point I had to get the tape really working and that took me a very, very long time because for some reason the photo transistors kept dying and I was like, I'm not used to relays which don't die for anything. I was like, stupid modern technology being really difficult to use. And it turns out the earth lead had fallen off my solar gun so it was frying it all with like 240 volts every time I was putting it through. Obviously a very low current. The way I picked this up was because I was like, right, I'm going to do full anti-static and have the mats down and have the wristband on when I was soldering something up and touching the other end. I was like, ow, ow, ow. I was like, that's not ideal. Why is that getting what feels like mains volt? Oh, so after fixing that the tape really worked. So that was that problem fixed. At this point again it was just a pile of relays on the table so I had to come up with some way of moving it round. So I was like, right, well, nice, you know, I want to be able to see it all and have it all fold up. So if I put the, you know, get a nice big plastic, set of plastic seats, a couple of hinges, I can put the logic unit at the bottom, that's the biggest heaviest bit, that's nice and ballast. Put the control section on the side, that'll go there. Register is going down on the other side, it's quite neat. And then, yeah, tape really goes in the back. Nice splat front, perfect. So that's kind of how this thing came about. The whole thing is, oh crap, go back one. I'm not used to using this on Google Drive, there you go. So, yep, good. So essentially this computer runs on Harvard architecture which is the idea of, it runs off of paper tape rather than on the computer memory itself. So it has a separate store for program and data. The computer has five registers, one working register and four down the side as the general use storage registers. And then I came up with a way of doing a really basic memory type using capacitors and diodes. So I've got 12 bytes of capacitor diode RAM. And, yeah, the whole thing in the end used 160 relays. Has a full 8 hertz clock rate. And full 16 bytes of memory if you include the registers. So blistering speeds and not quite running crisis yet. But, yeah, amazingly, after I've wired it all together and spent forever debugging this, I mean forever. It's still my beautiful rat nested wiring. I didn't learn anything on that that's fun at this point. Still trying to use as little wiring as possible. There's probably several thousand solder joints in there all badly done by 16-year-old me. And none of it's insulated. All of it runs on 12 volts, fortunately for everyone's sake. It consumes about five amps of power when it's up to full chat. And can do basic addition entirely with it. But the whole point of the project was, you know, I just found an idea of, you know, I realised I could build computers out of relays. I was like, OK, what's the logical extreme of doing this with what I've got? And, yeah, so what we end up with was Tim Aig. By the way, the name Tim, I just had to pick a name and Tim was a good name. So I pretended it was an acronym for a while. I was like, no, no, it's just, I just picked a name around him pretty much. But, yeah, end up with, so Tim Aig is the kind of culmination of the two years that was that project. And I took it round various places doing talks. It turns out when you have a whole computer made out of relays in a really nice clear box that opens out on the table with all the different chunks, it's actually a really good way of teaching computer hardware. Because one of the problems is, these days, or at least in my opinion, is that everyone learns software these days, or at least everyone here probably learns software, you know, how to write programmes and, you know, how to do Python and all the rest of it. But how does the computer work? You know, you could give out kids' rasa pies and all the rest of it. And it's like, right, there's this magic black box. If you put code in, it's, you know, it does these magic things. So how does it work? I don't know. It has millions of transistors that do crazy things. Okay, if you have a picture of it, no, no one has a picture of it. Whereas this thing, you know, you know, oh, I was saying, there's the registers. They're like this big, you can see them. There's the ALU, the logic unit. It does number things. There's the control sector. There's the programme on a punch tape that's reading through it. Here's all these flashing LEDs that you can see the programme stepping through eight hertz, rather than, bang, and it's done. So, I mean, this was, although this was a learning tool for myself, it's actually been quite a good educational tool having taken it around a few schools. And, you know, just showing this is how computers work. And, yeah, it's been not the most reliable piece of kit, as you can imagine. But in a minute, I'm hoping to demonstrate it, and see whether it's survived the trip from the car to my tent and then the tent to here. But, yeah, I thought we'd covered that. Just going back on the programme, I made a programme called The Basic Language of Tim, or BLT, which is a nice sandwich. Again, my naming scheme is entirely arbitrary. You can see here on the right the instruction set that I wrote for it. So, you've got eight different logic processes. You've got addition and then a load of simpler ones. You've got all the addresses at the bottom left for the different registers. You can load to, load from. Looping on a punch tape is interesting. Instead of, like a normal programme where you can just jump, this is the kind of more traditional Turing machine style of when it sees a loop command, it has to rewind the tape until it sees a start loop command and then it runs it forwards again. If statements are similar, say you have, if it sees an if statement, it just stops, it keeps running the tape, but it stops executing commands until it gets to an end if and then it will start executing commands again unless that statement isn't true in which case it will just run as usual. So, there's a lot of interesting working round on the punch tape there, but I think it's technically Turing complete. Turing complete is quite a difficult definition of all the different things that a computer has to be able to do, but I think with conditional branching, aka if statements and looping, it can kind of do nested loops. Obviously, being able to loop within a loop is difficult. I did kind of implement that, but a lot of things in this computer kind of work, but I did actually write a programme in the end that could do full simultaneous equations using matrix algebra, which was about 10 metres long. I wrote, for the sake of myself writing programmes, I wrote an assembly language in the simulator so I could run it all on the computer first before printing it out, because debugging on paper tapes and like that. So, I wrote some ridiculous programmes for this thing. Probably the most complicated programme that Simon managed to actually run is the Fibonacci sequence, which is a lot simpler, but recently I added, basically, Tim had been sat under my bed for the last five years, having really done anything with it, but recently I hauled it out, blew the dust off it, because basically there's this fairly terminal problem of somewhere buried deep, deep within the wiring, one of the relays had died, and it was one of the important logic units. I found which one it was many years ago, but just never managed to work out how to get it out. So, and various over the years I'd say, I'm going to do this now. No, it's way too much effort. So, this is another of this. Right, I'm going to do it. Plug the intent on the relay itself, working again. So, I was like, right, run with it, it's fine. So, on the... So, I got it all working again, mostly. It's to the point you could run programmes at least. And I was like, right, the one thing that always really annoyed me about this is you'd run a programme and you'd have nothing to show for it, except for the lights at the front. I'd always really wanted a printer, so I tried designing my own printer and all the rest of that, and it didn't really work, as you can imagine. So, these days, I know a bit more about electronics and stuff, having now done my degree in electronics and going away and spending many more years doing electronics after this. So, I kind of know a bit about protocols and turned that print to parallel ports about the simplest possible protocol you can use. So, it's like a parallel port on it and wired that in, and it can now print with the tape reader. So, I plugged it into the same tape reader it does with this. The text is very small, because, apparently, default text in that has done a pretty tiny font, but technically I could plug this into any printer and it'll print out. So, you can use it like a teletype terminal. It's great in theory, if you know your ASCII code isn't good with switches. But, keyboard's next on the list. But, basically, this then allowed me to write the programme that everyone always does when they first do it. So, it's now going to do Hello World on Relay Computer, which was very satisfying. So, yeah, we'll give it a try. I can't promise anything, but unfortunately, the tape reader has got a little bit worn out. So, it's a bit sluggish on actually reading the programme. The clock speed is set by the motor and the grip on the roller in the tape reader. So, it's not the most reliable setup, but we'll see if it works. The power on switch on the front. We've got the five registers up the front here, which that's the working register at the bottom and the four main registers. It's a nice big rotary switch from the side for selecting which you write to. You've got all the switches at the bottom that give you the option of manually writing data for the registers. And, yeah, currently we've got the Hello World programme ready to go. So, I'll boot it up and see if it will go. The LEDs on the front should start lighting up if it works. I've manually feed it. It's fine. So, that was, hopefully, printed out Hello World. Well, it printed out Hello World twice, but that's close enough. It kind of survived the light in the tent, but I'll just open it up to see if you guys can have a better look inside. If anyone wants to ask any questions while I'm doing that, go ahead. I've ran out of slides, so that's me done for the day. OK, cool. So, I've got a question actually. So, how many hours and all do you reckon it takes as you've put into this? I have no idea. Basically, it was a two-year project, pretty non-stop, but the main bulk of that was designing or doing all the little circuit diagrams in paint, I say little, by several, almost tens of thousands of pixels across. But the actual wiring for this particular model didn't take too long. I mean, each module took me... I mean, I recently Facebook memory has sent me a link to one of the pictures of this, saying, just spend three days wiring this up solid. So, I'm guessing it took me about three days to do the main logic unit. God knows how long it took to actually debug that and get it working. So, basically, it's very modular, so each unit was made separately. And it would... That's that cycle. And then each module was made, each module was debugged, and then they all had to be wired together. Yeah, so, I mean, I can't actually hold this up, but if after the talk you guys want to come and have a look, I can power it up on the desk and show it working and then talk through some of the bits. The great thing about relays is you can just plug LED's on any of it and it lights up and looks really pretty. And also helps for debugging when you can remember what all the LED's do, which 90% of the time I can't. But if I get it to run while open... No, not really. It can't pull the paper tape up. I'll have a fiddle, see if I can get it to work. But if anyone wants to come up and have a look, it's more than welcome to. Does anyone have any other questions? Oh, we've got one over here. Yeah, stay there. Go ahead. Do you have a random question? Have you ever set Tim up on a table on a train just to see what people's reactions would be? I did consider taking it into my final GCSE exam when I had Tim 6. I thought I was told I couldn't because the noise would be distracting. The general idea was to get it to a point where I could run programmes on it. It doesn't really transport very well. Although it is 12 volts and I have considered making it battery powered, but it's not really a PC. I've always wanted to try and get it to... I've always joked about the fact it could run windows if it had enough memory and time. But now I've got a terminal. You could almost write an operating system for it, but I'm not quite sure how much you could actually do with it and how awfully slow it would be. It'd be interesting if it did run windows. How long would it take to boot? Unfortunately, there's not very much light in here, so I'll try and get some data in the relay.