Design a CPU | Ross Mcgowan | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

34 Lessons (6h 57m)
    • 1. Introduction

      1:38
    • 2. Logisim

      13:24
    • 3. Simple Gates

      9:12
    • 4. 1 Bit Memory Cell

      16:32
    • 5. 1 Byte Memory Cell

      4:58
    • 6. 8 Bit Register

      9:34
    • 7. Decoder

      11:35
    • 8. Control Buffer

      7:09
    • 9. RAM

      17:48
    • 10. ALU

      24:10
    • 11. Clock

      10:34
    • 12. CPU Overview

      8:01
    • 13. Algorithms

      14:25
    • 14. Turing Machine

      13:03
    • 15. ADD Instruction

      21:09
    • 16. Stepper

      11:36
    • 17. FETCH Instruction

      22:06
    • 18. ALU Instruction

      27:24
    • 19. LOAD and STORE Instructions

      23:37
    • 20. DATA Instruction

      13:38
    • 21. JUMP REGISTER Instruction

      6:13
    • 22. JUMP ADDRESS Instruction

      5:27
    • 23. JUMPIF Instruction

      23:09
    • 24. CLEAR FLAGS Instruction

      3:03
    • 25. ASSEMBLER

      19:43
    • 26. Assembly Language Program

      10:59
    • 27. Assembly Language Debugger

      8:21
    • 28. CPU

      6:29
    • 29. Reset the CPU

      6:50
    • 30. Load the CPU

      14:53
    • 31. Top Level Simulation

      18:41
    • 32. Goodbye

      0:56
    • 33. Bonus New Design

      4:27
    • 34. 16 BIT CPU

      5:57
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

183

Students

--

Project

About This Class

In this project we will design and simulate a fully functioning 8 bit CPU in a freeware tool called Logisim. We will first look at what a CPU is , this is an overview of the project. Then we will look at the simulation tool called Logisim which we will use to simulate our CPU. After this we will design and simulate the following digital circuits:

1 - Simple Gates

2 -  1 bit memory

3 - 8 bit memory

4 - 8 bit register

5 - Control buffer

6 - Decoder

7 - Random access memory

8 - Algorithms

9 - Turing machine

10 - Arithmetic Logic Unit

11 - Clock

We then take a break and look at the theory of computers and ask what an algorithm is and look at the idea of a computer as a Universal Turing Machine.

12 - Algorithms

13 - Universal Turing Machine

After we have designed these blocks we then move onto the Control Unit which controls the flow of information between these blocks and is the REAL heart of a computer. We build up an assembly language instruction set in the control unit. With the following instructions (don't worry if you do not know what this means it will all be explained in the course).

14 - Add instruction

15 - Fetch Cycle

16 - ALU instruction

17 - Load store instruction

18 - Data instruction

19 - Jump register instruction

20 - Jump address instruction

21 - Jump if instruction

22 - Clear flags instruction

We then bring it all together when we look at the assembler which is built in excel and simulate our first program.

If you have followed the whole course then you should have a fully functioning 8 bit CPU.  WELL DONE !!!

b91928a9

Meet Your Teacher

Teacher Profile Image

Ross Mcgowan

Mathematics Educator

Teacher

I am a graduate in Communications Engineering from Edinburgh University. I have spent my adult life working in the communications industry. First as an integrated circuit designer then in mobile telecomms. My first love is mathematics and the application of mathematics to engineering problems. I also have a love of learning and teaching. Mathematics should be fun and enjoyable and an intuitive understanding should be gained first and foremost. Comprehension is king.

See full profile

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction: welcome to design a CP year. If you want to get the most out. Of course, I would suggest that book, but how? Do? Nor by Jay Clark score. The design we're going to be working through is a one based on that book they were going to start off with a software tool called Lord G seven. Picture is a freeware piece of software and would use that in order to design RCP here. Well, they go on and will lick it the simple gates like on Georgette and aren't in all exclusive Or and then we'll build up a one bad memory, one bay of Memory and in a 256 page rahm, well, then go in design and build on Arithmetic Logic unit and ML core and will design their control section. Nobody dizzy in the control section. We will be designing our or instruction set, and from that instruction set, we will clear on assembly language and from that assembly language who go and create an assembler and exhale. And then we design our first assembler language program and will load and your CPU and you'll be able to see it running have been very protect little bit we had designed to clock for their CPU on of designed it so that you can see every single change within the CPU. So every single one in zero that goes on in the CPU Ubilla track it all the way through and you be able to see those changes happening right in front of you. So first, things like they can of course it. You're intellectually than insane up and let's get started. 2. Logisim: and that's very I'm going to show you how to Somalia. Simple circuit, large ism And they were going to look at how to create high anarchy in order to generate are more complicated circuit using a series of simple suckers. So let's get started. Let's get it done. So when you open up awards use, um, you're paid should look like this. You'll notice that there's a little circle here. Everyone s page called Main less Mainers on Rough Corp addresses will be designed or suckers. So let's go ahead and will design a for Cirque in under a minute. We're going to duplicate simulating the simple on the gate. So you got access to some of the gates here, All the rest of the gates on this gate section here. So a girl banon get less and I get there. Well, police it down and we can change that. All of the inputs from 5 to 2. No, I've got two inputs and blue and one of and red. If we hold it over there and put your silly green circle weaken left, click and drag and Oakley a wire again circle with click and drag, we've got another wire. So let's do the same for the output. No, we got a police pens down so we can please an input pen. So listen and put pen here. You know, she'll get the pen and the wiring section here. Police have Peaden. They will get another penguin will place it. Don't I know we'll get the oh, poop en eso poop in here. No, pig pen isn't blue. They will connect. Depends to the wire. Connect there? Yeah, on their no. In order to run the simulation, we got to go to the little finger section. So we click on that. Now you see that the anthros are both law are both zero and open zero. And all of the wires are dark green color, so the dark green is zero. So I wanted to simulate that. You just simply click on the and put so I click on this egg was high, and it's a late green color for high. But this is an and gate. So we only got on output whenever a both and put school high. So if I was to tell, not and put high, we still wouldn't have a note put. But Whenever we make both and puts high, we got Ohio put shoelaces simulated are very for circuit and large ism and under a manner. And you can analyze the suckers well, if you're going to project. Unlike circuit, click on table and it shows you the truth table for that circuit, so within and get you all again open when both e and b of high. So that is how easy it is to simulate circuits and lord you some. So let's crack on and will design an entire CPU. So nobody seen hope to simulate a circuit and largest, um, let's go ahead and more start building hierarchies. So let me show you what I mean by now we take the circuit that we designed the earlier, which is a simple on gate. Let's change a little bit more change and to our none to get so we can put in a Nok here. No, I know. Okay, well taken a one and give her a zero or a tikka zero and one and we were to place they're not gay here. Then we would have a on on gate on the North Gate. Social givers are a note on or we call a NAND gate. Let's go ahead and build a hierarchy for this, your circuit. So go ahead and press project that circuit and we'll call it none. And you see that there's a nine day instance appeared here, but there's nothing in it. So what we have to do is we have to again to a rough Korpi, which is mean, and we can cut this so control x Jamaican police and turn on and Control V. Today we have the nine circuit and say this little nine instance. So what we can do, you know as we rate click then on and on, we click on Edit Cirque appearance. So this is this is how the circuit will appear in the hierarchy. No, it's not very much public it here. So what we want to do is redo that. No, there's lots of different shapes here that you can use, but let's just keep it simple. Just know, and we'll just replace it with a simple box. So what we could do then is we can take her and to and place an output over here, and we could take up to input e and B. Police have inputs here. We could daily office. I don't need it. And weaken Chef, this little section here over. No. What could you give the pens here? Names. But you maybe one done f You have a really complicated circuit. How do you know which planets which? Well, if you got to click on the Penn assure you in the warm right hand corner so you can see it's moving about and between depends and you can see which one is which. So we give the pens names. So we just click on the text, which is an A. I will call less one e and then be and then we'll giver offer output ever caller instance now. And I never could shift ease up and tear instance, and that's was created or non decay. No, that's nine. Get is gonna be available to us within the mean. So if I go to me in here, that's empty. I could choose the nine gear, and I can move the instance over, and I saw created our first instance so we could go down and say this instance if we right click and we crestview nand that's has been done into the hierarchy that we just created so we could go back to our talk forever just by walking on our men. I know what we can do is we can take copies of thes American, clear another circuit. So let's go and do that. No, this has created a new circuit using four of our nine gates and using a four and Putin nor Kit. Let's go ahead and will Stecher pens in. So we have a red pen here? No, we could connect, eat and put pens, but we're not going to do that. What we want to do is connect all these together, and our boss and ticket was a boss. So let's do that. No, we get to the wiring section, you find this thing called a splitter. So we connect, Click on the splitter and we can change the number of pens on display to eight. So he changed these to it. The fund at the bet would. And also the final No, you know what year that you've got Number 0 to 7. Here you can change. These droned on a different that action by changing these numbers here. But it was just going to complicate things for the moment. We don't need to do that, so we'll just leave. As as so let's go ahead and connect the whole thing up. So let's all connected up or we have to do knows, burn and put pen. No, you're not. As I get any other here. Whenever I place up and actually says at the bottom of the screen and compatible, what's because we're trying to connect? I wouldn't bet pen into and eat better, Boss. So we have to change the DEA bets here for the pen to eight. No, we can also name depends so we can call this pen here. Ice. I don't. I'm a call less pain here or for so know that were built with circuit. Let's go ahead one more time and will produce a hierarchy for that circuit here. So we go to project at Circuit and will call us C one two eggs. Easy ones appeared here. So again we can get to me and and we can copy of circuit control eggs, bacon police NDC won control V slash has gotta suck it here and see one so we can go ahead and we can change the appearance of that circuit and hierarchy. So we goeth into edit circa appearance. And again, we've got their slow drawn here of the circuit. So we changed us and just create another block so we can take these. They're open and chest over here. Now we can take them to shift over here. We'll do it less off. I could take this Israel place over here and we'll give these names. So I gave my go to ear, which is the text that will just call that here. I will call it be Will call. Awful. Wrote Ondo Short. We'll call this off kit, See one So we can place these in to, for instance. Yeah, but only And war we don't need be. And this is a C one. So this has created a new instance That means that this is gonna be available tours again within the main section. So we go to mean it's empty and we can start building circuits up with the two year sockets . We're just created so we can take a non gay. We could take another nine gate. We could take a couple of these. C one is Israel and we can start building up and joined joining these together and build up another hierarchy from these. So let's hope it's build up hierarchies. And that's how we create a complicated circuit from a Siri's off low sample circuits. So let's have a look at a few of those things were going to use and Lord use, um, you get it. The y una section we're going to be using splitter is seen out. We've seen the pen. We're gonna be using the tunnel Israel. So when I click on a tunnel, that Lowe's is to connect two point together thought actual having a wire. So, for example, here are best point here, which is the penny years away. Mr. Connect that there. And I give us tunnel in the game so I could just call it E. And if I was to take a Korpi of this tunnel and then move the corporate of the tunnel, don't. Whenever I move, this 20 governs the same values. Yes, we want to create that one to this point here. Then you see the school's green because this point here has an effect. This point here. So that's all the tunnel does. It makes it easier to connect things together. And we'd have less wires clock, not drawings we have on our thing here called the clock. So if I click on this year and I won't go into the simulation section, you can see here that I can take this court by just clicking it with my most Barton and you see, goes high and little high and low. I can also run a simulation if I could click in to simulate and I clicked tech enable. Then I'll click this clot high and law and will continue doing it until I click tech and evil once more and it starts. We can also have, ah, constant values rail. So I could take out a value of one and I can connect the one see here. I've never reconnected to this point that just told us that point high. We'll be using in Nelson here and the gate section. We're going to be used to stand against North buffer and or non nor X, or we're going to be using the control buffaloes whale. It would be using anything in this place or section. We're going to build them all of our sales, I wouldn't be built using anything from the other Arithmetic section will build everything herself on the scene for the memory section will build everything else up ourselves. Well, the things that were going to be using are the displease. So we'll be using one of these seven segments that will be using a seven segment displays and also this led and also this Barton. So that's pretty much everything that we're going to use and large ism so know when or how it run. Lord you some we've learned about 95% off. Everything we need in orbit largest, um, will limit all the 5% as we continue building the CPU. So that's enough of us. Let's get crackin and let's build a CPU. 3. Simple Gates: and this video, I'm going to simulate the simple logic gates that we're going to use through the CP your design. I'm also gonna show you how we can create very simple logic case using Justin on the gate. So let's get crackin and let's get this done. We could design entire CPU using just the ninth gate so I could change this nine game in order to generate on and on or a nor exclusive or and exclusive North. So let's cover. We'll look and we'll see how we can do that. So if we simulate the non gate, first of all, we'll put up to end Putin and I suggest you go ahead if you got the tool there and go ahead and try us for yourself. So what? On the simulation, we can see that when both of law, though, who is high when that is, hide outputs high. When I was hideout for its high when both our highlight was lost So you can see the truth table for that if you get too finally circuit another expression there so well again, no away who never both inputs are high. Otherwise we get ah hyo put Now we can use this truth table in order to generate the rest of the basic logic functions. And let's go ahead and do that. No. So, first of all, we can change this nine to get into a no gay and we can see from the truth table they were going to do that. We've been into analyze circuit and this is a truth table for non the gate if we were to. No, it's that whenever both nbr zero, we got one open and phone both in beer. One, we get zero slash really war A No get does. It takes a zero gives is of one or takes the one and gives zero retest. Have just have to make sure that these two states 0110 doing a car. Well, that's easy enough. We just make Botham equal to each other. So how did we do that? Well, that's simple. All we do is just connect them together. So we take that together, then we've got a not get. So let's just check and see that actually works. So one gives us, you know, and as usual gives of someone and again, you can get and look at the analyze circuit and you can see there that with Tonder, 90 gay and to a note gate. So let's look at another one. No, we can generally AnAnd to get from the nine gait by inventing the output. But, you know, hotel very weakened issue. Is this little not get here, but already designed, annulled. Get using a non gate so we can go ahead here and we can produce this. No que here and we can connect us to. I liked it. So what? We should have here know as on on gate. So let's go ahead to see if that's what we have. If we've got 00 go zero here for making high Nothing harms neither high. Nothing happens. Make Botham high. Then we get a note put there. So that shows is that with created an and gate using two man gays and we can see that and the analyze circus. Now we can see that we only get a note put when both e on be it high. So let's go ahead. We'll have a look at another one so we can create an or get from 39 gates and That's the realization there. So a simpler of a man gate and these two nine gates are connected together as and veritas or or not gays. So we unveiled the inputs we can create on or gay. So this thing here, just the Seimas one of these. Okay, so let's go ahead and we'll just shake that. Make sure that is actually walking. If I make both of them. Zero began. Zero puts will make wanted to high. We got high end Putin open. Or if I make that other Hi, we go. Hi. You never make Botham high. We got Ohio so that there is a realization or an or gate. So that's all you can see this and make sure you've got it right. So here's the truth table for an or gate. So we get open F e a or B or both or high. So let's go ahead. We'll look at a little so we can create a nor gate know simply by inverting the output so I could take it on one of these nine gates and tied the two together and put it as a no poop . But we don't need to. We could just put industrialization here. It's the same thing so they could put I said here, you know, of course, A nor gate using what would be 12349 Gates. So let's go ahead and check and see where less actually works. So for both they and pushed our law, we get Ohio put. When one is high, we get a load. Put another one's high, we got late. Good. When both are high, we get a won't put. So that's the nor realization. You can see that the truth table. So there's a little truth table there, so we only get a hyo put when both and puts our war. And that's the in effect the opposite off the or get. So let's go have a look at another one. So this is a realization for on exclusive or so we can build an exclusive or using 123 And if those are replaced by nine gates up with 459 gays, let's go ahead and check and see that actually works when I've got two zeros in the input of zero Note put when I've got a one and and put the it I've got a one A note. Could I've got one and then put a good one day good in front of goal? Both ones, of course, A zero. So that's called an exclusive or and will see the truth table for that? No. So this is the truth table here for an exclusive or we only get on if either A or B is high and of both our law and both are high. We don't get a note. Of course, we could create their exclusive nor simply by investing there, so so we could delete us off much That can another better and that we gives our exclusive nor gate. Now we can see that if we want to look at the I know I circuit, and this year we pay on exclusive. Nor there's no very efficient way of doing this because we're going to be doing it with 123456 Gates and you can do it with five gates. So I'll leave up to yourself and you can work out the realization for a five game exclusive . Nor, if you're interested, of course, you can also just go to Google and Google if you want as well and go build up so we can create all our basic logic ailments. Just using one single logic type, which is the NAND there. We could also do this with the North G as well. So she was. They were able to build up an entire CPU. Every little want to just using one gate tape either the NAND or the North. My original intention was to get through the entire CPU design just using the ninth gate. No, I decided against that for a couple of reasons. The first of them was purely aesthetic. Whenever I created the gates, my drones for the gates with probable Bayless tighter than the joins you have here. So I decided for that reason that I would stick to just the gates that they offer here. But more importantly, whenever we run large Isam to create the CPU, we're really running. It is very limits. And if I can cut down the number of gates, then it makes the simulation run about bear and run a little faster. So that was part of the reason Israel why they say, did not design the whole thing and nine gates. So this video was of use to you. It's just a little are then to get used to using the two on Also get used to the some of the basic gates that we're going to be using throat the rest of the design, so get on the next video goodbye. 4. 1 Bit Memory Cell: and this video, we're going to build up a one bad memory sale. I think this is probably one of the hardest videos and this year we saw stick with it. So let's start off with an S on Larch. So what we have here is an act of law s on latch. So we get to nine gates the output of 19 get feeds entered and put of this other man Get on the vest. Nine Get feeds into the input of this nine Get we've got I set Onda reset for our inputs Got que onda? No cure for our outputs Now the cure knock You are compliment ments which really means that f cures a zero there no queues of one f cures of one No, que isn't zero. So in order to use this we see that it's an act of law a sun lodge That means that the only toggles on the open whenever there and pickles from ah, High State to Awasthi that what we mean by toggle is that the Cuba become a one and the knock you become a zero. So let's look at our working at the moment so far a total. If I changed and pure s from a 1 to 0, you'll see that talk going and they received out total there. No favorites, too do the same with the reset. But if I change the input from a 1 to 0, you see that toggling and actually tobel a cup? No, this is how we want to use this device and their state. When the inputs change, no puts talk all. So let's go ahead and we'll look at this in a truth table. So this is a truth table for active law s. I watch. We have a representation are 000110 and 11 north have repeated 11 twice who have a right pooch Q. And no cure? No the condition. 00 There's no allowed because that's would make you and its complement knock your equal. That's called a northerly condition. It will deal without Lee around in the video. There, you know it's the state 11 It started twice because 11 could be an eye that conduction que could be one and not Q q B zero work. You could be zero and knock. You could be one. So I slick it. The conditions were s off on conditions 11 So let's take this one. For example, the 1st 1 let's say we have 11 and cure is one and no cure zero. That means that everybody jumped doing to this condition here 10 which Toby 10 and our value over s would have changed from 120 So in this condition, whenever out s changes from 120 we don't get any change. But everybody, unless condition and we jumped from are from 1 to 0. So we were never gonna anyone in zero with a toggle because our cute no b zero on one so maybe bet difficult to fall. Also take a tame and maybe reversed the value back. And you can listen to that one again so equally we could look at it. And this condition here we could be in S and R could be 11 and Q Q b zero and inoculate you beer and one So everyone to jump from this condition here don't to less condition. So that would mean a cure nor cure, which told me they see him in this instance year are would have gone from 1 to 0. So if we re go from less condition here and our our changes from 1 to 0, we don't get any change or no cure and no cure. So they don't tobel but equally everyone s condition here and our our wish to toggle they may be go from this condition to this condition here. Therefore, our Cuba be one No, no Q B zero. So I mean, there are cures and no Cuban of talk because it was started off 01 on notice 10 So that's a little description off active Lewis are large, so it's going to have a wee look it this in a bit more detail and what you some So this is our ace on large setting in this, you know, zero condition and you can see that open is one and one. But that's not all old state, because we want to make sure that these outputs are compliments. So we can't have one and one we can all ever have 011 and zero, and we're going to go and change the circuit just now, managed to ensure that that doesn't or car. So know that Let's look at the 11 ST So I mentioned in the 11 ST that they're pushy. It could be zero in one or one and zero. So at the moment got limit zero in one. So let's change it. So it's 10 You know, we have the output HD as one and zero, so we can see that. What the s and they are being both one. The open could be 10 or 01 So in this condition here, who s is one artist? One curious one and no cures. You know, it doesn't matter what I do to this s as North 81 the output. But no in this condition here, if I was to change, there are from a 1 to 0. Then it will toggle. And you could see that toggling here no equally if I was to no total. There s from hi to war. You change the extra my toe or you'll see that tor going and you could see that total there . No, this is the condition of which we will be using the circuit when it doubles like this. So Now what we've just belt here is a very similar circuit but will follow the than enable section. So what we have here is an act of high ace on watch with on enable there's active high because the only total to whenever it goes from law toe high. So it's really the opposite off what we did when we did the act of Law sa large on divided than this little in the able section Israel. So nothing will happen a tall and told the enable goes high. So with enable law, it doesn't matter what we do with the inputs. Nothing's going to happen. So there's nothing happens inputs and told Enable goes high on after the neighborhood was high. It follows the truth table which we're going to go and have a lick it No So here we have the truth table for an act of hi s I'm large Bethan enable to have run puts s and are now you'll know it's the snout repeated 00 deputy twice as opposed to the act of law put its one in one. We talked about 0110 and 11 We also have an enable pen. Israel? No, Then able can be one or a zero. But we know that whenever it zero, nothing's going to happen. No purchased remains as it was previously. So we're really interested, really, whenever they enable goes high. So I see the neighbors said not high on Let's take the first condition here. Where s is zero R zero a move core cure zero No cure is one. So we can go from this condition here that we could jump to this condition down here where they que no que are stole a zero and one tonight case year. What would have happened is this. Our would have changed to a one. So whatever the kind of changes for one from the estate here we just get the state that we had previously saw this year on one doesn't change. It's just remains at zero on one number four. But in this condition here. And it changed from her zero and one and it jumped down to one zero, which is here. You could see here, then the war would have changed, would have been are set or say it would have gone from a 0 to 1 another. instance there. Then the o period of total source. Togo from 01210 So have a look in this condition here. When s zero. R zero and we're in possession Q one and Q zero. So in this lane here. So if we go from the 10 let's see that remains the same. 10 Then what will happen does the S would have totaled from zero to a one. So that condition there when I stole from a zero to a one hope remains the same and finally effort. And this condition is an R 00 and cure no cure 10 And let's see that who had totaled from 10201 Then in order for that to be the case, there are must have changed from zero to a one soberness condition on our changes from 0 to 1. Then we toggle from 10201 So that covers all of the possible a push that we have owner Active High s I'll watch with her enable. So a semi final look at this and lord you some. So nothing's going to happen in a circuit whenever that enables Law was seen on a second ago, so there's nothing happening at all. They're open, it's just remain fixed. It's not told the neighbor was high, that the airports are able to change. And as the city of this is an active high, So if we go from a war condition here, they'll only Togo. Whenever one of the sets of resets goes high, so you can see here that reset there has gone high and it's totaled. Jennifer could say this high and you could see that That's no told so we can continue toggling like that and you can see that changing them to and output talks. So now what? We want to go and do as we want to change the circuit so that the no allowed condition never ever cars so that as we never, ever want the set and reset to be the same value. So this has made a very simple change. We get rid of one of the pens on we put in a nor gate between the two inputs, so that ensures that then puts can never, ever be the same whenever that someone that will be as usual whenever that Tzeitel. That will be a one. So no, we've got very intonation. Little suck it. And this is one bit memory cell. And let's see how that works whenever there enable goes high. Then this becomes an effect. That transplant watch what that means. It just passes this value of their state through to the output. So look at one look at one zero was evil. I was just passing it straight through. But one of us, the enable goes law. Whenever we change this value for set, nothing will happen on the output. So in effect, it saved that one bet holds memory whenever we put their enable war. And whenever we put their enable high again, we could change the condition of the memory sale. So let's say we want a 01 in the memory sale. Plus a zero in the memory sale on the zero has no fixed in the memories sale. When we change them, put them who doesn't change. So in effect, we've found a neat little way off storing one bit of information. So another thing to note here is that, well, not really interested in this No curious section we can just get rid of it so we could just delete us off here. And we really have a little memory sale here. But we're going to be using one toothy 45 gates for this memory cell, and we can simplify it. Don't afford gets so high school and do that next. So this is a fatal one. Bad memory selling this bellow 49 gates and we can see how this is going to work. Let's see, we wanted to pass a value and to our memory allocation. So let's say we wanted to pass the value zero into the memory allocation. So zero Stan here went again to the neighbor allocation whenever the neighborhood was high . We can then pass that value through and to the memory allocation. Whatever the enable goes law, the values No Haledon, that maybe allocation. So does mild. What we do with us s not value or zero is hailed within our maybe allocation. So let's go ahead and we'll go and more builder instance for this. So we're going to project at circuit and we'll call this CP your underscore name on the school one, and you can see it's appear to year So we get to mean animal cut and paste control, Lex, control V And every again here on wall we creator circuit so that the appearance is a little bit better. So we can just make a square shape. It's less is finally completed on one bad memory sale. That means begin to mean Morgan access to their sale. So we have got one of them there. Of course, we can take copies of this and we can clear two bets, three bets, four bets and eventual. We can walk away and clear and eat better memory cells. So that's what we're going to do on the next 30 or so. Thank you for less in this video. I'll get you in the next video Goodbye. 5. 1 Byte Memory Cell: This is a nice, easy video compared to the last one regarding ticker, one better memory and create one bay of memory. So let's get to classes. Created our one day off memory. All of those put school to the split out here, and then they go to a notebook pen. All of them put school to the splatter here and goes down and put pen all of the sets or joined together and go to this same pan. So just be careful on your belt. And that's because that's and poop in here was to possession zero and then put possession. Zero. Is that the other side here? So don't go. Max General, mocked by Putin s any pen seven by mistake. So I score head and we'll see how this works. We know that whenever they say is equal to zero, the hope who just remains the same. So whenever I change them, too, there's nothing happens to that. The value there is looked. And the memory no, it wouldn't pass this memory at this information into the memory that is, that would rate into the memory and told the Seko's high. So they say, going high rates and to memory. So there we go, the sets going high and we were threatened these values and to the memory. So Dave down and saved one of these. You'll see that that has been say hi. Now if we were to change any of these at the moment, then this is just a NIF. It looks like a transparent watch, so that just passes whatever value have direct with through to the output. But whenever they're sick was law, then this information here is retained in memory. So it means that whenever then put changes, there's nothing happens to the output. So this means that they admit this one day of memory has no bean saved. It's nice. Go ahead and build up the hierarchy for less so we can get to project. I'd suck. It will call it CP Year. Underscore name. Underscore it and they see it's available here. So we get to mean everything. Grab a circuit control X control V and I says, Go, Our circle available occurs. No, we can go ahead and to the CPU on the school Man on the school will right click a Tasaka peons and I'll go in and I'll adjust the circa peons. No. - So this is Belle Upper One bait off memory and we've got available to us so nobody could get And we can pick out one bay of memory. And we can use that. No. And the next video, We'll take this one bay of memory. Well, I've done an enable section on to the end of it and build up a register. So that's all of us for this video. I'll get you in the next video. Goodbye. 6. 8 Bit Register: we're going to build on enable section and less video. We're going to use this section along with the one bay of memory which was already belt in order to produce a register. So let's go to so that's ours. Bell are enable section. So let's go ahead and we'll see how this is going to work. What we want to be able to do is take the output from one day of memory and pass it on to external self kidney CPU. So, for example, pass it on to the boss and we want to get the information off that maybe allocation went to the boss and we do that with the enable section. No, of course, eat on gates year. One of them pushes tight to the input here, and all the other inputs year are tied to the enable pen here and all the outputs are tied to the split up here, which is the output so that we an and gate waters is the only ellos hyo poop whenever both inputs are high. So it means that the information is here on this. Say the I'm gay. I will only get passed over to the other side whenever the enable whose High Joe let's see that's walking survivors to keep the enable law and I was to change all of them, puts toe highs. You'll notice that none of these get passed to the output. They will only get past it open whenever the enable was high and when they enable goes law . It disconnects that. So I say this is going to work and we're going to use this along with the one bay of memory in order to produce a register. So what we want to be able to do is control the information that flows into the one bay off memory. And we do that with the set and we want to control the information that flows out of the one bay of Memory. And we do that with the enable. What we see is the set race to the name allocation on the enable reads from the memory application. So they say places, information and to the memory but bait and the enable passes our information from the date onto the boss or some external part of the CPU. So let's go ahead now and will create the hierarchy for this. So click on Project aren't circuit and we're gonna call less CPU underscore enable Grab acerca control X and please put and to the enable look control the You never work again and we can change the soccer appearance. So great click. Edit Soft Campion's So I take the enable section along with one bay of memory and will produce a register. So if we can to mean and we hope one day off memory on, then enable sanction no, we have to do is connect the output of our memory location and to the input of our enable section. There's no put from the enable on. There's an input to the memory location. We've gotta say it pen, go on, enable pun. So I'll go ahead and put these pens on and then we'll have a look at that. Soccer we have here a register so let school and we'll see how this works. Well, then, input which goes into the memory allocation. We have a note. Put what you go to some other part of the CPU. We want to be able to control the information flow on and to the memory allocation on. We do that with the set. So they say, Well, right, information and to the memory location that we want to control the floor off information of this memory allocation. Want to the CPU? And that's done where, by the enable section. So we see it say that the enable will read information from the memory allocation. Underpasses are on, too, the CPI year. So I see this actually working if we were to place information and to the memory allocation , so that was placing the information. And but nothing will actually go onto the memory allocation and told the saying goes high. So whenever the Seko's high, it passes us information and to memory. We can see that here this say it's going high and it's past these ones and to the memory. And if you get down into the main Maria, you can actually see it here. And that's say it. Maybe so, no whatever with a safe course law, that memory, that information is no Haledon, not memory location. So if I was to change the input to the memory allocation, you see that when we can say that nothing will actually happen. We've changed the values that input, but the memory has been set A ones and again you can see that. And so say that one. Is there there we want to be able to pass that information. That's Haledon s memory allocation onto an external boss or some other part of the CPU. So we do that with the enable section. So began here. In the moment we have all the ones sitting here, but nothing will get past the one to the rest of the CPU and told enable Whose high. So let's do that. No. So we said they enable high. You'll see all the outputs heading off to the external part of the sea pier. So that's well, actually head off to Ah, boss. So we go back in there, you can see this first has passed the information. So that's how you arranged was going to work. So let's go ahead and build a hierarchy for this. So we'll get to a project add circuit, and we can call less CPU underscore Reg on the school. It I began to mean we can cut. I'm a pastor and two CPU Reg, and that's great. We can't go ahead and well, change the look of her appearance of the hierarchy. So go ahead and do this. No, it's NASA's finish building. Andi bet Register. So we come quite far was built a one bit of memory well built. What bait of anybody with built on enable section I'm a built a neat but register. So in the next video, we're going to go and look it Building a decoder to thank you for listening I'll get your next ideal goodbye. 7. Decoder: So let's look at designing a dick order. We're going to look a two by four Dick Order. There are three by year and then are fooled by such Dean. But what's important and this video is that you can see that we originally started off with our little CPU design and have built a few off the block. So we're broke, Bill. Our memory wouldn't bet on it. Bet on enable on our register. But from this video onwards, when I still going to go and start looking at there completed CPU designs. So we're going to go and don't Lord the entire CPU. So we'll open up the CPU design, which is on the the resources section, and we'll get the four by 16 on the three by eight dick Order from. This is a push to build on it by hand, so you can go ahead and build it by hand if you want to. Or you can use these here as a basis to build your own. Or you could just use the ones that were actually half here and you can simulate on the actual designs that we have here. So it's up to yourself what you would like to do. So good luck. And I hope you enjoy the rest of the video. So what is that? 1/4? Where? The square simple thing. Let's imagine we have two inputs. So, for example, we had could have an input here, which is this column on and be, which is this column. So if we really got to bets Betsy and bet be but those two bets could gathers four possible combinations, so we could have a 000110 and 11 So, in effect will keep you Putin to bet, son, but we can get for So this is a two by four dick order. It takes the two bets and gives us access to all four combinations off those two bets. Let's go ahead and we'll look at the three by it. So this is a three by year Dick order. We've got three inputs, so get three batsmen again. I've got eight possible combinations off those three bets as an open. So that means you have got three end Ennio versus a three by Dick Order. So we need to build a circuit that Oliver's to get access to all of the combinations off the individual bets that we put in here. So let's go ahead and we'll see how to do that. - So what we have here is the start of a two by four dick Order of God and put year on Input B. And I'm just putting Why don't for those of also created annoy and no be by per tni's through on in vector So no gun No, he and not be so. For example, when nbr 00 the no a an opr gonna pay one and one No What I want to be able to do is I want to be able to tighten the open on these iron gates high depending on what they impose. So for example, if then Putin as zero and zero, I want this one to go high. If then put zero and one Andi nb I want this one to go high left then put as 10 on what this want to get high? I left them poo is one and one or what? That's one to go high. So I have to connect these four up to these two to create a two by four Dick Order. So let's see how you were going to do this. If we want to get a higher note put here, this is an iron gate, so both inputs will have to be high. So in order for that to be true, Africa 090 here, the only way to get them puts high from a 00 as if we take the compliment. So when you take the compliment, we connect this one here to the North Sea. I will connect us one to the note B so we can see here. Know that whatever we got zero. And as you know, here we get Ohio put. So if I was to change these, you can see that has changed her law. That's wasted it For what? So let's look it the next one. If I wanted to get high on the output here for a zero and a one, and put that would mean that in order to get the higher, but both of these would have to be high. In order to do that, I would have to come from the compliment off the to make this one, but I don't need to come from the complement of B because B will already be high. So I can go straight to be And this here as the second part of ah Deke order. Because whenever we put zero on a one and then that should go high. And there you see it that so I moved on to the next part off the dick order. So look at the 3rd 1 No, in order for less too one and zero together So high. Well, we have a one for your a disliking go straight to e. And we have a zero here for our be So in order for the zero to go high, we'll have the glory that be compliment so as to be compliment there, you know, we simulate it will see that we're gonna have a one and a zero. So it's one on a zero, and you can see this one has gone high so far, you know, a 31 on one than the one to go high. Well, that was quite easy. We could just go straight from a and B. So go to a I got to be whatever. We put in a one under one. You see the scores high. So that says I was built a two by four Dick Order. So let's run through it. So it goes zero and then I go to the one and in order to to and in a war two three. So carrying 01 two and see or feel like 1234 lassos bellaghy quarter so as a sample de Cordoba Bella to before. But we're actually going to use three by eight and also fall by 16. Dick orders, and I'll go ahead and build. There was no, and I suggest you go and train Builder was yourself of the same tape off logic is we've got here. But it's just gets about more complicated when your admin three inputs and then four inputs is easy to get washed in it. So you can either build yourself or you could just take a Korpi off the one that I've got here. So this is as a bit of a crossroads in the CPU design. We've been able to design a one bet memory. When Bay of Memory they enable the register on revokes have seen ho to builder Dick order. But that's too before Deco or does not where we want. We actually won a three by year on a four by 16. Now you can go ahead and build Lose yourself if you born and continue building thesis less up yourself. Or you can go and open up the finished CPU A design. So in order to do that, we can get to project lewd library. Would you Some library and you got access to CPU under this underscored design and the result and the resources section So you can go and you can download that and we can all now up and you'll see a peon here at the bomb. So there, Cp, your design here was for us in order to get used to using largest them and used to build up circuit. So hopefully you have a good understanding of how to do that? No. So we're going to be moving on from this little section here. Want to the actual CPU design? So if I click on night CPU design, you see the entire CPU a certain within their and you can see some of the block to have built up and of the same blocks that we have in the CPU designs. For example, they may m one the Mamiit that enable on the register. But from this point on, we're going to be using the actual CPU design here because it's going to take a long time for me to go and build up by hand. And you don't really need to do that to watch, not because of God all belt here already. So, for example, worst grin and we can look are oh, four by 16 Dick Order. So every double click on that. This is the four by 16 Dick Order circuits or I'll make about Small are so that we can we can see it. Okay, so let's afford by 16 Dick Order. But it's exactly the same as the two by four record of the theory is just the same for it. So you can go in here and you can actually open these up, and you can Samueli within each of these individual blocks, and you can see how these work so equally if you want to build it yourself, you can open up a couple of instances off the large ism and you can start building it and you can use that this year as a template, or you could just Korpi Oh, and you could piece the end to your own design or if you want, you can just listen along to the videos if you're not building the actual CPU. So we can also have a look at the three by eight Dick order there as here, CPU decoder underscore. Three under school, three times it. So when you open up here, we can go ahead and you can simulate this. Actually called that here. And if you want, you can Korpi and to your own instance, and create on your own Aniston's for if you would like or you could just use this one. So, for example, got 0000 came in. Oh, that's a more significant. But Sally Significant. But so we have one without you. See the next one come in life and then comb through this in a binary fashion. Okay, so you can get through this yourself and you could test their so and see how it works. So that's all that is for the record, A section We're going to be used in this and the ram. So that's all that is for this video. I'll get you on their next video. Goodbye 8. Control Buffer: So when you start the simulation fail, you start off with this page here and you see that we've already designed some of these elements the name on the school, 1 may month excoriate that enable the register and have seen how the dick your quarter as designed. So let's have a quick look and see that these are the same elements that we have actually designed. So you can see here that the one bet mammary well, let's the sea the eat Batman. But he has to seem Israel. But no, When you commented us in able section, you see it's fairly similar. But if call these extra idea gets here, they these gates are called control buffers, and that's what we're going to talk about. And this video. Let's have a look at the circuit here, so let's imagine we had a Boston less one boss wire here, and it's connected to two outputs. There's no for this on game on, Hope that's on gay. And let's see, the inputs here are comin from C and P s. So these inputs is a common from some other part of the circuit, so you get some complicated partners circuit feed, none eventually going And I am gay and they're on your boss. And they seem for this and put here some complicated by over circuit heading out in Assam Gate. And only this boss Now you'll notice that And the sanctions here, the boss is red because there's an error here and you can see where the era cars. Because if this is an iron gate, it means that this is one and this is one. So, as far as I sound get is concerned, there should be a one. And outputs of this should be going Hi. Your name here, but essentially is here because zero on a one cent means that in the sign gate here, they could hear should be zero. So means it. Oh, put here is telling the boss tickle high and that's over here is telling the boss to go law . So, of course, the software tool here, Largest slums. Looking at that since in what do you want? Do you want to be high or do you want it to be a little and we're no actually telling it, so it doesn't actually know what it's going to be, So it just gives her an error value that says, We don't know what the value of this is going to be. It could be one or it could be zero. So we need to some other way off connecting these outputs. So there's only one of them gets on in the boss. Anyone tame, and we're going to do that. Use in the controlled buffer here, Celesta control buffer here and you see these throat, the the designs. So there's one there. I know another, another one in here. So these do exactly what they see. The ardent extra control on the before. I don't mean to this. Separate the output from here. They put their sound, get to the and put to the boss. So let's go ahead and we'll stick them on just no more. See how it's gonna work, right? So that's the man. No, there's also an extra pen here, which is going to be our control pen. So there's a control pen for less one on a control point for this one Israel. So at the moment, what we'll do is Woodstock and a couple of buttons. So is about in their fish north. I will put on another button for this one. So all the button does is total. These here. So when you press the button, it goes high and every let it cool. That goes law. Now you'll notice right away. As soon as I would end there and connected that, you'll see that the the red wire here is going to change to blue. Sorry away. That's about healthier. Okay, it hasn't seen that there's an error. Is just seeing that the blue means that it doesn't know what the value is actually going to be supportive in any other value. A sexual scene. The mobile born a failure value there. It just doesn't know which one as it doesn't know which one, as until you actually say that's here. So whenever I see it, for example, a place that's about in here then this enabling Here you go high and it will pass the open from this on. Get on the bus or the boss, You go high. So you see have total that they're on. The mosque was high. Well told. Go again. You see the bus going high? No. If I was this graceless one here, then it means that because there's a 01 here that but war. So it should pass that will value. So they put should be law. And there you go. So the control buffer actually can switch physically, you think of a better. It's physically separating this point here from this point here, and it only gets connected whenever the and put here at the control point was high. So this is a perfect way off. Connect and multiple and poots to multiple open sort of here to one bus. And you see these control buffers throat the rest off the design and you'll see that are connected to the open off registers. And the control line here goes back to the enable because we're only wanting one register attained to go into the bus and the register that we want to go to the boss is the one that has had the end able going high. So I said, I don't look at the enable block have seen here that we've got these control buffers on the output and the really workers that whenever they enable Pangos hi, we're going to pass information from a memory allocation onto the bus. So whenever this goes high, the control buffer and the the control before controlling goes high. And then, if ate, the switch cozies and it passes the open from the memory allocation straight through or to the boss. But of course, there's lots of other items here, lots of other parts of the CPU that want access to the boss. So whenever this is saying I zero, these control buffers and effect the electrically separate this point here from the boss. So it's almost Laker off on open switch. So that's how they control buffers work, and you'll see these control buffers all over the CPU. So everywhere that parts of the CPU that that one access to the boss we'll have to go through a controlled buffer just like this. It's not sold for this video, and I'll get you in there next video. Goodbye 9. RAM: So this video is a baggy. We're going to build up a rahm that's around them. Access memory? No. We wanted to build up a 256 bait Rahm. But to be 56 base would make largest Cem run really slowly. So what we're gonna do is build up a theory to bait rum, but as extendable up to 250 sex. So if you have a faster machine and it runs better than main, then you could potentially have a larger rum. But 32 base is feign for the moment to get started with. So let's get it done. So before began to Lord you some less ever we look and see who we're going to design a rahm . We're going to start off with a four by 16 dick order. So that's takes four and puts and it gives us 60 note puts. These 16 outputs are going to get be connected to Vertical Lane, so we're gonna have 16 vertical lanes here. So that's 1234 All belong to 15 16 within take another four by 60 deke Order, which will have four inputs and 60 note puts. But no of course, 16 orders on toll lane. So 123 all the way down to 16. No, thank you know as the crossover point here these lanes don't actually touch you can think about. That's in three dimensions as these lanes passing close to one another, but all actually touching one another. So that means there's going to be 16 by 16 little crossover points. There's going to be 256 crossover points that what we could do is within each of these boxes. Here we can please a register. So this rages to here. This is our CPU on the school register on the score E, which we have already designed now, in order to choose one particular rages still that we want to work with. What we could do is recon connect each register up to, ah, horizontal on a vertical line. So, for example, every wanted to choose this particular register. Then we could make the less vertical lane who high and that's the register will be connected to. We could make this orders onto Lengel life, and this may just of adult to be connected to the horrors on two lane, so it means that each register off the 256 of them are going to be connected to are vertical and the horizontal line. So that means we're gonna have a method off choosing each one of the 256. So they should become more apart forever because start belting up. But there's one other thing I'd like to cover before began to Lord use. Um, so of course drawn here, or only two off those registers. So that's one of them here and not sell that one here? No, we know that that registers got, say, underscore on enable and with often over there, settling was high rates information and to the memory allocation on whenever they enable goes high. It reads from the memory allocation and passes on to the boss. But the thing to note here is that all of these impose they'll go to the MP off each and every one of the 256 registers. But nothing will happen with the input until we choose one particular register. And we make that choice via the horizontal and vertical lines over matrix. So it means that all of the inputs are all tied together, all of the sets at all tie together. All the neighbors are all tie together, and all of the outputs are all tied together. So let's go ahead and we'll have a look around, largest them and will become a lot easier once you see it. Design and belt. So let's not get lost here. What we produce so far, there's no one better memory. One bay of memory have gone on a book section. We took her enable under May meet and produced this little register. No, but we're going to do is we're going to take the register and we're going to read Do it so that we can incorporate the ideas of a vertical and a horizontal choice. So I'm going to open us up and then we'll talk you through. And, of course, you can go ahead and build one of these for yourself if you want, or you could just use this one. So that's the CPU on the school rage on the school bait. So, in effect, vest this war heart. This is what sets at the possessions between the vertical and the horizontal lines. So what we got here? It's just a CPU rage. Underscore it. So we've seen this before. That's what with the Zane. So let's grandness aid on. We'll check and see. We understand what's and say that. So I've got little memory sale here. So we say the information and to memory and as we write and to memory under enable will reader memory and to the boss And, of course, of put and one of these control before serious bail, because we're connecting onto the Boston when you connect on it. The boss We need to have this control buffer. One other thing you see up here and here is a little pen, so that will help endear. I've just put up and it just works its way up through the hierarchy so that we could see what is actually and say this memory elements. You just give us a way off looking and say this memory element without coming don't through all the levels of hierarchy. So we're seen everything this and here before. So it's goodbye, Ken to rage bait. So a few extra gate Sadly, then here. So let's talk about these. No, I don't have to choose this particular memory sale the horizontal and the vertical lanes will have to go live. So I have to have a connection onto the horizontal line from matrix on the vertical lane from our little matrix. Now let's see, for this particular memory sale that the horizontal lane has gone, life on the vertical lane has gone life. That means that we are actually choosing this memory sale. So we put us through and I'm gay. That means when both of these go high, we get output here. So this is telling us that spare body sale is going to be chosen and we're going to do something with it. But no, what are their options? Were the two things that we can do with it, where we can either right information and to the memory sale. Or we can read the information from the namer sale onto the bus us through the say and enable. So what we do is we set up the set on done enable pens here, So let's see, for example, the set goes high, so that size this year, when they say is going high, we're gonna be passing through the or gate so it doesn't matter what the reset does when a passing through us or get that scores high. So that means that have chosen this sale from this point here. And then we've chosen for this point here. What would you like to do in a sale? We would like to read right information and to the sale. No. Well, this other option, we Maybe we didn't want to very information and maybe wanted to read information onto the boss tonight. Kiss The enable would go high in this case here will be passing information from the sale. Went to the boss and again against through a unit again buffer. So there's other two options. There's one other thing here that have I d then and you're Lewis. This this or get that war would to be able to do as I want to be able to get in and re se They're all to 256 Bates all at the same time. So through this little reset pattern So that's three say and effects over raids everything . So it doesn't matter what happens to the horizontal, the vertical, they say, and they enable whenever let's reset comes on, we get a one that passes straight through and to the same. And this goes in and it just resets the register. And this set pen gets taken out through the entire hardly hierarchy all the way up to the talk. So there's so little one day off memory works, which we're going to use for, Oh, 256 Bay Rahm. So we're going to take 256 of these. I was said before that all of the inputs get tied together. All the outputs could take together. All the six get, stay together. All the enables get tight together. Jealous? Can we go have a look at the 256 bait Rahm they don't get freaked out from began here. It's gonna look quite complicated. Maybe about 1/4 but all as in essence as 256 of these blocks with all of them, and put output sets on enabled, tied together on a couple off. Decoders are very critical one and a whole resort to So it's again and we'll have a look at that. Just know. So if we click on next instance, which is CPU under School RAM or their schools to five sex. And there we have it there. So Walter is old Zim a little, but so we can see Well, we have. Of course, this is really quite small. So may be difficult to you. See you to see, but also men who have a look around about it. So we're gonna have our four by 16 dick order at the top, and we're going off 16 vertical lanes coming down. We're gonna have our food by 60 Dick order at the state here, and we're going have 16 horizontal lines. And each little sport here is going to be one day off memory. So they'll be 256 of these. No limitation. Back end and we'll get through and every bit more detail. The first thing to know is here as that we don't actually have 256 off. These little instances of only actually put n theory two of them. So they're 16. Enough. This lane here and the 16 under the second line. Now, the reason why of all the to end theory too, as a friend of a 2% 250 sex, then lord use, um, will run really slowly, and it runs a lot faster with only theory, too. So I scan and have a look at this and a little bit more detail. You see here that we have eight bets committing coming in, and this is going to a little register. This is called the Memory Address Register. Now those eight bets Kitzbuhel and 24 bets, which go to the vertical dick order and four basic oh, to the horizontal dick order. So, depending on the value you choose for the best year will depend will determine which horizontal on which failed to call lane that were choosing so this year and effect it's called the Memory Address Register because it determines which bay in memory that you're going to go in and make lives. Now we can see here that we have a little sale here, so we'll drop down into this and that's RCP your edge. Bay it unless you're still little sale that we've seen before. No, let's go buy a coat to to face six bait Rahm, They can see here the turn 56 of those. And one thing to know Israel is that you can see why off taken the output for each of those have taken out, put out and this is an actual pen here. So this gives is the value that's held in this man money sell. So it loses just again and have a quick look defender. What? The values are rather dropping in to the individual cells themselves. And you see here that all of the recess off tight together and we got all of the inputs or get tight together, all of hope. It's all tied together, and all the sets and an evil stay together. Now it just looks really complicated because there's 256 of them. But it's no definite from just building up to potential what you could do it. You could build up just to thumb yourself and have a look and see how the work. Or I suggest that you open up this particular instance year and just have a little Pleo boat with it, and you can see here that we can choose a particular memory sale and also they say will depend will determine where they're actually going to be. Rating to that memory sale under enable will determine whether we're going to be reading from our memory sale onto the output, which is one to the bus. So that's all we have to see here about 256 by Rahm. What I suggest you do as that you just use that as a as no with one with theory to base, because that's all we need for the woman. But if you decide that you want to increase the base size, you can increase yourself simply by core peeing the block here. I'm just pasting. And so I've left all of the wiring there so that you can extend it from theory to Bates to 256 base. So let's go in and we'll have a look and see what the 256 bait ram an instance looks like. So if I click on mean and then you click on the 256 you'll be able to draw a diagram. Instance. No, that sentence. There you see, it's quite large. Makes clean a bit smaller. Just a minute. No, for me. Click. Drop the stone. You see that? It doesn't appear instantly. It takes some time. So there, because that was about 10 or 12 seconds. So it takes some time for it to actually drop. Don't cause a quite big stair blocks in this world of information in them. But it's not too bad this doing them every 10 seconds or so, but we can zoom dough number so we can see it. Well, thanks. So that's the whole thing. And you see, split into a couple of sections does a maybe address register, which is a talk. And we have the rahm section here l a born with the name and address registers go are set on a social go there address the That's the input come into the maybe the dress agents on which truth chooses their particular raw male in the you're interested. Then it's also going to be able to say it's got the reset and it's gonna and put on escort . Put on your Lewis These little doors here. These are there outputs from all the 250 sex Bates? No, the reason why I brought those. Oh, with in order to see and ensure that all of the turn 56 base our say it properly and you can see here the ones in black are fine, but you can see when our own job there's a whole load of here this year and red. So that just means that really, whenever rebuild a suck up when you depressed, reset in order to reset them back to stable condition. Because whenever we open these up because of the size of the circuits lodges, um sometimes gets in above a model, and we have to then go and reset some of these elements. But we can talk about and definitely ideal muscle there is for this video. I suggest that you don't load this 25 secs, rahm and you have a little plea with yourself. And you could even take this block and build up and run our or simulation using it yourself or not, Dr. Get used to it and see how it works. So let's be quite a long video, quite difficult video, but it's well worth wail, and I think we've learned a lot from it. So thank you for listening. I'll get you in the next video. Goodbye 10. ALU: So let's go ahead and this video and will design an arithmetic logic unit. If you get stuck anywhere through this video, remember, you can always open up the actual design and simulated for yourself and some things is much easier to see what's happening by simply clicking on it. And you can look and you can fall through the zeros and ones through the entire socket. So let's go to so long ideal. But stick with it and you'll get there. So let's not offer air you by looking and seeing how we can add to binary numbers. So to keep it simple. Well, look, it a too bad number. So we've got two inputs and A and A B. So therefore, portable combinations, we can have 000110 and 11 and we're gonna add them together to get us some and all short a cardio. So prove it. Add 00 We guys, you know, for the some, when we get as usual, county does to the next more significant But Bernard, zero and one. We got 11 in this year ago, one when we had one in one. Well, the binary the day. Small addition for one and one for this binary would bear a number two and the number two recovers binary zero and one. So you got a zero carry one there. We can see how we're gonna build us If we just look at the truth tables for that some. And for the cario? Well, the truth table for a sum as Justin Exclusive. Or so we're just exclusive. Or this A and B to get the some and the truth table for the cario is just a non to get. So we take in b and random together and we get a cardio. So this is a little higher father circuit? No, it's called 1/2 other because it's not really of any use in this format. Because in order to God, mawr numbers together. That is more batch together. We're gonna have to have ah, carrion from the previous significant there. So we'll go ahead and we'll see how we're going to do that. So here's the truth table for a few ladder what we want really want as our and puts in b everyone Akari in Israel from the previous significant. So here about eight combinations here and you can read through the minutes quite clearly. 0010 Give us a zero for the Salman zero and carry out on the ah zero in the one week ever, someone with some candy and the one day every gives a 10 And the 11 was gonna give zero in a county one. And you can What you re doing through here or what? You read it yourself first. Finally, you're gonna have a one and a one. So in effect, the one no one would likely The number three and decimal number three days will be governess. And the binary format would be some off one and Akari off one. So we need to implement this year. That's fuel either. So let's Kulik and we'll see how we're going to do that. So this is a process we're going to use here. We're gonna have our in b m puts. We're gonna bajar father with the sum up here on the cardio. So this is going to carry out for half other one. So if we take the some from this half other and feed and to a second how father and we have the county and and in the second half, Father, then at output here will have a fatal some and the county Oh, from the second half. Ida is fair down along with the county for the first half. I don't intend or gate and that gets is our phenyl cardio. So high school will she heard that's implemented. So here's a fatal implementation here. So we've got to half our dust with this exclusive or and that I'm gay as the first half either. And this exclusive order and that I'm gay is the second half other and we have a fatal some here and you can see that the carry outs for both of them head off and going to on I'm gay and that becomes the say no cario school and we'll see this belt and working and large ism . So if you get to the circuit that's called CPU on the school other. So just double click on the and this is the fool out of circuit. So ask your head and we'll see how that sparks Africa 000 will get some a zero Carly always , you know. So if any of these is one that's one will get one for the some and, you know, for the county thoughts 11 for the summers. You for the Carrie. What a flies one or get one for the some and zero for the county. So if we have a one in a one in here who have zero with some and one for the county and equally if we have ah, one on a one day, we'll get zero for the someone. One for the county, Um, or one and one day regatta. Zero for someone, one for the county. But if you've got all three of them are high. Never gonna have one for the some and one for the county. We don't just want to add to one bet numbers we want to be able to add to eat bet numbers. So let's go ahead. And we can see how we can implement that using this fuel, Adam. So if you got to click on the next one day, which is CPU, are that underscore? E it? Then we're going to have here are full other, which is going out the to eat, but numbers. So what we have here as Ah, fill out our but there's gonna b e of them. So proceso men, I simply or feel at Osaka And of course, he of them here. And it runs from the least significant bailable born to the more significant bet at the top shows Acadian and to the 1st 1 and the carryover from one presented the county and of another and so on and so forth all the way up until we have phenyl cardio. And we have our sums here, Israel and the Oakwood together and to this split. And you can see that God e m put here and I'll be Emperor and the A's and B's feed into each and every one off these through others. So the best thing to do is to have a little play with us. So, for example, we could add start adding some numbers together so we could add the binary, the number three. So that's the number three and decimal, and we could add a number three. So that should give us a value off sex and you've been Jacono put. That's the least significant bet. So that's going to be ah, value of one another value of two plus four, which you give us a value off sex. Last I was able to add to eat better numbers together. So let's go ahead and we'll look at some of the other functions within the e l here. So let's look at another two functions within the e l. You were interested in the Chef Left and chef trait. So let's come down to the CPU on the school s each year, which is stands for Chef Left. So we double click on that. Let's go ahead and we'll see how that's going to work if we harder and puts all the zeros Olympic results with adobe zeros. But if we take that, we significant. But let me make one. You see that a note put Notley significant, but has been schefty one to the left. So it's no one significant bet more so similarly if we want it to end any figure in numbers year. So we put this one in here. You can see that number here has been shifted to the left and you can see how this is done . We've gone, eat bet, register another re about register No, prove that stray just a few gentlemen put of this one here, but And this and RV against each year. What we do is we take the Ali Significant bet and we Schefter. And so it's a chef. Best re significant plan on. We take a more significant but we Schefter out so we can look in another thing to know Here is that the US Register that what years? And we're not interested in the set on enables we can just tie both of those high. So it, in effect just looks like a ah passed through from this point here, straight through to this point here. So it similarly, we can look at the chef trait. So we had don't and look up the shr so they look like on that and we can see that we've got a very similar circuit. But the Duffin says no that they had put here. I will get Schefty to the rate so you can see you've got them put here. That's a more significant, but and its chefs it to the rate. So that's one significant bet less and you can see all these, they'll just get schefty to the right and you see again who have done that. We've got two registers here, the states, and enables a tie together because it's just a passed through from this Register Street, but through to this register. But then intermediate stage here. What we do is we can chef, then are more significant. Bert on Weaken Chef doubt really significant. But here. So that's all that is for the chef left the chef rate so it's going have a liquor, Another useful function within the air. You. So I said, I look at some of the building logic functions we've got and the Yeah, you. So we have are not function, so it's a quite simple. I just takes an MPA and and it gives is the complement. So just eat, not guess That's quite straightforward. We can also look at their iron function, so similarly, the and function takes are two inputs and the ends those two and pushed together. So let's go ahead will simulate that. So everybody to on the three significant boats we can and on an function for that on a kid , do with the rest of these will see that going high when both and put school high. We also have or function. Double click on a on a game, of course, to Empress Xia OK, e or gates. And these inputs get ward through to the so put so either egos high or B goes high, and it gives us a note put or a board school high, so answer or function. So let's look at our exclusive or on Comparator V set together so we'll get down to this. Hear what? Your CPU on the score X, who are underscore early on the school one. So this is someone back version of this, so it's double click on that and we'll have a look. So this really is performing the same functions here. Governors on exclusive or so less exclusive board between A and B. And that's the output fed through from just a simple exclusive. Or but it's also telling us whether both inputs are equal and a sort of tell us whether the value of E as larger than the value off B. So let's quickly walk through this, if it be, are equal. So, for example, nbr zero and zero, we get through the exclusive or here and there's RT. There's a little and Northgate and present to an and gate. So that point there will be high if both of them are equal. So, for example, if it was 11 than that point will be equal after an equal not point. There would not be, Ah, high every buildable. So let's take, for instance. But both of them are high, so we A and B are equal. Then this point here is equal. But remember, we're all we're doing this for one back. There's going to be another seven bets. So in order to work it, whether there's actually quality and the whole eat bets, we have to work a Whether is equality for the ones above. So if there is inequality for one's above, that means that there's going to be a one coming from the significant bets above. So if there is a one coming from the significant but above, that means that from above all are significant. Bets are equal on this, but here is equal. Therefore, the whole it bets would be equal, and we will get one here, so let's look it. What happens when is detailed in be so this sentence here, when is greater than be the exclusive or will give us someone who He s Ohio. Put any of this iron gate, the rotation where there is greater bee No bee grayling. Eso will take the oath from E and to this on Gay here is Well, no, we're also after nor boat what's happened with the previous bet. So if all the previous bets are equal But unless case is great and be then we know that all three visa gonna high. So it means therefore we're gonna get a as larger. Also, if the more significant bet as larger that doesn't matter what's happened with the least significant. But this is always going to be larger. So even supposing b is larger than here. Here, this is a very significant but in the higher significant bets take precedence. And it means that the entire eat bets is going to be watcher. So that's ah or quite let logic section, but take a time and what your way through it on their convince yourself that doesn't need covers the correct values. So Warren treated and is taking a of thes and doing it for to eat but numbers. So you see that and this section here. CPU on the school eggs were on the school. Arely underscored it. So you double click on that and open up and you can see that have taken a of these instances here. And that's just be Drona is exclusive. Or so I dropped inside. Let's just not instance that were just being a second ago, so nobody got the e version of this. So let's talk our way through this. So we have our two inputs are E and I'll be so these are eight by and puts wherever I put here, which is just our exclusive or for these to eat that numbers. We also have er, equal value here, stresses, and I put that tells us where they're. Both numbers are equal effort, both equal that goes high and have another eight put here called larger. So if is larger than be than this one goes high, they also know that in order for it to work properly, we have to tie one of these 21 and the other gets tied to zero. So let's go ahead and we could see that working. So if you see the moment Botham are equal, vacancy will go are equal value here. So if I change this Mickey Watcher, you see Equus two is larger, the little longer equal and the value here. There's a compartment right for this as well. So everybody to take these three and you can see that is larger. But then again, if you make that equal again, Nicosia's went back to equal value. So that's all there is for Comparator on the exclusive or about what? Involved in Not so Take your time and what your way through it. So the very last function that were interested and as his zero function so you can click on the CPU on the school said and this is a simple little function here. All we have is on E and P or G tight end to I don't get so the way this works us. When all of them puts our war, we get Ohio could. But any of one of these inputs is high, we get alot. So what? Just using it really to tell us when all of the values off this amp are equal to zero so a fatal in a possession to look at the field. Yale, your so if you come down to the CPI year on the school air here and double click on that no gym in order for you to see it properly. So all we have here as our functions, which we have seen in the previous section. So we have our other. We have our chef trade with the chef left. I know on aren't on or we have an exclusive or weather on equal or is larger and built off this zero. So these are all of the functions that we have just had a look it on and designed? No. In order to choose which function we're actually going to use, we're going to use a three by eight dick Order. So we'll have three Inputs Year ABC and those who give us a possible outputs and those I put our goni, you're going to use those teachers. What, to watch My particular function gets passed to the output that simply don't know. We need to do as the output for each function here. So let's take, for example, will take the or gate so the or goes down here. But I only passed to the site whenever this value here goes high and whatever, like was high. That's that's determined by the value of a, B and C. When it goes high, this little section here will go high and all Pass it to the output and all that has just done enable section. So Peter opened there. That's just a little an evil section which will pass this year to the output whenever that enable. Whose high so call the Sierra. 1234567 off. These are used in order to choose each of thes values. Here are these functions within the EOE here, so you'll know that no, all of these functions here use both the and the BN puts so they're not function doesn't use the e and B all use of the e m put and the chef left. Chef Ray only used the n put, but they also have a car. Ian and Sue does. The other section of a carrion is Well, no, there's three other points. Here is the the chef left the chef Ray and the other section. They also produce a cardio, and this is the county out here and there's a final carry out for the circuit here, So there's three possibilities for carrier. So each of these have to go through an iron gate on Each of them is chosen dependent on the value for this on gate. So if that we take a core payoff, this value here, this lane up to the sun gate for in order to pass the cardio for their Otto and we've got here we have our on get here, of course. Ah, value coming from wrestling here in order to choose that sign, get for the the carry section for the shaft rate and several of a county section for the chef left so easily and gets here. And that's little extra about Secretary is just to pass the county cadet cardio from the e l here. So let's go ahead and will play about with us and see some of it walking. So we want to enable the simulation and I suggest you don't food and how we play with us yourself. So that the 0.0 we have our zero here. I'm already certain, and there at the at the addition. Okay, so if we were tired to the normals together, so there's one in one, and you can see that put here we get there. So put here on Victor Doxil, the higher value in and we'll see that we're gonna get what higher value coming out here. But everybody to a value in here is going to be career greater value than the summation of these two bets. That means that we're gonna have a cardio. So there's a cardio appeared here. So again you can get through and you can test the rest of the functions here. So, for example, if you wanted to test the ah, the the Wild Church section or the Exclusive or and the Comparator so you were touched again and true choosed up particular, I'm put. And in order to get lion, we can see let's see which one is want to be. So this is the value here that's gonna give us the Comparator. So we're choosing the comparator here, and we're going to hear and to number. So when Botham Earth equal support, the numbers are equal. We have this sequel coming out, and if one is greater if is greater than B will have, the larger Kevin out here is well, so there was a law. And that video today, the last thing we need to do here just before we leave is just have a wicket. The instance for this. So every go and to the main section, and then you can pick out your CPU Underscore e l here. And this is the Alieu here. And no, you should understand where each of the pens and what each of the pens do. So we're gonna have our inputs here. What? You're going to be A and B. We're going to have her and push here. That control which function we're gonna have chosen within the year. We're going over, carrion. A county out unequal. But we're going to have, ah, agree alone, but And we're gonna have the exclusive or and also the zero. So that's all our functions here with, Unless you so thank you for listeners. Video. I'll get you in the next video. Goodbye. 11. Clock: So let's go ahead in this video and we'll see how to generally oclock for our CPU. So we went to generate oclock which were all over is too past there from one part off the CPU to the other. So they say, for example, we have one registered here on your boss and it's created into another register. And we wanted to pass the information from less register only the boss and into the straight You're still here. The poor we would have to do is be tough to ensure that there clock the enable would go high and when they enabled, was high. Every pass information from this register onto the boss. So that's the enable going high here. But no, we were tough to ensure that enable remained high until this register here was set. When I straightest or let's say, it takes the information from the boss and pizza and to the memory allocation and then who nevertheless, Seko's law, the information is no hailed within this mammoth allocation at that point, then they enable is able to go to war. So you can see here that what we require is the enable post to completely enclose the set post. No. One way of doing that is showing here. And what we do is we take a clock signal, which is here, and we take a delayed clock. Signal service is delayed by 1/4 of a post, and then we could pass this clock and clock the way through this well circuit here. So if you pass it through on or key, then you get an Opel. When either clock or clock delete, it's high. So in this instance here, we're going to get this term here so you can see that this one's high, our investments high and that high all the way along to we get to this point here. Which point both of ghoul. Did you get this little clock posts? Yah. Similarly, if you put both of them through on on gate, you're going to get that court post here. So that means that we've got to clock post to clock signals which do exactly which, really, what we require the clock enable will completely encompass the clock set. No, it's not possible to build this tape of clock and lord you some because we don't have this daily functions who we can't dally this clock and less minor. So I have to go and find a definite method off pervading oclock slice Gorelick and see how we solve this problem. So I scored. We'll see how the clock has been implemented. Open up largest, um, and head down to CPU on the score. See? Okay. And this is the clock circuit here. Just a small circuit. No, What we have in the heart of it is that Yuki flip flop, the geeky flip flops unavailable within their memory section, sort of geeky flip flop. There we could go and Belgique, a foot flop using purely and non damp lamentation. And I'll show you how to build that just in a minute. But what we're going to do is petite this, Jakey, foot floor multi. Both the G in the keys high. So where that ensures, is that the output here, The cure? The cube are well, tobel, but we'll only total from a law too high. So whenever I click that again, there won't be any total. And again, all the talk go full of goods from a little too high. So you can see here at this point here is running up art half the clock rate off this point here. So only change whatever that goes from a law too high. So we take this year and in effect, this becomes a new clock. A new clock runs at half three off this master clock. Now what we do to create the clock enable as we take the no Kyoto and we feet forward the value for the clock and to this nine gate and this will give us their nd able and the same was generated by taking a poke your on again, feeding the signal forward and turn nine gate and then in vetting it, this or givers are clock set. So these are three of all interested and a new clock for clock say, on oclock enable. Of course, this circuit here will run a little bit slower because we've taken original clock and off half the clock agree in order to generate this year. And we're uneven slaughters again because of the way they say and the enable of say up so unified these clocks and enable who run 1/4 of the speed of this clock. And but that doesn't mean much definitive as long as it's fast enough, just tell us to see the simulations. So let's go ahead and we'll have a look at it on the timing diagram for this. So just before we look at the timing diagram this year is the JK flip flop understanding a master slave arrangement never going again to all the details of how this cheeky operates. But if you're interested, you can always check one line. All Bt need to know as the the operation. Whatever G and K are both said hi and Outside's explained their lives. So lets me avoid will look at their taming dining room. So this is the timing diagram. Here we have our original master clock and we have the youth clock which runs at half the rate. I would have the clock enable here on the clock set. Now you can see from this point onwards that the clocks it is completely encompassed by the enable So you can see here that we could let enable go high. And then there's another simple oclock posted. We get to this point here and then the set would go high for a court post. And then there were Cold War on the wreck, another court posts again and that's with process with repeat or over forever. So this is really what we're looking for. There's only one problem we have with us as the we don't really want the clock to start at this point here. Okay, We really want the clock to start at this point here because at this point here, this is where we ensure that the SE as completely enclosed by the enable nobody able to do that. And we'll show you how we do that. Lee alone whenever we look at the control section and were able to adjust the stepper which is a Akona so that it's only negative edge triggered so along with trigger one that's negative edge here. So one thing to know here is that it takes four clock pulses of the master clock and a lot of ticket through the one set and enable Saeko. So, for example, we start from this point here, we're gonna have one clock posts, two o'clock posies vehicle posies and then the fourth quote post. I never start over again. We'll get one, 23 and four and so one. So it means the end effect this cloak enable, Clark said. It's running at 1/4 off the master clock, so it means that it slows the simulation up. But the good thing is Israel is that it gives off a lot of fame details to what's happening cause you can actually walk through every single part off this clock, say and enable whatever you're doing your simulations with us for a future video. We've got most of what we want here, so at school, and we'll actually see the simulation running and lord you some. So let's just look at the clock set and enable What we want is the clock and able to go high, and then the clock set to go high, another clock set to go war. Then they're able to go or so watch this happening? No. So we click corner and we got the enable going high. Then the SEC was high. The saying goes law and then enable coleslaw and that process repeats over and over. So that's all we really want to do with the clock. But as I said, there's one small addition to this clock system to make the whole thing walk the CPU work, and we'll see that whenever we're looking at the section in the control unit called the Stepper, which is actually a little counter. So I said, I look at this instance here, everyone mean and become down to CPU on the score clock, the nicer clock instance. And you can see here you have ah, on NPR here, which is our master clock. You have the secondary clock, which is running at half the speed of this clock, and we have our enable under clock say as well. So let's all that is for the clock. Well, get used to seeing how it works. Whatever. We start putting together the whole CPU. So thank you for listening. I'll get you in the next video. Goodbye. 12. CPU Overview: Let's get a CPU belt. So let's take all of the blocks it with design so far and we'll see how we're going to start building up. Let's see Pierre. So we started off with a boss? No, I've only shown one wire here, but in faith there's going to be eat wires and this boss, because this any better, boss. But you see the entirely betterment of our Wiegel and liquor and Lord use um so they were designed local storage registers. Of course, these are one or two or three in our for so these are just are a bit registers. And we've seen that these have got, say and enable Whenever the Seko's high were able to rate from the boss and to this little memory allocation and whenever they enable goes high were able to read out of this memory allocation on to the boss. We then looked at the rahm, so we designed that turned 56 bait. Rahm. Although we're only using theory to Bates out of the Mormon and again has got, say, and in evil. So they say Carlos is two very information from the boss and to remember allocation on the enable allies is to read the information from a memory allocation onto the bus. We also have a memory address register and this just gives us the address off the bait that we want to rate on read toe with a man on. And we designed an e l. You know the ill use got to end, puts an e on a be on It's called its output here It's also got three m puts year, which are called we could call them or cord. So these dust detainments which function within the l you were going to use we've also got a very so put see this bailout Carrie, Carrie and cardio Large equals zero. No, really, What oil? I believe that the clock and a designed oclock and we've seen here we need ah clock pokes for at the say on oclock pokes for their end Evil No, there's a few extra blocks that Well, what wired then here and we'll explain to them Explain them, just know to you. So first of all, we need something here. We're going to call one accumulator. So what we want to be able to do is control all of the information that comes o of the e l you want to the boss? So we really want to control the timing off all the information over the sale unit as boss here. And we can do this year by an accumulator which is just another register with a say on done enable. Most of the section here will call it boss one. No, you wouldn't know where that's for until we start building the control unit. But all that does is put value off one end to this, be and put for the register. So that's 0000001 So it's just a single value one. They receive out later on what we're going to use not for no this year is a temporary register and against the similar to the strangest that here, except that has to go on and enable section We only need a set. No, we have to have their son because we need to be able to read this two bits of information to base of information onto the Boston and to point B. So what we do is we can we can read an end to this temporary register and we can say the vowing, a temporary register, they're making gold. We can get the other bay of information from one of the other registers, or the memory and industry, and to point a so it's a method of getting the two based on two e. On B. So that's pretty much everything that we need for CP Year. But the question is, how do we control all these sets and enables and also the op accords here and this Say point here and also the input from the boss brothers always go to and the answer to that as the control unit and the control unit controls all of the Tayman for the sets on enables throughout the whole of the CPI year. So that's really as the beating heart off the CPI year. So no one or all of the major blocs within our CPU waste go ahead. The Morsi ho there bell up with an award use. Um, So finally, this is our CPU bell up and Lord use, um, we've got the Boston, no doubt say to That's the eat That bus, of course, registers. Here are 123 and four. Rahm, with our memory address register are ill. You clock on because that's accumulator the boss one in the attempt. So let's everything. But really, that's just a minute ago. So I said I'd be looking lesson about more detail. So one thing to notice is that and Lord you some you can't have a single pen for on and poo on the note. You have to be separated into an O put pen and put pen. So that's what these pens are for. And you can see. Look at this blood here that splits out pen to the individual bets that go to the boss. So everything gets connected. The one to the boss. You can see that's all the all the way around. So let's have a little look in the three extra section. So first of all, we could look inside the cumulative selection, says accumulate a section here. So president say that that is just simply a register. So it's the CPU rage underscoring it, which were designed. So there's nothing you in that. No, if we have a lick, Israel and the temperatures still here again, Sister seem is a staple register, but it's just a little bit simpler so it's just simply the memory location. So it's just a neat bay, honey, but memory Okay, so, so neat about memory. So we've seen that before. Okay, if we go into finally the bus one unless have a little look, see how this is going to work. So we said that this boss one what it that was whenever there and put here went high after a value off 112 The boss here, we're going to use out in the control section. So let's see it doing not just know. So whatever less is zero, it just passes the information from here straight through today. Okay, so when the bus, what 10 messages the street passed through. But whenever the bus one goes high, ignores the values here and just puts a value off one or two. The boss. So how do we control the flow of information? Road there, CPU and make it do something useful? Well, that's defined within the control section. And that's what we're going to go into next. So thank you for listening to this video. I'll get your next video. Goodbye 13. Algorithms: can a computer tailors the answer to life, the universe and everything? And as the answer, really, 42. We're going to take a break over the next couple of videos from building or CPU, and we're going to look at algorithms and computers. So we're going to ask and answer. The question can be three amassed that I'll get a them that will solve all problems. And can we get a computer to run that I'll get them to find a solution? So it's kind of like the famous book the head shakers gate to the galaxy, in which they get a computer to answer the question off life, the universe and everything, and it comes up with an answer of 42. So first of all, we're going to have a look. It what we mean by an algorithm, a move you through an example of an algorithm. So here's a simple algorithm here. The question is, was the highest common factor between these two numbers. 3654 on 1365 Now what we mean is what is the largest number that will debate Enter border voice. So in order to find that you take the biggest number and you divide it by the smallest number. And I sensed this year I'll give a value of two and remained. There will be 924. You didn't take the smallest number off the two above and evaded by that remains at 9 to 4 and I will get on one team and that will have other means. There are 441 and you continue that process. You take the name to four debate by 441 You get to remain therefore to and you keep working down until you get a value or remainder zero. And the answer is going to be the value 2121 as a highest common factor off these two numbers. So you can see here that I'll get of them everybody rate own. Once we could see we divide the biggest number by the smallest number and find the remainder with antique. The renovate, the smallest off the last numbers. Okay, so that's the smallest off the two numbers here, which is named to four, and we divided by the remainder and we repeat that process alway during towing a value of zero. And the final answer is going to be this number here. Okay, so everyone to draw out and a little diagram we would look like this. So here's a floor char. Have you have the two numbers and you're looking for the highest common factor between these two numbers. You take that while just number. So let's assume the largest is E. So you're gonna have a divided by B and you get remained of C. We then ask as the answer zero ff zero. Then the highest common factor is the value of B. So you could see that from above. When you look at this one here, you can see here that we have a remainder remains at zero at three meters zero the high school. My fight is going to be that 21 which is our value. Be so we say that less is called here is called a not cold. Be so you don't at this point And the answer is no, never come round and he becomes B and B become C and every what can we round this algorithm again? So you can see that again from above. We can see here that in this instance here. This is not a that's a B, so you could see that the easier becomes the be and the be here as the value of the remainder see, So we work our way around until we get a value of zero on were when we get our We know that the answer as the value that's left be David Hilbert, a famous mathematician. He came along and formalized the problem, and he called it is and should have gone problem. So apologies for my chairman, that means decision problem. So we're still like, really ask. It's ostensibly the same question as their some general algorithm for solving all mathematical problems off a cell tape. This is a very loose interpretation off this problem, but it gives us something to start with, so we're still really asking as their some master I'll get of them. Another mathematician called Alan Shooting was thinking about this problem, and he come up with a thought experiment. He imagined the machine, which for the moment you call a shooting machine unless jury machine others and put an output on infinite length of tech a tape. Now take a tapes just simpler teepee with who's in a So rather than thinking about in terms of who we can thank you for in terms of zeros and ones. Less machine acted on these zeros and ones which were then put and it through and the end of when I had finished walking through this algorithm it through a note. Putzel take, for example, here's our input, and when it's worked through this particular organ of them, it gives this particular. So this really is just another way off. Thinking about over, I'll go them. It takes an input. It works through a process and gives us on output. So here's an example often algorithm, which is going to be run via the shooting machine if we think about shooting machine is having a particular state. No, explain that just in a minute. But this day of the machine could be any number 01 million Bellion. Whoever and end receives an input then put is the values on the attack of tapes are just on zeros in one's commitment to the machine so dependent on its internal STI and then put that comes and that can either retain that state at the same value or it can change it. I came in change the value off the and put to us it another value or routine that seem value. And they don't move the tech of tape, one possession to the left or the right, So that's all that machine will do. So what about lesson 10 or state? Or what do we mean by now? Well, whenever we build up, a CPU was sensate. Here will be definite registers and accumulators and memory locations and your internal sti emulate as a snap short off the values and those components at that point time. So it just tells you what possession the machine is certain at that point time. And if you like, we can create a number for that possession. And this internal state is just that number. So if we talk through some of these, we could say we're Internal State zero then puts a zero. Then Internal State remains a zero. The input remains a zero. We move one possession to the right after 10 0 stay is a zero and receive a one. Then began air. Definitely terrible state, actually some random terror state record 13 on the end Putin, then remains it one and remove one possession to the left. Different terrorist E one on the Emperor is a zero. We go internal State 65 we change the input to a one. And then we move one possession to the right. Of that internal states are one and the entrance or one. Then we leave. That internal state is a one on we change. Then Putin's year old, we move to the right effort in internal state to after a terrorist it to and the emperor is Ah, zero. Then we got Intel Terrorist zero, and we changed that and put their one and we move one possession to right, and then we stop. So this is an example Over is running through on algorithm and there shooting machine. No, The problems we're going to have here is that we're gonna have instructions, So instructions are going to tell the truth machine how to act. But we're also gonna have data on the same ticker tape. We have to be able to distinguish between the data. This on the ticker tape that were acting on on the instructions, which tells us the security machine Hotel act. So we're gonna have to have some sort of court and order tell own machine to tell the difference between the instruction on the data, which all sets on the tackle tapes of all the zeros and ones all together. So let's go ahead and what she had to do that. So I see how we can rate our instruction on our data and one stream of ones and zeros in a manner that are cheering machine can come along and it can read it, and it can know which parts are instruction, which parts of data. So, of course, the top line here, and you see it's just a bunch of zeros and ones. There's actually 19 of them running all the way along. I've got another lane down here, the 3rd 1 down. It's just on our Bunches years and ones off and 19 of them running along that line. They're Israel. They were going to four McCord here. Now the cord is going to be quite some parts. Going to see when you get a zero on is you that's represented by is you know a 0101 0110 will be a two 01110 will be a three and 011110 before so on and so forth. So you can see her. That's going to continue. So we apply this here to what we have above there. We can we conceive the 1st 3 here, you see, 010 That's gonna get your one. And then you take this one here. 00 woke of us, you know, 090 we'll give you a zero. And then again, you've got the 01 zero capping of one. And you got a 0111 0110 will give you two. You get a 010 give you a 1010 give you one. And again, that's when he is going to be 0110 gavea to on, then one on. You have to be careful when you get to the end here cause you're gonna have the zero zero from that's lane here, which would give you a zero. And in the 00 here. Okay, with another zero. And then you have zero. The triple ones will give you three. So on so forth, so you can see how that's gonna walk all the way along. So what we can do is we could take the router and rule four and we're putting together in one line so rude to Andrew for But once you go, you go. 1001 You've got to You got 11 a to 100311 or four a zero on a two. So you can see here that we're actually going from binary former here to actually decimal four months. So you can see here that this value here, which is our binary 010 is represented by a number one, Number two, Number three, number four. So, no, it's all up to up to us and how we decide we want to defame these things. So if I wanted to, I could see that the two as I calma Okay. So every day you see a two's a korma and you can also see that this binary for Mike here we can put in their smokes. Alas, the decimal four names us. 1248 which is a name so you could see that lane then becomes name Korma. And that would be a value off three on Deneb, another Korma And now, with their value or four. And now we're at the other point here. Never chose to to be a korma, but the value three could be anything. OK, so we just decided in the value three some instruction and we'll just call it destruction three. And it again you've got the number three there, Israel, which is just the pain. That s so the decibel fallout is just the value three on again. You've got another value four and we can choose. We want to use that force. We can choose that for an instruction and we just call that instruction for And then you call value off zero and then you go to which is your coma. So we're finally we could see that the these two lanes here, which are it's 30. It zeros and ones can be actually represented in us for my here, So name comma three. Come on, four instruction say three three instruction set 40 coma. So that's here an effect. It contains our data under instruction. So of data is gonna be our main on r three and r four and R three and r zero On our instructions, he is going to be Instruction three. Instruction four and we, of course, we could continue on Arthur Syndicate of Instruction 56 70 name. So this is a neat way, which we call a contraction in order to represent the data and instructions all together in one lane and a former the Children machine is able to decipher. So I take this little cord that were developed and have called contraction, and we'll see in the next video whether ah computer can answer the question off life, the universe and everything. 14. Turing Machine: this video is quite mathematical. So if you know real interested in mathematics off computing, then you can head on to the next video. That would stop you from building the CPU. If you are interested in this, then I've got most of the stuff for. And this video from a bit by Roger Penrose called The Emperor's You remained and others suggest chapters one and two from Mess there would cover. Ah, lost off one the ideas about computers and computer what they can do, what they can do, really interested in really useful. So I would recommend that. So good luck with the video. We started off talking about the insured Ingham problem in English. This means the decision problem. But we can also call it the whole thing problem, and we'll see why not as we work our way through the rest of us video. So just imagine where this stay off instructions here and the fatal instruction, and he'd worth stop So there's no data on here is purely the instruction. No weaken quote that stop using their contraction. Let's say we make 000 the ones years or 1110 as there are Triple 10 is ales and the full ones with a zero as the s. So we could take this, say here off instructions. And let's just put them all together for any species. Survives him altogether. There any species and we could use our contraction in order to create a binary number for that. So you can see here that the force Eero become 00 on the 2nd 0 there becomes a 00 is well, and then we move on to our which is going to be our 110 We've got 110 there. So you can see here that we just build up this binary number using this instruction set. So what we could see as that we've generated one particular shooting machine or Zenefits. One particular set of instructions there and this order. Now we could get the cheering machine a number and essentials here. What we could do is we could just talk in this binary number and a decimal number, So I don't know whether the pain in the number or the decimal numbers here isn't an actual instance. Religious P a random number and Deskovic cheering machine number 4715 Sex 34 So this is a machine that's got, let's say of instructions and we can give this machine are particular number. So it's defined. The machines define is a wanted one a relation to the number line. So the same goes from all the way from zero to infinity. You could have a cheering machine number zero number 123 all the way up to infinity. The vast majority of these would be just do nothing off any interest. But some of them would do things that are actually useful. So what we can do is we can start putting it and I can assure tear hand mathematical form so we could see the t subscript and common am so real quick. Person is this. This is the end shooting machine. So this is a t subscript in here. So send cheering musician, But it's acting on him at the M data points. So that's that's just been repeated here. So we've got the insecurity machine writing on em and push. But nobody going tend to just something called a universal shooting machine. So you could see this is you in korma. Mm So this shooting machine, well, in effect, be able to mimic every other individual shooting machines so emulate. You can see that lesson. Fate is an instruction set and this instruction say, can actually be mimicked by a universal machine, which can mimic every other shooting machine. So we could see the universal cheering mission in acting on em and puts so you could see look at it and you could look at the end universal shooting machine acting on em and push. And whenever you put an end to end and you worked through the algorithm, you'll get an output and I will be P. So you could think of this Actually, if you like in terms over CP year Less universal cheering machine as our CPU and it's able to but able to called up any se off and puts or instruction said that we want any less machine and each and every individual group of instruction sets. We could call that a choosing machine. I don't give us a note put, and we call that output P. Now, the interesting thing about this here is really the can acutely ground as the fact that that's universal cheering machine here. Well, actually have a cheering number as well. So you can I call less t subscript you. So take your time to get your hair drawing a boat That, uh it's quite neat. And it could be quite confusing. No, we've talked about this year, but we're still back. It s problem as that. An algorithm for answering all mathematical problems. Well, let's continue with what was land here onto the next page and see if we can answer that. No, have a summation before we thought started off talking about the decision problem. Now we can also call that the halting problem there will be want people to do You want to see whether those some shooting machine's been caught? The instituting machine, The axe on Amen Poots. And we want to know if we can find that shooting machine. Though Taylor's where the all other Children machines will stop protecting our value p what were they looking through on endless slip? So we're looking for the tea substrate and am so last the instituting machine acting on the M am and puts and we want to know that this jury machine what it does is it tells us well, whether I'm all other shooting machines will actually lip making fell little square boxes being lipping or whether they stop. Okay, so it's just a magic algorithm that tells us whether all our other algorithms well, actually stop and give us on answer or whether we'll just get stuck in an endless loop. So what we do is we assume that this tape of shooting machine actually exists and we could call ah, halting shooting machine. So we'll have our halting machine. We can call each off N kama em know what this machine does is if the instituting machine acting on the M and Poots as on a loop So that's little square box represents. And I mean it doesn't stop. Then older total a value of zero. But if the if the it does actually stop, then no return a value off one. So let's head on next page and see how we can use this information so picketing it s little matrix here. Then along the talk, we have all the M slash all inputs. 0123 off to infinity. I don't the vertical axis year. We have all of the shooting machine. So that's the fun. Ah, charity number 234 So on so forth. And that's running from zero down, off to infinity and then say the metrics that always puts. So, for example, the fourth shooting machine fighting on and put number three will give us an output of two . The first cheering machine acting on an end to number one. Well, give us a value to the forced surely machine acting one and then put value to, well, give us a square, which tells is that is on a stock in a loop by as it's no halting no what we could do here . This we can take the the shooting machine each in em. And if we multiply that by a tnm, that's really what we can do is we can get rid of these squares, and these careers will just become a value off zero. So but fairness multiplication gives us a fait no machine that we can call Q and M and thus here as the little table for Q and M. So this process of multiplication is just getting read of the squares and replaced them effect with zeros. No, what we're going to do as the Ah some called the Dedication Cup. So if we want to lick it just the diagonal entries. So the diagonal entries here are 0 to 005 And if we were to add one toe, every single diagonal entry maybe would have escaped. We were 13 11 and sex. So what we could do. Here's weaken right out. That's mathematically, so we would have the value of one side, one on to the q n n Those nn because what? Always taking the ends by the end value. So that's the diagonal that's gonna equal on one. Plus R T and M teams are each nn or care, so it's just make sure that less multiplication. You make sure that the diagonal entries that rid of other box actually know of a zero. So let's continue with us on the next peach. So we've seen that that little table that we've drawn out every single Rauner will contain every single computer ble sequence. But the problem is that it can't actually contain the one plus Q and N because every single diagonal entry for the one plus Q and N as going to be by a value off one. That's a smart little proof by contradiction. Using the data could cope. No, go back and have a look at that. Have I think of it, Bo Tick is that Steaks Pro takes a lot of people who never received out. First, it seems almost a corpo. Sometimes when you foresee him. So this is, ah, contradiction, and it's ice like tail was then the this machine each n m, which is the halting machine. Cano exist. It does no exist. So it's really seen is that we cannot create an algorithm that tells us at old allow organisms Will Holt or not or equivalently, we can see very loosely but quite dramatically. And interestingly, there's no master falcon of them can exist. Little tale is the answer. If you like to life the universe and everything and ah, as a safe. Presumably, this is why we must assume that the answer for it, too, as indeed the wrong answer to the life universe and everything. So we're gonna say that's fed a bit different from their racial stuff we've done. So let's get back to designing or CPU. Thank you for listening and goodbye 15. ADD Instruction: So let's begin of Johnny and to the control section the best way to understand their section as to start off with an actual example. So we're going to look at their art instruction. So let's get to it. What? Interested in finding out what sense a does control section. So what is it the control section does with one of its main functions is to move information from one point in the CPI here to some other point in the CPU. Never seen before that in order to very information and to one of the name of allocations here or until a rahm, then the state pen Moscow high. So when the safe and goes high, we convey information and a memory allocation. Whenever the enable pen goes high, we can read information over maybe reallocation or the rahm and please set one to the boss . So they say, as to right on the enable as to read, we say information and to remember allocation on, we read information over the member allocation. So in order to chef the information about the CPU, this control section has to control all of the sets on enables. So when we looked at the clock section was in the clock end, able hard to Philly and accomplish the clock, say, because what happens is that whenever the clock in a book was high, replace information onto the boss. But as we read information from a major location or to the boss and then whatever the clock said goes high, we set our information as we right now information into a particular memory allocation. And when the Seko's law, that's our information written into the memory allocation and then they enable coleslaw and that allows us process to then continue again. But also remember, from the clock video that actually takes forecourt posies from the master clock and ordered to get through this one cycle off the clock and able and clock set, and you'll see that whenever we go on and look at it lodges, Um, so the best way to understand the control section as to walk through a feel example. So the example we're going to walk through as there are instruction, So we're gonna add two numbers together. So we're gonna have a number and are one. So the number gonna have is no before slash the binary for the number four seed goes 1 to 4 and we're gonna have ah, three and register are zero starts the granary for three. We're gonna add Botham together, and we're going to put the result and to register Arthuis. And the result is seven. And that's the binary for seven sorts. One plus two plus four, which is seven. So the method that work through and we're going to walk through this another twice through this video. Okay, so you really get to understand that. So the method that we're going to use is, First of all, we're going to put our one on one to the boss. So we have to have the enable go high our best value here, which is fall onto the bus, and then the temp is going to set. So set that number and the temp register the tempos law, and that's it held within this point here, then gonna have to go back and will enable the r zero so they repair the number three onto the boss. Let's number three will just come straight down and at this point here. So we have a four on a three here. The old court here is going to be 000 which is just there. Dash in. So it's going to take these two numbers and it's going to add them together, and that's going to just sit at this point here. And then we're gonna have to go and see it. They accumulate, or so that their dash in, which is the number seven, gets placed in the accumulator. So sick was high and it was a war that's effects there. And they may go to put the enables go to go high in order to put that number seven on the bus and the number seven goes on the bus anywhere. Come along here and we've got to the say hi on our three salat number 17 straight. And here and then the Seko's war so that number seven is held within the stranger start. And then finally, that enable goes law. And that's what through a feel process off adding two numbers. So let's go ahead and we'll see how this works and Lord use. Um, so if you go to the resources section, there's a Fail called. I have instructions. She can go and open that up. I don't you can come down to CPU. Open up and you have the circuit year. So we could do is to be rate, click and the control section, and we'll have always concede with this control section looks like. So don't What about if you don't understand it right away will be walking through quite a few of these over the next few videos. So here is the control section. I think what we'll do is we'll talk her way through it and then we'll see it working, and I'll give you a good indication of what's happening here. So we have ah, all over Enables were taken all of our output this year for our enables and put him at one say to work on enable for the Haram and Accumulator and for each of the registers R zero to R three and in with Taken, although puts here for our sets so they may not address reddish. Don't say accumulator, say the Rams say the temporary just of, say and the R 0123 and four. So all we've done is just split up all of our enables and all of our sets and put one at one side and put one in L. A. No, I've got this thing up here and it's called a stepper. So it's really a counter and we'll go through that. And the next video, I assure you, hope we designed this stepper before the Mormon over and tasty Dennis what it does. So this is a master claw came in in here So we competed in simulation board A region Cohn along no is this clock pulses from a high wall that goes from 1 to 2 and again it goes from high total Agresti three. So all this does is just coming along each of the possessions here five sex and have been against the seven eggs back to the beginning again. So sit back to one. So this is just a simple counter or is it called here a stepper? So you can see here that the cork enable come stone on their enable saved and connected to all of the's under gates and the clock Say it comes down and collects connected to all of the iron gates and the se site. So let's see what happens whenever way worker way along this stepper. So when it goes law, It goes to the next one. I was two and it's going t three levels. See what happens when it goes to four. So when it goes to four, we can see here that this enable say, then it s on gate are one goes high and also they say here and the temp goes high. And this is the first power over. Addition of two numbers we want to put the value from are Red Star one I own to the boss. So as we enable our one onto the bus and once it's on the boss, we want to say that value and the temperature stuff. But this would happen and told the clock enable and the clock say it comes along and we know what happens is the clock enable Moscow high, first of all, so the vehicle can able was high. We see that this as output on to the enable lane. So that means that we're enabling register one R one onto the boss. So that information goes only the boss. And then what happens is the say it's going to go high and you can see when the sake was high. This temp is going to go high. So that means that with no taken information is on the boss and will retina and to the temp register. And, of course, the attempt to cloak say it will go look in and that's it held within that team register and then the enable local blue again. And what in a position to continue on with the next step? So we go to the next step here they need the clock's gonna go high and low. So they were going to stay number five and you can see in this ST Pierre what's going to happen as the register are. Zero is going to be enable. So we take the information from our zero and we put on to the boss. And we also say they're accumulator so that the information o of the E o. U is stored in the accumulator. But there was get things would happen again and told women through their enable and say it's a call for the clock. So what happens is the cork was high and we have our zero is enabled, and after the close going high weaken, then clock say it can go high So they're accumulator has no say it when we clock sickles law not received in the accumulator and then the clock and able can cool or And we're back to the next step so we can go on No. Two state normal sex So when the state number sex and you can see here there's another couple of things happened We have no idea the two numbers together the output was in the accumulator So both no enabled In Cuba we are sold that the result from the addition has no going from the accumulator one to the boss And then we're going to place our information and to register our three So means that register are three will then be said, Of course, of course these won't happen until working through the set on enable for the clock posi so they enable goes high and the accumulator is enabled And then the sick was high and register are three is say so we take the information on the boss and put into our three the Seko's law. So it's stored in r three and then they enable whose law and thats has finished and we will That's just finished their entire addition. So if we want to go in the next quote posts there we go back to one again. And we could continue doing this so that their shows us ho there control section as able to add two numbers together. But what we want to be able to do know as we go on to the top level and will work through the simulation on the top level. So head back up to the top level by clicking on CPU. So this is us back on to the top level design. No, you can see what we've done here. If I can zoom in about closer here, What I've done is I've de escalated the input to this register so that we could manually put a number and have escalated them. Put the strangest, also weaken manual to a number. And so what we're gonna do is we're gonna take this number here from the strangest, are put on the boss and then again to temp, and it will just set here and then what we'll do is we'll take this number here. We'll put this number on the boss and it will just work. It's we don't two point here, so they both numbers will be sent here. The e and the B and the addition will have occurred because what we've done is off. Say they're all courtiers 000 which is in their dash in mood for the air, years old automatically right. Those two numbers together and hope it will set here. And then what's gonna happen is the accumulator is going to be enabled on to the boss, and information is going to come along and it's going to drop in to dust rages that here because, well, say it. That's registered here and they will see the output here with Deescalated there. So put. So you could just yet come into this section here. So I so root level gonna go through. And that's what we've just seen in the control section. So let's go ahead and we'll do that. Just know, shall I start off by Putin off numbers and to the register. So if you were to put the number four until a stray just or so members binary. So that's That's 1248 16 32 64 12 So that's number gonna be 1 to 4, and they're I like civic. With the number three and terrorist register, there were four plus three, which is seven will go into the strangest that here. So it started about a court pulses. No. It takes four of these clock pulses here, which is a master court and order to walk through the end able set process. So there's nothing gonna happen for the 1st 12 Court pokes is because we have done in here , but these aren't connected these three year. So it takes four clock pulses to go through this 12 that went to that one. So it doesn't really Nothing happens and told the 12th court post. So let's go back up to the top in while we look it up. So if I post this 12 times 12 Okay, no one the 12 court posts, you see? No, that was happened. There's with Deacon. This value 11 You can see the enable has gone high, and this register are zero, and it's placed out value onto the bus. So the least significant bet on their the next significant bet of both going high and you can see that and the control section, so they condone. Here you can see that report the way along with about 2.4 on a point forward. Here, you can see that the are one has no gone. Enable is no going life because this point years live and the enable clock has gone lives one near. But there's nothing gonna happen at the say over here and the safe section for this temp register and told the clock set course high. So let's make this a cork Sago High If you go a CPU, and whenever you click this again, you'll see the set languish high. So no, they say it's going high and you can see the set that's temperatures that year, so it's taken. The information here is on the bus on this place to end to the temp register. Of course, 10 registered just was always down, and it's just sitting here, So if you click on ah, you see, it may be possible. See its actual value off three. So get three setting there. No, What we want to do is go ahead on to the next clock post will be click one. The Seko's law enable goes law and they were ready for the next go post. So there never will go high where not enable was high. You see what on possession Number five here and you can see that we've court. The are one has no r zero is no gone enable There's no going hi and the accumulator there a certain win for this clock to go high. Let's go ahead and we'll have a look at that. So are zero enable that one? There has no going Hyatt's placed. That's value here, which is 1 to 4. So that's 41 to the bus. I love how you just come stone, and it comes nto here. So if no go for certain dear, I'm a values three set in there and we're ready chose. Nope. Code 000 So it's really an adoption. So it's really walked through that Russian and you'll see that the value setting there is four Clause three, which is seven. But there's nothing gonna happen with that. It's no going against it cumulate. Until we see it, they accumulate, and so we could do that with the next clock poke. So whenever the SEC was high, see here. The accumulator no has been say so with no Get that information Number seven and the accumulator. So nobody ready to go on to the next state? Put your Step six So again the Seko's law. So that information stood an accumulator on their neighborhood was law. And then the next court pokes enables, going to go high. So what's happened? Knows with enabled their accumulator. Only the boss so were taken. The number seven. I'm a poor on the bus, So I get 12 and four, which is seven so that in the Sun seven has gone to the Boston. When you see under control section, you can see that the cumulated has been enabled and what we're going to do next. This because to enable the recorder of the quote. Say it has to go high and that's all. Set the information and are three sore and next clock Pokes doesn't go high, and we'll go out to the set off our three. So it's go ahead. I will do that. Just know. So here's the next clock post here, and you can see that the value of the say has no gun high on register are three, and it's taken information here from this boss, and it's placed end to rage are three, and there's the answer. Seven. No sudden and not register. So that says, went through the whole process of I think two numbers together, and we've seen how it happens within this control unit, of course, Bristol to have a look and stayed here, which is the stepper or the counter. But I'll get on to that and the next five deal. So let's just finish this off here. Everybody to go into the next clock post the Seko's law. That means the information is no stored and this register here and the whole thing. Gal's low again. No big on. And we've gone back to prevent 2.62 point seven has been all the beer bike to one again, and no were ready to start the whole process over again. So quit NAFTA on. It's best just seen via this example, and you could set and mess about with us yourself, put different values and to the registers on, see what you can come up with. Their also, you could know here that this is hard, wild. Okay, just a hard Wyatt function there. We wanted it to do some other thing, all of a nod. We would have to change these wires and put them in different possessions and parliament in different points here. But we can see that by hard wiring. This here were able to control the floor off information round about the CPU, using this say up for the control section. So that's all we have for this video. When the next video we'll go on and what we can say, the stair parcel, less of a quick just know. So that's a staple here, so we'll go over that and the next video, so thank you for listening and good bye. 16. Stepper: so a fellow circuit here which is partly on the two building of stepper. So what we have here is just that s our watch so that it's there with designed up previously and have connected 12 of them together have taken the first, 3rd 5th 7th names 11. So all of the world numbered ones have connected the resets to the envious of the clock. There they invest through this Northgate, so that's connected to the air. And then the 3rd 1 the 5th 7th 9th and 11th. And we've connected all of the even one saw 2468 10 and 12 of connected those two the cloak . So we can see what's happening here if we put a one end for the state boat, then whenever this say goes clockwise from low to high. So that in a sense, since year it's positive Age triggered meaning from a war too high. We can see here that, but that certainly zero. We've got one here and we got one near. So this one is going to be passed through to the open. He and you could see that from the drop in. We have a one sentence or night too. So whenever we make their school high, then the one that sent it s so too will be passed to the off this one. Because the clock here has gone high and much the reset pen there has gone high. So what I put there was high and again Whenever we go war, that's one of our You here will get passed on to thus far at this point here so that you can see that that's value for one has never got to this point. So it's got to this point here because the clothes gone law, but not points going high. And it's past that one or two so we can continue doing this and we'll see that in effect, it counts along. So that's that. What would come on And thus 3rd 1/4 1 the 5th 1 on the sex one. So by ports in this clock here with on these points on one, attains works 123456 So we can use this as the basis off clean or stepper. So let's go and see how we can change this in order to make it do exactly what we're warning it to the So I've taken the same circuit and provided a few extra gates. She will see here that the output here with added an extra no que on as an or gate here at all the way along here that are on gates, along with the north gates of remote. You see those? So these are the or G, and then the iron gates on the north gates and between. So I said, Well, it could see this walking. So initially it has to be say so not to do that, we have to post us. So this would have to go high and then Lou, So let's have been post and has been said so. And this condition here we're past the zero to the output of this one here, which may access point high, which captains are Ohio put here. Now, whenever we court this, there's going to be positive Age triggered. So when a ghost too high. You see, at this point he had no is going too high and it's passed on the one that was here through one in less point here has made this point. Hi. I know this point has going law. So these not gets alot this point here to go high then law, where previously all of them just remained high. So the same thing happens again whenever we pokes it on the pause of eggs age when it goes law a party through into this one And when we go and post again I'll pass This one went to the section here and make this a zero And you see it's done not there And it's past that 012 here and made Nissa are value of one. So we'll continue doing that all the way along until it gets to the very end. No, this is roughly what we're looking for, but it's slightly ready to change it slightly. We actually need to make the whole stepper negative age triggered July school will see why , as we need to do that. So what we have here is output from the clock circuits. So you seen s whenever we did the clock video, we have the original master clock coming in. One of the clock came a note, which is that half of the I never generated the end able on the set. I was seen here that happy start at this point here that whenever the enable was high so who high for one quote posts then the set will go high for a court posts, then a certain local law. But the enable will remain high for a court post and then finally that enable glory for the club post. And they say it remains low for the court poll. So this is one enable say routine. So it takes 1234 of these quote poses up here in order to get through this enable and say cycle. So we ensure that initialization over CP Year that the cork is in a zero possession that enable is in a one possession on the clock, say, as an a zero possession then that means that we have actually stop at this point here. But we've made the step of Nega of age triggered, So that means that nothing will happen and told the next negative edge comes on and the next nature of age hasn't told this point here. But that's perfect, cause that's exactly where we want to start the cycle, which is this point here, So f b ensure that this is the case because 01 and zero and we ensure that the steppers neck of it safe as negative age triggered. Then we roguish Tom at the correct point here. So this is portrait of age triggered. What happens is whenever the clock course from a law too high, they're not stepped from one to the next. So we're setting a little at the moment. So when I goes too high, that's the point at which steps, so never be cool again. And every go high again steps over there. So we don't want that to a carcass that would ensure there. We don't stop at the rate point and the enable say cycle. So if we were to change this to make it positive age, negative age, take it or want to do as move this, not get don't to hear? No, we've got the correct realization. So if we were to say the high 2nd 2 seconds high and law, we set up, but it wouldn't trigger on the four cycle. I only trigger whenever it goes from a high to a war. So there's no movement here at that point. The movement doesn't a car on told the next cycle which is on there negative edge. So from a height of war and then it triggers and moves on to the next point on again from a high till war. Then it moves on the next point. So with this realization here of the stepper, we just have to ensure that there and puts around the great possession that initially on the correct possession. So as long as you be start off and this condition here with the clock war, the enable high in the same law, then we know that we will start off the cycle and the cadet condition because the stepper will stop stepping on the mega of age, which is this point here. Dallas has almost finished with a stapler, only one more point to make and that will be us finished. So there's only one other thing to take care of here. A nice the fact that whenever we get 2.7 here, the counting stops. Really, What we want to do is when it gets to seven, we wanted to go back to one again and continue counting and then back again and just continue counting and to for it to go on and on like that, as long as the clock as pulsing. So whatever you can see what's happening. No. So we see it up originally initially, and it coach through 123456 and against the seven. And then it just stops. So it's quite easy to affect this. Already. To do is take a connection from the output here, 0.7 and put it back to the same point here. And it means that we can move this pen here. There were no longer needed. And if we run through the simulation again, you see you know that it starts counting 34567 and then back again and you can see it's continually counting roamed. The lesson is finished with the stepper and we're getting it working exactly as we wanted to the square law involved. Unless video on, I have to admit that when I first tried to what we're so it took a few hours in order to get all of the taming correct for the CPU. But it was worth wail because no, we've got taming, which is very, very graded. So that means that we can see every single thing that happens within the enable said Cycle . So that's all for this video. I'll get you in the next video goodbye. 17. FETCH Instruction: So let's go ahead. No, look at the fetch instruction, and that's where they were going to see where the interface as between. So we're and hardware, So this is really quite interesting. Good luck. So go ahead and open up the fetch instruction, which is end the resources section and then head back. Don't to the CPU. You double click on that and you'll see the CPI European. So let me make that a little bit bigger so we can see what we're working with you. So we're gonna be using this simulation here, and it's very similar to the previous one, but I've just changed the connections slightly. So in this one here, we're actually going to be using the memory address register. But we're going to be desk in ating the input, and we'll put our own and pu n There's nothing to know here is that we've got an extra couple off registers here that we've not talked about. And this is new stuff we're introducing. Unless video So work is something here called instruction Address register Something called the instruction register. No, Before again the details to talk about what? What they do. We can see, quite simply, that all less says it's just another one of these registers here. Exactly the same thing. So is German say that you can see that there. That's just the same as the the register to a cheapie, your radio. And also this one here instruction register. That's just the same as the temp register, which is is just the same as this one here. Little definite says. We don't need that enable section on its or resume and say that that's just just a simple memory block, which we designed a long time ago. Okay, so there's nothing you and the actual structure of these, but we're interested in what they're going to be used for. So let's get state the control section and we'll have a quick talk about what we're going to be doing here. No, this is a control section. You've seen this before? No. In the previous video, when we looked at the add instruction, we're seeing that we had connections and pens. 45 and six and we've seen that pens 12 and three and there are instruction. We just had them disconnected. No, this is an integration little portable Eureka moment because what we're looking at here as the first glimpse it there interface between software and hardware. No, the way we want the computer to workers as this counts along here. 123456 these wires condone and the connect on two sets on enables. So in effect, as you see here is just hard wild. So a fresh Mr Count. 123456 and go biting again again. And it would do the same thing again and again and again. No, that's not much. You steers. What we want to be able to do has ensured that once it gets to the end of us coat when it gets to seven angers bike to begin again. We want to re say all of these connections, so we want to change the connections and then whenever requires round again, we want to change the connections again. So let's have a little thought Experiment. Listen, margin the role of Oman and say to computer here. And his job is at the end of this cone up to seven. Everything stops and he has to take the wires and he has to reconnect. Um, wanted different points, okay? And then whenever it goes round again at stops, and he has to reconnect the wires on a different set of connections and so on and so forth . So first thing, as the obviously you don't have a little man and say the computer, the Roman is going to be replaced by some logic circuits. So we're gonna have to belt a logic circuit here. That always is to change these connections. After we have walked through each cycle here off the stepper, they're Secondly, when the TRC creation, where did the low man here, where this again has instructions from, I mean, who tells him how he should reconnect all of these connections. So you could imagine having a second little mine here. And he's certainly here the bomb. And he's seen right. Whenever he gets to the end of the seven Evan stops. And this is the instruction man. He gives instructions to this little mine here. This is great. Change the connections of the wires on this particular four mark. And that's a lot of my not Pierce's walkie, he goes, and he changes. And then whenever we come round again, we get this little by all stops. And this little mind sees rate change the connections to this new four mark. And this little mind here goes and changing the connections. So what we're getting at here, So we're gonna have ah ah logic circuit here. That changes. But it's gonna change, dependent on some kind of input. The Olympic. We're going to have oversight zeros and ones so we can see here that these instructions are going to come in two thus control unit and going to tell us how to change the connections. But why are these instructions? Well, these instructions are your program. This is your program. Could of course, it's right now in binary at the woman. So it's spewing. Understand what it means. So simple ones and zeros that come in and change the connections and save the computer. So this is, Ah, possibly a eureka moment for some people what we're looking at here as the interface between the software, which are the instructions here, and the hardware, which is the Logic year, which was story belt. So the new register is called the instruction register. An instruction register contains the program. So the programme tells us how we should connect all the sets on enables. So in effect, the programme tells us how we should move information round about the CPU. So what? We're interested here unless video as the fetch cycle. Now what do you mean by that? Is we're disaster program come from. So where does this instruction, which is basically just eat bets. Where does it come from? Well, the answer is it comes from Aram. So in order to run three there program which is stored in the ram, so stood in her base and say the ram, we have to go and we have to go and fetch the instruction. And then we have to take it all the way around. I would have to put it and the instruction register and passed the instruction radio start just gets past three and to the control section. So let's just called the fetch cycle so and say, cause 12 and three here, this is going to be the fetch cycle. And you could see that these cycles here 45 and six would be on execution cycle. So we fetch, uh, a neat but construction on. Then we execute the instruction So that's has talked about the instruction register. But what about the second rages that here instruction address register Well, the instruction that we get is somewhere in the room that could be anywhere in the room. So for simplicity here, what is the human? The destruction is going to be setting in the first address off the ram. So in this instance year if we warmed up the ram which of don't the first addressing the Rams? Actually, this one here you can see here that the vertical is high and the horizontal assign is choosing this one here. So this is our first address tonight. Laurent's 12345 up to 16. And then that becomes 17. 18. So what effects on instruction? It runs like this that way. And then this way. So the instruction address register. They contains the address of the next instruction that we're gonna go and Fitch. So I see that again. Instruction address register contains the address off the next instruction that we're going to fetch. You'll also hear sometimes called the program counter. It's mostly kit Lesson about more detail. You see that I've disconnected the input to the bomb. The reason for doing this is that we can change the values of sales and thes values will get to the forced memory allocation and the RAM. So these values, in effect are forced instruction and really going to fetch dust force instruction from the memory allocation here. And we're going to take all the way around, and we're gonna put end to the instruction register, allow the force instruction for a control section. We just want to be able to change it so we can put different values on so we can see the boss changing color and it becomes obvious there. What, as we're doing, they're Secondly, you see that off noble does is wail, and I've changed this say here toe high. The reason we're doing this is that at the moment, we don't have any reset functions within any of these registers. So in order to get the national conditions correct for the woman, I'm just having to put this set to a value of high. Okay, so that's just international condition. And whenever we walk away up the hierarchy, the reset function will be pervaded. Okay. But at the moment for the simulation would just say hi. No, I would not say that high. We see that will begin in the control section right away. The instruction address register as a enabled. So it means that the value said this instruction address register as automatically. No, please don't. To the boss. But what controls the value that's actually coming into this boss at the moment? Well, if you get to the destruction of s register here No, just zoom. Oh, so you can see that all the information. So at the moment, what controls? The value that comes in here is always zeros, but, like again here. And if I right click it, you'll see it says sure after beauty and it's got pulled. Own something about so easy. It's got pilled on behavior. So pill behavior on it. See it cool down. No, it's say people don't It's really seen it. When you don't know the value or an input by the value of a wire, you can option to either make it higher making war job chosen to make the value war. No, I could get in here and I could say the pill don't behaviors pull up. Okay, I know if I was going to do that and get back in two. That taught level. So in the top level here, and I'll Jim it so we can see. Then, if I was to redo this, I could reset the simulation and you'll see that instantly. All of the volley. See, it are actually sitting one. Okay, so but just can a normal unless gentlewoman will just say it Not here. So that all of the values, actually, of all your zero shall just get and change that pill Don't behavior to pilled. Oh, okay. So we came back in here and be going to simulate reset simulation. You're Sieber Barket zero, which is what we want. Because the the dresses are forced, construction is going to be addressed 000 So never set the scene for the fetch instruction . Walking through it a bit more detail. No, but basically all we want to do is we want to go to the first memory allocation, take out the instruction and put an instruction register, and then the state will run along, and it will act on that instruction. And they've been against to the end of goodbye to beginning again. And then we wanted Tho the next instruction and take that I'm Tyne Instruction register and in the control section will act on the instruction and everyone to go and take the next one and so on and so forth. So they score ahead and we'll see how that's done. So we're going to go through the control section here and we'll chef the clock along and I will have 123 going live and we'll check and see all the enables and all the saints, and we'll see how this works at in order to fetch that information. No. First of all, what we're going to do is change our instruction. So it any No, it's just going to be Centinela zero. So let's say we put our instruction and our initial instruction as all ones. Okay, so an effect, this instruction, he is going to certain the first major application. They were going to go it out, maybe allocation and take that information when you put an instruction rages stuff and this here becomes a force instruction for a control section to act on. So I said all I can say the control section again. So we start off in possession one and you can see in possession one, we have the instruction address registers enabled. And this boss one has gone high. So you can see here the instruction address registers enabled. So which is passing on the values of zero? Want to the bus? So this contains the memory allocation off the next instruction, which is just all zeros. So go zeros Sutton on the bus have also made There's but one who high never seen this in a previous video. They're All this does is when Bus one goes high. It stops the normal flow of traffic from the Tampa Register down and to the eoe you. And though the through, traffic just comes from value here. So it's just simply close our value off one end to the Alieu. No, the reason for doing that is that were, in effect, getting ahead of the game here because we know the instruction address here as as just a value of zero. We know that the next one will bear value one, and the one after that will be a value of 23 and four. So what we're doing is we're Adam again. Our value off one which innovators are next address for our instruction and what Putin and to that's air you're here. So we got a value of one cent in there. A value of zero setting there. So all the way, Don't this foul you just sets at one? So that's one. Eventually will be passed then and will be Are you instruction that dress of on your instruction? So again, it's just getting ahead of the game. So I see what else happens at this stage here so we can see here. They made an address register, let's say and also the accumulator is set whenever we get the clock. Say it came in on. Okay, so it's made about addressed. Rages don't accumulate. So when the clock sake was high, you see there may be a address, register goes high and also the accumulator of set goes high. So the Major J. Shea just a good high. All that does is it puts the value of 000 which is setting on our bus, which is the memory allocation off the next instruction. So that value zero was high and we also have, er accumulate, going high high here. So it just say it's that value of one end to the accumulator. So again, that's just part off the opti of this instruction address register. So let's move on to the next step here. So we're going to step two. So which is pokes along? You can see that Say it is no going law. So that value of one is held in the accumulator. So that's the next end. Evil the next enable here. If I zoom donut, you can see here that the Rams been enabled. So the value that was on the main road allocation one has no gun on two the boss via firearm. Okay. And also, whenever there the set comes on, that value is going to be set and their instruction register. Okay, so all we're done here, as with enable garam so have pushed the value there is on the ram, which is our 111 So we get that memory allocation killed in the 111 and we're stuck on to the ram and it's going in the rahm and all the way along here Enough we've been into here. It says that instruction register has also been set so you can see the instruction register would have been said, but also that will be set whenever we go into the next clock pulse year. So when the court post here and that's the clock set polls, So instruction registered a set. So that's for you. Here 111 which is the next instruction has been placed and saved the that control section. Okay, so that's ostensibly what we want to do. We want to go antique the the first instruction, which is an address, you know, and put a end to destruction register. And that's what we've just done. They're just know. So finally, was a couple of this ends, too. Tie ups with the next one is 10.3, Chile's go along 2.3, So the next enable call off the clock consent. So that's enable here, and we can see here that out loud point here. What happens as the accumulator gets enabled and the instruction address register gets here ? Okay, so the accumulated has enabled. So if really what we're saying is we're with taken as value one, which will be their dress of ah next instruction and with taken over the cumulative and put on in the boss. And then what we're gonna do is we're gonna put out value into this instruction address register because that's the address of our next instruction. So whenever there cloak sake was high, that value there would have been said. But you know, you've seen that before. I've already noble that, but that's that value going high. So that would be set. And that instruction address register less is what through the three points here, Solossa, fetch cycle. And of course, if you want to continue with us, that would just nothing's gonna happen for the 45 and six. And then whenever this boss one was high, that's was back to the beginning. And, of course, the value of one would then be incriminating, cause we'll be out and another one on. Yeah, and it would have a value off to the four or five so on and so forth. So we're beginning and we will be pilling out the information that send the next memory location there. So that is a fetch cycle, A lot involved in it. But you can think a team and mess about with us yourself and walk through it yourself for your leisure. And if there's stuff you don't understand on place, your after walking through, a few teams will become a part. What's happening is that sold for less video. Thank you for listening. I'll get in the next video goodbye. 18. ALU Instruction: So this is us finally start to build up on Instruction court for or CPU, which is really the start off assembly language. It's a long video that special, both woken, threw in some detail. Also, if you get stuck, that's what we'll again. Don't Lord in the Fail from the Resources Section and Mason a vote with it yourself to see how it's all holds together. So good luck with the video. If you look down in the resources section, you'll see a fail called ale your instruction so you can go ahead and open up and then head Don't to CP here and you get their CPU is a Normand. So I school. Have a look at that in about more detail. So in this video, we're going to use on actual instruction, which we're going to place and instruction register, and they stopped. Instruction will go and act on the control unit, and it's going to do something simple. What we're going to do is we're gonna put a number and that's registered here on the number of nest register. We're gonna add both numbers together, and the fatal answer will be in this register here. So Let's have a quick we can say the control section. No, don't get too wanted because we're going to talk our way through it. But this is a force part where we're actually building some logic and to the control section. So this is the control section here that will have whenever we're finished. Thus video. So there's a involved in it, so we'll take a tame and get through it, and you can always at the end, open this up and have our play with it yourself and try out and see exactly how it's going to work. So we could see here that we're actually going to be Putin on instruction. And here, unless instruction is going to Olive, is to add those two numbers and put the number and to one of the registers. But before we do that, let's go ahead and will start looking at instruction set. So don't worry if that's feeling about confusion that will become a part. As we walk away through so they start looking at the instruction set. There will never be looked at adding two numbers, and also when we did the fetch cycle, who's when actually part of her instruction set. Those were hard wired and we're hardwired, um just togethers on lead in two shores, the direction we're gonna take to build up the control section. So actually from no one and we're actually going to look at the instruction set here, which is going to control the logic which we're gonna build up and said the control, you know? So don't worry if you don't understand, everything is happening here in this page because we're going to take the information that we have here, and we're going to build it physically and save the control, you know? So what we have here as a bets and their seatbelts cause NTR control unit, and it controls all of the logic which was still rebelled, which sweat she's all of their sets on enables. So first of all, we're going to look at something called the a L your instruction. So whenever their most significant, but here goes high, then we know we're going to be using an ale, your instruction, the first kiss, Then the next three bets we see here are going to repair to the functions within side their hou. So, for example, if the next three bats for a 000 We know there would be an ad function within the You have got Chef Ray left the north on the or X or in the Comparator? No, really should have four bucks left over. So these two bets here do is refer to our four registers so we can have a register are zero R one R two and r three. So those are our physical registers that were caught belt and the CPU. Now what we do is we group these together and we call them Rage E. But remember, rages no physical register. It just refers to the grouping of these four registers, which is controlled by these two bets and the instruction set. Similarly, we can look at the two least significant bets. And again, these refer to the four registers R zero to r three, and we call that register be on again registered bees. No physical register, as just refers to the grouping of these four registers, which is referred to by the to be significant bets. It was above almost all they're not page and granted. If you have not seen this before, you better give me a bit scratching your head, but let's go and will take this and we're going build and large ism and they will all become clear. So I stay in this level for the moment with Okun into the control section they probably want to do is we're going to a number and telestrator start here. So off their skated the input here and we just manual going in for number and register. We're going to manual input number. Unless register well, I'd Botham together and the answer will be hailed And this register here, so we're going to actually physically pu n over. You know your instruction. So are you. Instruction is going to be one for the more significant bets open as a zoo. More significant bets. High Renova on Danielle your instruction. So the next three bets the fair to the function that we choose within the whole year. So 000 as the ad function No, the next two bets here refer to Reg E on the next two backs year affair to rage. Be Remember Rage e just refers to the four registers here. Underage. Be again that just affairs to the full register their Ishmael. So what we want to do is we want to add the two numbers together. So this register here is going to be Kevin by 01 So that's going to be our register to your Chagos register 012 And the strange is that he is going to be our register three. Okay, so goes 0123 No. So s is telling us that we're going to add these to the core intense off these two registers together. Nobody to actually put some physically and these register. So let's put a value or four in there unless people value off three in there. So they were all say up in order to add these two numbers together and put in this register so we can get to the control section? No. Whenever we can see how yes is, actually why of no. Is that a mentioned before? There's a lot in this video. So what do you take a time about through? And if you get stuck, you can always open this fail up, and you can just play with it yourself to get an understanding. So let's go and have a look. This is US insider control unit, and you can see there's also involved in this that will take a time on our work our way through. So what could split any little chunk? So the force chunks we're going to deal with of these rage e and Rage B and the output two registers so you can see that we've got our instruction set coming in here. Of course, it's split into the eat bets and with court the first more significant, but as a value of one which tells us it's an EO your instruction. The next three bench tales is that is going to be an odd on the 10 taels is that we're referring to Reggie and we're referring to the register number two from Reggie. Never a fairing to register number three from Ridge be for these two ls for there to be significant bets up. So these two bets are coming up here and you can see the get in here to this thing here called Rage. Be Remember, rage be is not an actual register. Just affairs too. There accumulation off the four registers year. So there are 012 and three. Okay, so it's just a grouping of these registers. So when this goes in here representing 80 and being honest thing here, it's just a two by four dick Or does it? Takes the two inputs here and it produces are four outputs so really just chooses. There are particular value. Here's for example, this is 11 slight should be registered. Three. So whenever it there, too, before Dick order comes out. You see, it's packing this lane here and you can see it's get into this on gay. So ignore Land Gate for the moment. You see, it passes through here and isn't to this point here. So this is an or gate. So it's trying to choose this register three. Okay, No, it can actually choose the register. Three. Those two things has to happen. One. The clock has to go high, which is at the moment, but there's another thing has to happen before it's able to choose that register, and you can see here that there's actually a connection here that would take out here, and it is up to this thing called a Reg be so that there is just another part off the circuit so somewhere else within this control circuit as determining where the re actually alot the circuit. The control unit to choose this register three. So similarly, we can lick it these two beds here and you can see that these two bets here less is them head no fear and you can see there's on one. And there's, like, zero and this consent to a rage. Here and again, it's a two by four dick order. So it gives takes a turn, puts and gathers or four portable outputs and you can see here. But actually choosing one zero, which is a number two ish like, was register 012 So it's coming down here again until the sound gay here. Others trying to choose that's value here register to But again, it wouldn't choose it unless the clock enable was high, which, as it them woman, the also we're also will have to happen is that, uh, register E will have to be chosen here from this and put Lane and I get chosen from some other part off the circuit. So some other part of the circuit watch like control, and it'll tell us whether you can actually get access to that register. But we'll see that just in a minute. Rely on the part of the circus. So you also know that the Tooley significant bets here, Which again to the strange Be also both to the right and again to another two before Dick order this 22 before Dick order megazone. And it controls the sets for of registers. So that's the register zero say 12 and three set there. No, they won't actually go high unless the Clark se as going high. And also, there's one other control point here and at some other point in the circuit called Reg Be underscore. Say so. Let's hear or control whether we actually get high on the set. Okay? And remember these things here. Just tunnels. So it just saved us from drawing the wire from one point to another. Okay, you can actually see this is actually this point for that up here, But we'll get to that just in a minute. So finally and this little section don't hear what your covers Almost half of the four we want to cover you can see here that we've actually got there or records for the year. So this is choosing which function we want to use within the l. You never seen here before that we have this value one soap whenever the music African back was high. Then you can see this as good goes to a value off one unless one descent to each of these iron gates and then a 000 Well, that could be anything. So it will be eight possible combinations off these three and these Gwen to the engage as well. But there is one other point as well, but also controls where that we actually give the accord on law and you'll see that it's followed up here. So we'll see that in a minute. But ostensibly thes three bets here will come out. I know. Choose the accord. So these here, Hedo on then, or the control section on Gore Street and to the EOE You okay, so I've come quite far. So no for the second part over Johnny and to this control section we mentioned before that nothing's gonna happen at these, Opens here for the registers or are l u. Or say it's here for these registers and told these other points he had go high. So, for instance, this raging enable whose high other age being able was high or rich, be sick, was high. And as I mentioned before, these are just a definite part of the circuit. So all this is just a tunnel, and it just saves us from actually drawing the wire from this point up to another point. So, for example, X ray to be said is actually that point, their rage be set under the same point. We just don't want to put the wire up. It just makes it clotted. So we're Do these come from? And what controls these? Well, let's look at one as an example, we know that whenever we put a one endear as an eel, your instruction. So before the lane up here, we'll see it goes to three unengaged. So get not one that one and that one. So let's take this forced on gate, for example. The other input to this on gay goes to the stepper, so that would be a anything happening and told less step but a step through and go to 123 go to possession four. So when the Staples got possession for Let's Sound gets going to go high. That means that hope it's going to go high and something's gonna happen. Okay, so nothing will happen until we choose the air. Your instruction on the steppe of gets to this point, in which case the schools high and it's going to do two things. So first of all, it's going to make this point rage be enable high, and it's going to make the temp say hi. So all this does Is it just chooses on enable from US aid on the set from the state. So previously, these were just go down and be hardwired street on. But that's no longer could happen when actually choosing it via our instruction chord at the bomb off the screen at the bottom here. So let's get shoes and former actual instruction. So if people to fall this rage be enable soar, HB enables no going high. So there's the Reg be enable there so that HB enable has gone high and before what? Don't then these are going to be high. Although we don't here and you can see at this point here this point is no going high. That clock has gone higher. Court enables high. And also we've got choice here from her instruction set which is also going high. So whenever this clock poked posies along to that point there, it means that this I'm gay here as therefore going to go high and we're going to choose this off three. So the value of our three there is going to be enable don't of the boss. So we'll pecker value for R three and according to the bus and also once that's happened will keep out value. I will say it and the temp register. So those are the only two things that happen It's state for But whatever the staple moves on a state five the sea process occurs. We have an eel. Your instruction get into this arm, get the stepper goes high When the stepper goes high we can put no or less lane And in this lane here is going to make rage enable high and it's gonna make the accumulator say hi equally whenever you have done 0.5 and the steppers moved on a possession sex I stained going to ensured that this engage local high. So unless comes. Don't hear that sound gay or go high And but no one s lane And on this lane, we enable left Jamelia and we also enable the same value within the state Value high and rage be so you can see this process here off the stepper walking through and these lanes here then being enacted So it's actually see their simulation running. So if we go to the top level now, we're going to simulate it. So make sure the simulations, Tom Dorrance. So simulations enabled. No, we're going to count three o'clock pulses here so nothing will happen till we get to clock polls. 12. Okay, so we know the ticks for court post Digger three. So it's going to take our court postseason. A court post post 12 will actually get to the stepper number four. Okay, so if you just cut me through 12345 Sex. And on the 12th court, pokes enabled was high. I'm going to stay per point number four on a winner wears and yell your instruction. So that's going high. Stepper point number four has gone high. We've got note put here and we can see that the range be enables Going high and attempt said, here, is going high. So if you come down here to the range being able so that's that age be enable that's going high. So means that that's on. Get here. Can no go. Hi. I'm a concealed off chosen register three from Rage be and you can see here. That's just what we were asked to do. And the destruction court here, which is there 11 here. Also, we can see here that attempt se has gone high. So if you come down here to find attempt, sit less attempts it there hasn't actually gone high yet. It wouldn't go high and toll actually gets the clock pokes from the clock set so it will get that close pokes whenever we get to the next folks along so you can see how you feign the detail we can get. Here were first clock because the fact that it's a it's a four cycle cork and we can get every single set on enable change within the CPU. So where is going? Hi there. And you can see here for combined state know that the temp say will go high So that's the temp said going high here. So of course, rage tree enables. So we take the information from the the contents of registry put on to the boss and then we corporate R and to be set and aerator and to the temps say so in the top level. You'll see that if you look at it, you see here that both radio the information here on this register here, which is the value 123 So you see the to talk planes to be significant bets of going high here, which is this value here were put onto the bus. I'm a vocal, say, the temp. So were taken us information here from this register and was deccan it and to the team register. So it's continue to the next part. Okay, so that's everything that we need to do. And that's Lane says only two things done there. So whatever the step records 2.5, we're gonna have another couple of things happening. So Reggie is going to be enabled, and accumulator is going to be say so Let's go ahead and say that's up. So we're looking for the next clock post. Enable going high so that Sir enable going high and you can see here and there that enables gonna hide there. And it's put the value 1 to 4 onto the bus and the value will just come along and it will drop down into that. You know you're here. Nothing. Also see, Let's sit there accumulator. So let's get down. We'll see the accumulator. So there's accumulator doing here. We'll actually see it accumulator whenever the set clock pokes comes along here. Okay, so let's just go along. We'll get to the next clock, pokes, and that's going to say and it's sitting the accumulator. So what's happened here is, of course, the two values no setting and A and B took a value for their A value of three there. So we can also go in and have a look it there or record here for the ale years. So it should bit of chosen there at our don't code in order to add both of these together. So if we could don't to the control section, you see this 0.5. You see, it's coming all the way down here when it comes all the way down here and it's no good into these aren't Gates. So the iron gates have gone high and the value for the Yeah, well, your instruction is gone high, so that's one deal. Israel so means that the value here this year's year zero or past three through resign Gates. Okay, so if I change these to any particular value, these three bets they'll know appear at that I put here. So also have a awkward or say up. So now we're ready to go into a final part here, which is part of sex. Or we got to the top level pokes again and tore cloak enable goes high. So that's oclock inedible Going high? No, unless I would like to see what it's done in the control section. So the clock and a bell was going high here, and we've got on sale your instruction and there's one other section here which comes from a compere instruction. But we'll talk with that later on, so there's no need to border. But that's back here just right now, So this is going high. So it means that we've got two other things happen. The accumulator as enable So the value of the some of the two. The 43 which is seven as an accumulator stopped like you that value onto the boss. So accumulate has enabled. And then the ridge be has Bean said. So what? Several. We can see the accumulator, first of all, So the accumulator has been enabled. So the value was in the queue. Billy of us have some here, which is seven. So you got 1 to 4, which is seven. So we're please that seven on to the boss. So the feeling fairly last thing that we're going to do if we condone here, you see, is that rage be has no bean set, So their age be say, here. Well, this is a rage be said here, and it controls the say. Okay, so that means that we're going to place the value and to register three whenever the clock say who's high. So we're gonna talk level and we do one more court posts. We'll have the clock set. We go high. No, obviously I've actually just connected thes but the clock state would be high Here. You see the pen just going high. But off course, we wouldn't actually see the value get into the register here because we had already disconnected the register and order to start off the whole process. But you can see that the this fei no value here is seven. And if this was no connected here, that seven would be placed on this register so well done. If you managed to get this far, it was an awful war in this video, If we get to the control section, remember what we started off with was just hard wiring and to our set sundown enables. But no, we've got an instruction set here unless instruction set. No controls. What's happening here within their control, you know, So we could imagine taking this instruction set and dreidel rather than having one's and zero's. We could stop using number of new Monix and we can start given instructions names. So that's really as the start over assembly could what you'll get. Understand that a lot. Bayer, as we start building up your instructions over the next few videos. July Solaris worth for this video. Thank you for listening and goodbye. 19. LOAD and STORE Instructions: So let's continue with the control section and let's get a CPU belt. So let's start looking at the Lord and store instructions now when the more significant is law, then we know we're in a load or store instruction. And then whatever this back here as equal to zero. Well, no, we're in a Lord instruction, and when it's equal to one, we know we're in a store instruction. So let's go ahead. And first of all, we'll look at the store instruction so I can't just sit up here as zero. So we know slowed our store and, of course, 001 sorts of one. So we know about in the store instruction. I've got these two registers say up here. So the store instruction really says, Well, the 1st 4 bets Year of the Lord are store. So it says stores we could keep that as a lot on your morning will call I S t. So we were saying, Here's Esti and we're gonna have registers. So we're gonna have Treacy an enraged be So we've got esti space Reggie Coma Ridge be so that's alot you more demonic or a little could for the store instruction. I really what it says is what want to do is want to store the core intense off register R B to the Rama dress that's pointed to by register R E So really, in this instance hearing for this example, what were tuners were storing the contents off register R B What US cases register to store the contents of registered to end the Rama dress, which is pointed to by R E, which is the Rages Store? Three. Should you ever concedes that our store instruction really As from register to Rahm so were taken contention is a register on a nine to the rum, so I school and we'll look it there next instruction, which is the wood instruction. So here's our instruction court Here we have a zero in a more significant bet. So it's our Lord or store instruction and this back here as a zero. Therefore, it's our would instruction. So a little demonic here for as L. D. For lewd and maneuver. 1st 4 Batson's instruction and the next two bets are they are e and R R G and R B. She's going to be Lord are a comma. RP she really? What this tells us is that we want to lieut the register R b from the Rama dress which pointed to an R e. Okay, so really, what we're seeing here, then is we want to load up register are too, from a co intense off the rama dress which is pointed to ah, and register off three the real big casinos, lewd as from the rahm and to a register. So it's easy to get confused with was to just read out there. But we'll go and we'll build up and large ism and will become a lot clearer. So if you go into the resources section, you'll see the failed call ward and store instructions. So if you go and open up and then you come down to CP your double click that So this is a CPU here. So I mean, Zuman about will have a closer look at what we're doing here. So you can see here that, of course, CP year as usual and their sentence here again, we've got the instruction register has been designated, so we're gonna put our own instruction and here we're going to start off the store instruction We've also got access to these two registers here as well. So what's this Store instruction? What we're going to do as we're going to take the contents of this register here, which is registered to and we're going to store the contents of this register and the memory address in the RAM, which is given by the address held in this register. Okay, so see that again. We're just gonna take the contention with register. We're gonna put it on the rahm, but the dressing Haram is given and thus register here. Let's go ahead. We'll do our store instruction so we know the most significant bet. Moscow will also pass a law. We know it's a load or store, but then we know in order to ensure that itself store instruction that the fourth but must be a one. And if we want to do is we want to store the value of this register here, so that's just gonna be registered to so is registered to. So that's 12 And we want to store this Valionis register and to the memory at race pointed to by this register, which is registered three. So we're going with her register three there. So this is just a e A for these two bets and R B for these two boats. So now it's We'll go ahead and will change the values here. So this is the value here. We want to move to the register. The Haram. So let's go ahead, and we'll just put on old ones. So we're going to be used moving us to an address here. So let's see what address we're going to move it to. Let's move it to, um address number 15 case US 1 to 4 it. Okay, so that's address number 15. Let's go ahead and we'll see this walking. So we should be shafting this and to address location 15 and the rahm. So we're not gonna get in control sex right now. We'll just walk away through and we'll see you actually all put in, so nothing's gonna happen until we get to the 12th clock posts and then you can see it. The 12 court posts we can see this enable here is going high, and we're going to be taking this number here I own in a rahm and then next will be set in the memory address rages. So So this is really just telling us. War address. We want to put this information and and the rahm and want to put an end to the address number 15. So we just had the one to the next court pokes and you can see the address has been said so if we condone into the rahm and have a real IQ, you will see that we've got this address here certain in this memory address register and you can also see that the vertical lane here is going high and the horizontal line here is going high. So what? I slipped back, You know, this registered here, which is the register number 15. So I circled back up to the top play. Everyone will will finish off the simulation. So again we'll go back and control section of my not so unity too much about all the details here. So that says appointed to that address. So in the next clock pokes around, we're going to grab All are ones from the strangest that here and we're going to stick and to that address that were just pointed to So next post here you can see the rahm has been set. So we've taken us information, which is all the ones, and will put an end to the address we pointed to and the Rahm. So if we could bite down into the Rahm here now we can see here that they say it has been as high on this Rahm here and appointed to. So who you going here? Have a work. You see, the state's going high here. Well, and the information here, all ones, has gone into this rages Start here. So whatsoever You look, you see, do you see all the ones get into the register? They're so there are certain at that point and the register So it's hailed within, not memory allocation. Let's go back up to the top and that's pretty much that size finished. Okay, so if you continue with the clock here, as basically was done with, taken that value here and we've put into the memory of this maybe allocation here. So that was only setting out. Maybe locations. No, send anybody else. If you run into any other memory location here, you won't find that you see so zeros on the only memory allocation that it said and to as the 1st 1 And here you guys did. You'll see a certain there. So free said the CPI year of put the registers back to their original values here. And I've put their instruction Corden here. So it's gonna work. See, actually walking and save the control section. So you see here that there's accomplice sections are actually taken out because we're not going to use them here. They will be in the final version of the control section, but they're just going to climb that stop. So, for example, with take, you know the section here on the or cords to the E l U and I compare section here Israel. So return it aboard without will just leave them. Oh, just know. But you see here if I did, unless extra little section here and he sees a three by a recorder, No, if you want to see if, for example, we get the more significant But here, if not more significant, but happened to be a one, then we know what we've been on here with your instruction. So if that was the one that would mean that the estate here appear zero. And these are zeros with organ tone to the iron gates. That would mean that these aren't gets an effect, Wouldn't function saw very put for these aren't gets, wouldn't be determined by the values off the and put CIA. But as it stands, no provides Lee go as you know, one this point, and we know that zero determines its on load or store instruction. So if I say zero, that becomes a one. If that becomes a one, that means that all of these iron gates on no plea and the output of these nine gates will be determined by the big, determined by the input of this three by a tick order and then put by from the feed it by it. Dick Order is going to come through and don't to these bets year. That's one that's one on this one. And we know we've set this value here is our one, so you can see that values are one every know when it's a one as a store instruction. So this is a one here than a three by a tick. Order will choose the value off one here, but the recorder So it means that oneness high here. I've got one high here. So about choosing the forced on gate here because that's the zero angle we could see with choosing a second Dan gate. OK, so the first time get, there's no getting Georgian is the second down. Get some means that the sign gets get chosen. We got on output from here and to this on gate and also to the sign get now there's another couple of iron gates is well that we've got. And here is this one here on because this one here No, these aren't gates, these two, they'll go north to the stepper, so they're going to go 2.4 point five stepper. Joyce, go ahead And we have all we can see what these iron gates do and how do the work. So the bottom two and gets here off course. High end puts here. Never got my input because we're choosing this particular one. Which is the store instruction? No, the top two iron gates. Those will go alive whenever we choose the first line. Get here, which will happen whenever we do the wood instruction which will see just in a minute. So you concede he of these two board mind gets one step for at the moment. So this one and this one has gone live there. One thing to know is how far they are than on actual or section here. No, by rates, thes two points would be connected together, and then they would go up here and to the same point. That's Lane and this lane. But whenever we connect, to get together like that puts off the largest someone all over to do that. So what hard to do is split them up and put them through an or gate and then just put the two separate lanes here? Okay, so it's just really a fudge in order to get this thing to work and lord you some Because, Lord, you someone close to connect, to know, put two on, get together So you can see here, then what's gonna happen? It point for, as the ramen able is going to be, Rum Ridge is going to be enabled, and the maiming address register is going to be saying so. Let's go down to range A. So there's a rage either, and that Ray J. has been enabled. So we make him down here. That means that we're on these four here, these rogue on life and these four here going to be chosen by Rage. A. And that's going to come from these two bets here. Yes, but And that's but which is going about value off one in one, which is going to choose this one here, which is going to choose register three. So you hope we're doing is we're taking the contents of Register three and then we're going to be putting her and to the memory address rages that whatever their claw comes along. So let's go up to the top level and we'll see that happened. So you can see with enabled register three with Putin this value here on to the boss and no pickup. Quit the next court posts, which is the the sale come high and will have put this value into the memory address register. So remember, all less dextrous contains the address off the rahm that we're interested in. So have put that address on to the boss and they were put into the memory of a tree exchanges store. So if we condone into the rahm You can see here. The vertical lane is going life here and the horrors on two Lane has gone life here. So we'll choose in this memory address location. Okay, which is minute racial occasion. 15. So let's go back up to the top level and we'll go into 0.5. OK, so what we want to do as we want to pokes the clock Until we get to stage five off the control section, So does the neighbor going law. So under the neighborhood was high. That would be was on stage five. So what's going to here? Um, have a little look. It it. Okay, so nobody on stage five of the stepper and you can see that this lane here no has gone high . So whatever less lane here is going high, we've seen rage bees enabled. And the Rama's say so. If you condone here because rage be enable. So what? HB enable means that these for here come into play and they're controlled by the strange be a decoder which is controlled by these two points here the zero and one. Okay, so that's gonna choose are registered to so ranges up to is enabled and onto the boss. So the context registered to going to the boss, and then they're going again to the Rams. So the rams gonna be saying on the next cloth posts. So where there's the next court pokes from along there, So the rahm is going to be set. So, Fraser, so the value here is going to go into the rahm. Okay, so what we've done this with enabled the value here wanting the boss, which is all ones, And then we're going to put that value and to the rahm Rahm say and will begin to the name of allocation governed by this year. Okay, so if I was to drop into, we just go over the next court posted second born. Oh, so if I was again he and have a look, we could see here that the vertical was going high. The holder zones going high with chosen mess, protect melodrama, location where began about Rahm location and have a look. You'll see that and say that the value off one has gone on there. It's been saved onto that rahm location. Okay, So even whenever there all the rest of the values Go back to zero. There, you can see that. That's rahm location. It still holds a value of one case lamp. It's got zero. But it's still Brittain that value there, which we've stored in it. That really as a store instruction, we'll go ahead. No on will. Look it. The Lord instruction. So now let's look at the Lord instruction in the previous store instruction. It took the contents a year and a place to Anna the memory address, which was pointed to with the contents from here. No, but we're going to do is we're gonna take the CO intense from the ram, which is pointed to from here on, we're going to put it back end to the register here. OK, so it's just the opposite process. But when you take ol Aram and put into the register So in order to do that, we have to stay up Instruction address instruction court here. So the instruction could for our lord is going to be oh, zeros. So we keep it up always euros. Now what we can do is we can Jake Oh, where we are here. So what? It point? So it along here So let's have a look. Kid will just continue this. Oh, and told with the boss, one goes high you every now we're back to that again. And so that's a bus one going high. So let's put on our to your court posies. That's a to of course, pull. She's here. So whenever we come down into the actual control unit here, you see No, that on this control unit, the value here is going to zero. So this is going to zero. So unless three by a tick order of no chosen zero as opposed to one and by choosing the Tzeitel, it means that this on gate here has no gone high. So affects on gate here is going high. Then for choosing eso put here Onda also, that would be so here so we can see what state for here that's going high. That's going Hi. We have a pretty good high here and again we've got this year, so it's gonna be Reggie enable and memory address register say so We condone here above Got Reggie enabled. So Reggie enabled here and it's choosing our three case. We're thinking the contents off our three and we're going to put them on to end to the memory address register. So I scored and have a look at this at their talk. Wavel. So we can see here that this register here has bean enabled. So have taken their address that we're looking for with Peter owned to the bus here. No, the next clock post this set will go high, so we'll just that's an ex cop pokes here. So the memory address ranges stopping Say so when over point to memory allocation number 15 within the Ram. So let's move on to the next stepper sectional kiss or will be to enable goes Lord an evil go high again. So that enable going high. Reckon Suman and we can see here that we'll know in staple possession Number five, step of possession number five We now have this lane selected here so this lane selected It's going to be Rahman able and then Reg B c it So let's look at the rum enabled so we'll go to the top level I can see here the Rama's bean enabled so have taken the contents of that Rahm address. Year 15 of Peter on to the boss. No. The next thing we're going to do is going to see it and are too. So we click on the next court post along much the say here and you can see the sea. It's going high. So if it were taken that value, if it's on the boss and put it back in here, that's all ones that were put by Ken. So you can see the process of walk through here by with the store on the Lord. Where we that store we took the core intense off this maybe reallocation we put into the rahm and the the point you put in the rahm. That race of the Ram was contained in here. And when we do the Lord, we do have some more thing. We have the address of the Ram here, but steady Go unless we end to the rahm record from the Rombach and into the memory location. So that's all that is for the Lord and store instructions. So thank you for listening to the video. I'll get you on the next video. Goodbye 20. DATA Instruction: So let's continue our journey through the control section. No far to go. No, Sure, stick with it. So let's look at the data instruction More than theater instruction does is it goes to the next address on the rahm and it pills out the information and push the end to a registered given by R B. Really? What we're seeing is that the next address in Rahm won't hold on instruction. I will hold data and we take that data and we put an end to the strangest Are here so that the instructions given by 0010 these two bets are not used. And this as the rage is to be and this instance year were pointing to register to. So we could chief here that we're loading the eat bets from the next Rahm address and are too. Okay, so and right here we really said load from next rahm address to a register the last with the instruction does so best in by actually building up and large Isam and walking through a simulation so a school and do that No. So if you had known to the resources section as a fail called deconstruction so you can go and open that up and who you double click on CP Year Best will open up. The CPU fail. So I was a man in there so we could get about more detail. Okay, so we have the usual CP year you've seen in the previous few videos. You'll notice Year of Disconnected. The instruction rages there because our goal keeper and our own theater instructions to the date and structural Putin as the 001 And we're also going to write to register RP. So there are people going to rate to be registered three. So that's this one here. I'm also going to put a value and to the memory, really location here. So let's just put values, Udal one you want, you know one. Okay, so that's going to set an effect in the force memory location here. So what the data instruction does is it goes to the next memory allocation after the actual instruction, and it takes that value within that next memory allocation, which, in effect, no, there's no going to be an instruction. It's actually going to be a data. It takes that data and it's going place and to in this case, is going to be registered. Three. So that's the 11 here who covers 0123 No, we can't quite see this working properly because we don't have all of the controls say, out within the control section saw, For example, we don't have the fetch execute cycle, which would normally be over 123 So the fetch would have been done over steppers 12 and three. But I wanted to leave because I only wanted to put in one little function. I came just to so that the diagram doesn't get clock it and you don't get lost. Okay, So what we're really assuming here is that this data there some instruction here? Has bean already been searched? Oh, off the rahm and it's going end to instruction register. And the boss has been saying hi and there's a value off one sent here, so it's automatically point to the next memory allocation. But what we're gonna do is we're actually just going to stick this value in to the force memory allocation. So what kind of assuming that there are, if you like, a memory allocation minus one OK, that this thing is already the instructions already been taken off. And ah, no. Of ready hold on to the next memory location. So we're going to put in the value 01010101 and two This memory allocation and in effect, that's becomes the next day, which is a database, and we're going to drag the DEA Bay out into the register. So this is a simulation, say, up, ready to go, go are instruction here, which the 1st 4 batch tales is that it's going to be a data instruction and it tells us that we're going to get we're gonna put the information into the register three, which is the strangest that here. So let's go ahead so long. It is going to happen for the 1st 12 court posies and we get to the tree of court posts. We should be in the first point of our control section. So let's have you looked down into the control section will see how it's wild so you can see this is our instruction. Cameron here and you can see that this thought but is going high here, So it means that when a thought about going high here is pecking Note the actual the forsaken, the thought down Get down! So, no, the third time get don't has gone live. So no, we've got these three on gates, our live on one leg and the other leg was to the stepper. So know what we're doing is we're Cornish State through these instructions here. Okay, So those three sets of things that were going to do so we're going to talk through there was just No, But just to know that the rest of the videos on the instructions say there's no hole Law of extra circuitry to be Arctic is over. Going to be doing this. We're going to be working our way down, Resign gates and each of the iron gates will allow it to include another instruction. Let's go ahead and we'll walk it. Hope what's going on here with these instructions here? So we're in possession four. Here. Let's sign. Gate is going Life. It's chosen this lane here. No, the first linked in or is that revised? Got connection out here. And Teoh boss one. So whatever their original instruction here would be fetched, we would have incriminated the boss by one which is telling us it was sitting the fetch cycle up so that then point to the next instruction which it rogue or in a fit show after it's finished this one. But no, What's happened as we get to state for have actually added another one on, too. No reason for doing that as it that whenever we walked through this instruction here and we get to the end, we don't want to point to the next address because we know that the next address doesn't contain on instruction. The next address contains the data which we're going to go on strike in the register, just know. So we want to make sure that whenever we've been through this instruction here, the next instruction that we actually cool, there's no there is not the very next one. We're actually gonna skip over the next one because that's going to be the data. OK, so that's why we got this extra lane and here so we can see here also that the instruction address register as enable So we head up to the top level you can see here, have got the instruction address registered here has been any enabled. So the value that sent destruction address register goes on to the boss. No, f the original fetch cycle had been employed here. That value would actually be not a value off one because we were divided one no one from the very start of the cycle. But because we don't have that faith cycle, it's actually just got into the zeroth one. Okay, so So it's going to either, actually, the very first address here, Tip, echo of value. And we've normal that short shots. We're gonna peco less value here. Okay, So let's go ahead and walk all the way else it's going to do here. So no us court the name and address your just gonna be say and accumulate is going to be saying she came down here and you've got the memory address register that's going to be Say it here. So we're taking the value zero from the boss and getting the name and address ages or suis point at the first name. A reallocation, of course, is going with this one in here echoes with noble that I'm rocks are going to look and it's going to be the accumulator here. There's going to be saying as well. So we had them here. You can see that whatever we get to the next court ball sacks little do it next. Court books. He likes to say it. So it's a cumulative Syria. Israel. So it's taken less extra one per end and it's popped and to the accumulator. Okay, so it means that the it will no be point. Whatever less value goes along is that the instruction register actual destruction address , register, appointment and not the next instruction could be know that data point instruction after it . So let's head on to the next part over control section. So that is a cork enable going high here. And let's have a look and see what should be on state number five here, so I'll just, you know, so we can see properly. Okay, so why don't step number five here on the second line? Years gone life. So what we're gonna do is we're gonna take the contents of the ram and we're going to enable into the register. That's pointed to buy less rage. Be what you got to be registered. Three. Okay, so let's have a look, and we'll see that on the top level. So you see here that the rahm has no bean enable. So we're taking the contents in the force member allocation, which is what? 0101 were popped on to the bus, and then the next court posts, as they say, And you can see here that and they say the rum is going to be, um they saw a night Quote post. The register here has been said, OK, so that's our taken our value 11 Okay. And it's which point to this 0123 The third Ranger Stossel has been say so. We're taking this the contents of this address here and we put a end to the register. So we know the contents this address, no use eat boats. Those are actually deter bets and the DEA bets are certain and best register. So let's continue to the next section. We'll see what that is next. So here we have. Ah, on ST five. So it's like along to sits that sex, and we'll finish this off. So let make a guess, but bigger for you. So step sex. There's a clock here and told her the clock was enable will be in the next possessions lessons on the next possession here. So here, by don't American see about a possession number, sex year and nowhere unless laying here. Never got they accumulate has been enable and instruction address rages, starters set. So the accumulator here will be enabled. So what we're doing is we're taking the value here, which is the no point to the match next memory location. Remember, it's not that the allocation is point to is the one after that? Okay, so it just jumps over one of the military applications here to get to the actual next data instruction. The next instruction. So if they're not there and whenever we click on the set, the steak was high and we're actually reading this and to the instruction address register . So last instruction dressage Don't know Gore point to the correct location. So that's us finished with the data instruction. You can see here that the instruction address register is actually doesn't love all your one there. But if we have hard the fetch cycle already built into the control section, that would be setting a value of two because we divided any extra one through this boss here. So really work. You rid of seniors that the next instruction would know become an from possession to within their memory. Okay, so the possession zero would have been the original date instruction. The possession one would have been there, the data and then the possession to would be the next instruction. So that's all that is for the data instruction. I'll get you in the next video. Thank you for watching Good bye. 21. JUMP REGISTER Instruction: This is the first of our three jump instructions, which allows is to change the order off the program execution. So let's look at the first of our three jump instructions. So the idea here is to change the program execution instead of the program running sequentially from one maybe allocation to the next sore medication. 12345678 So one what we want to be able to do is we want to be able to jump about from memory allocation to memory allocation. So, for example, we maybe want to get them a medication number seven and then the very next. The instruction were made when it come from memory tree memory allocation number 12 and in the next one, maybe memory allocation number two and number 19. So it just means we can jump about the memory locations. So this is called jump Register and what it does. It jumps to the address, which is given in the register R B. So it's GM PR Jump register R B. So this sentence here the register is given by Rage be and we've chosen register 10 on this example so we could see that less is jumped to the address governent register to. So quite simply, we can see that it jumps to the dress and R b. So the jump register instructions given by 0011 thes two bets aren't used. And the register that we're going to I was gonna holder Jump location is going to be register. I'll be which and dissensions here is going going to give him by registered to So the best thing to do is again see it by example would build up and large Isam and walk test. So if you hear them to the resources section you'll see the fail cold jump register instruction. So come down on double click on the CPI year on a game Have seen this before. My previous several videos Now is your men will have a course and look at that. Okay, so this is ah, top level of our CPU and you'll see here that I've designated the instruction register because we're going to put our own instruction. And so the instruction we're going to put in for the jump register, it's gonna be 00 one one. These two bench doing martyr. Okay, They're not applicable. And the last to better for rage be on. Those are going to be what we're gonna choose the value one one, which is register three, which is us. Register here. So, really, what we're seeing now is instead of the instruction address trade, you start getting that's next address via the accumulator destruction of breast registers going against next address from this register here So we can put a value in for the next address year. So if they wanted to peace for any value in Tokyo for ones, Okay, so it means that the next address the instruction address register is going to go to an execution cycle is going to be addressed. Number 25 sex, which is the very last address on the Ram. So let's go ahead and what she heard that sit down and say the control section. So here's the control section here. We can see here that the values years, you know, 11 which is going to be used for the jump register instruction, received 11 here, so that's choosing the fourth and gate don't So that idea. Their pen goes live, and it's written for possession of four to come live. So whenever possession of for comes life in this taper, then this lane years going to come life and all this light is going to do is it's going to enable Reg B onto the bus, and it's going to put our value and to instruction address register. So that's quite simple, just putting the value of the register and to the instruction address register. So let's go ahead and we'll see that actually working so we can back up to the top level that we can see here through the clock pokes you should we get to the health post. So there's a trail of quote post CIA, and we condone into the control section. And, of course, RHB has bean enabled. So we can. Then here there's a rage. Be has been enabled. So we're dealing with ease on gates here, and you can see from the choice here that we've made as 11 which is registered three. So we're taking the contents of Register three and we're going to stick them into the instruction address register. So we got to talk. So there's the contents off register three, which are all ones with Perso Kanaan in the boss and we're going to say that and the instruction address register. So whenever the sick was high here, I must say, going high, I don't see it high. So no without value, one is in the instruction address trader stuff. So it means that the next instruction that the CPU executes is going to be in bait. 250 sex and this ram. So that's quite straightforward. We're going to go on another to jump instructions that over the next couple of videos, So thank you for listening and goodbye. 22. JUMP ADDRESS Instruction: So this is the circuit over job instructions that called jump address? No. And that's what we do, is we jump to the next address is in the rahm. So the jump address instructions given by this court 0100 and the other four bets are no used. So we could use this your morning. Keir will call a GMP space e d d r. So I just jumped to the next bait and the ram. Okay, that's it. Just restated the raid that jumps to the next bait and the Rams. So let's go in to largely sem it more Belden and or simulate that we'll see how it works. So if you get to the resources section, you'll see the failed call jump address instruction so you can go open that up and come down to CPU and open up a lot. And we've seen this before on the previous videos and all German again to get a bit more detail. So what you see here is that with disconnected the instruction register so mean we compare our instruction. So we wanted to pretend this jump address instructions. So the jump address instructions going to be the one here. Racism are going to be zeros. No. What we want to do is we want to jump to the core intense off a memory allocation. Okay, so we'll make the contents of the memory allocation c 15. Okay, so that's a good intention. The name location here. 15. So, you know what we're going to do is we're going to the next address that we're going to have on users are construction is going to be the core intense off the force memory location here and say Haram joy is current through our Force 50 Force 12 here to get to the clock books that that we need to get to. Okay, so that's the 12 court post. Come in. So that's getting to say the control section and we'll see what this looks like. So that's not control section here. We can see here that we've got this value for instruction is is ah, high here. So that high here it comes up and it chooses the 123 for the fifth on get down about python get don't get any leads to and Gates and these turned gets there going to be controlled by the step it possessions 45 And those are going to get through these two lanes here, so it's going to be instruction. Address rages, not enable Member of Jesse Digital say and guarantee. Five. It's going to be Rahman able instruction address, Register said. So let's go ahead and we'll see the first of these. So instruction address, register enabled and member address registers say it. So go up to the top level. So here we've got the instruction address register. Enable so or put in a value that certain instruction address they just don't want to the boss. So originally last value zero. So as you look is only the boss and then we're gonna say the memory address register. So the next quote post comes along with set out value zero and to the name and address register. So really, what we're seeing us or pointing to the very force memory allocation, which is zeros, so no will head on to the next part of it. So we'll go into the next clock post. So that's the clock. Enable has gone high. So it's you don't and here well, it looking to see what's happened here. So No one possession number five. And of course, the Rams being enabled and instruction address register has been set. So I see here the ram has been enabled. So the contents off the memory address zero and the Ram have no go on to the boss. So that's just the value that's contained in here, which is going to be a value off 15. So that's it. 15 going on too. This boss and fatally, the very last part of it, we can see that that value of 15 is going again to the instruction address register, because that's going to be the address of our makes construction. So we're going to the top level again. And finally, when we see it, the clock. So the quote was to say they're not value as going to has been set their and their value. 15. No consent to the instruction entrees register. So it means that the next instruction that you're going to execute in the control section doesn't come from memory allocation to it comes from memory allocation 15. So that's all there is for this video, and next body will go into our very last jump instruction. Thank you for listening and goodbye. 23. JUMPIF Instruction: So this is a phenyl jump instruction and it's called jump F. So the instructions given by 0101 and it will jump to an address which is contained, then the next address of the Rahm Orderly F one of these flags there sit. So these flags come from the air. You. So this is a Cardiff like the ease great and be is equal to be in the zero. So it'll only jump if one of these set. But we've got 16 possibilities here. So we could see that, for example, the 1st 1 here where the 1st 1 will be no job. But the 2nd 1 here would be jump if zero flag was set and the Blu and this one here would jump if the equal flag was set within the l u. Unless we jump. If the equal flight was, say or zero flag was say so. If we were tolerated or we don't the bomb here, we would have jumped, Seay said. So that'll jump if the car if, like, say or the is greater than be or a is equal to be all the zero is sit. So you'll ever seen here Let's jump commanders. It jumps if he's offset to on a dress, which is given by there. Contents off the next. Pay off the rahm so we can see here that that's John perf. It's really associated with the your instruction. Could you get through any L your instruction on After the all your instruction? One of these flags will be set, efforts say. Then away. Jump to the core intense off jump turn address, which is given by the contents off the next memory location and the rahm. So let's go ahead and we'll see how we're going to build us and Lord use, um, so if you go to the resources section, you'll see there's a fail called jump F instruction. So you go there and open up. I think you don't to CPU. Then you'll see. We've got a CPU here, so let's can have a look at that and some more detail so you can see here that we have the CPU that we've seen over the last few of ideas. It's got all the same components, but dissensions here we have this extra component here, and this is a very last register that we're going to art. And unless is the flag register? No, Whenever we do that, John perf we're going to make a comparison. So we're going to see whether any of these are say, it's well, intuition. Rather the cardio is, say, the a larger the equal say, or the zero the same. But no. In order to do that, we have to have gone through on air your instruction. So Ah, particular point of any l Your instruction. One of these would potentially go high. No, After the l, your instructions complete. We want to go and do the jump f instruction. But that means that the information that was here previously will now have passed on and it would have gone over the accumulator. So we need to be able to go and t Keller or core pay a low snap short off these values. Whenever we get through this ale, your instruction and we do that here with us register. So we do is we store these bets that information and four bets here and this register and we say the information and not register from some point here. No exactly were to be set this information Well, we want to say the information on this register dependent on something to do with the L your instructions. So, somewhere within the air, your instruction, whenever we have actually what does a non answer and just stuck in the accumulator At that point, we want to be able to take a little Korpi of it. So in order to do that, we'll have to go back and have a look at the air, your instruction and find a place where we can take that from. So we're going to do that just in a second. But first of all, have a little I can say this here. So although, as it's just the four bets, when you can see that, sir, watch there. So lets go ahead, first of all, and we would see, but we're going to get that set, But from the air, your instruction. So if you go to the resources section off this video off a copy of the your instruction fail during their just for convenience so you can go and open that up of your lake. And then if you get to see Pierre and we'll look it on and a little bit more detail. So what we want to do is we'll get to the control section here. So this is the control section. We don't need to see all of it. Just this. This is famed for its of the Mormon. What we want to be able to do is we want to be sure that we can take a core pay off the flags and that yellow you at the right point. No, the point that we want to take this Korpi that's been overly accumulator gets, say, and the Yeah, we have accumulated get set. So whenever that humility get set, what we can do is we could take a little low put here, and we could connect our panel until so Bennett put pen there, and that will be our state pen so we could take that. So put here, we could feed an airline or flag register, and I'll take a Korpi off the flags from the air. You at the right point in time. So I never put their send originally because we hadn't talked about any of the flags. So if you go back down to the resources section and open up the jump F instruction again and then come down to CPU. So it's just jump into the control section festival and we'll have a lot to see how this is going to work. So let's not control section here and you see have stripped away the stuff that one or entreaty denser. We're just left with the jumper F instruction. So you can see here at the ball we have our carry with girl is greater or equal. Of course it came in on and those of coming in and looking through these on gates here, an interim or gay, These aren't Gates here. The other pen of these aren't Gates are connected to the force four, but so that's gonna be our car e r a e. And are set for these four bets so we can put on her coat for John perf. So it's gonna be 01 01 So a 0101 we can see here that gets through a fee by a tick order with no working our way during that say of on gay. So we're going to the sign gay here and assigned Gate comes up and it's going again to three other and gates us less one here. Unless one of this one and these three here are going to be connected to the staples of state points 456 So whenever the stepper comes along here and has 4560.4, we're going to make this lane life, and it's going Do this. Stop the instruction address. They just on an evil remember address. Ranges are saying, accumulate offset. And also it's going to put one or two that their boss here and then in the next lane five. Which Congress dust lane here and then the lanes, sex covers that covers this lane here. Okay, so there's a few things here for us to work through. So let's go ahead and walk through, and we'll see how this pervades the jump F. So let's back up, Articular. One of these were going to say hi. So let's able, going sit zero high. You see here there's, you know, gets a high here. And if we were to have the zero say hi and instruction now you can see that that zero is going to be Parson straight through here. And as we say that it's either the cardi or the is greater or is equal or the zero Celeste or gay for each of those possibilities. And those all go to that. Start on, get here. So let's go up on the first of all, Just talk her way through the four step here. So I say we get to step for when we get to state, for we can see that there's boss is going to go high. The reason for the Bosco and Highs We want to put another 112 there and stop shin address register because we know that whatever, we walked through this process for five secs and we get back to begin again. We want the instruction address registered to point to the next instruction. But the next instruction the next point, and the Rahm is going to contain the data for this jump f instruction. And that theater and effect is the actual address that we want is to jump to. So we don't want it back up the particular bait as the next instruction, cause it hasn't matched the data from the previous instruction. Okay, so we detailed one on one in order to ensure that the next time we can run would actually point at the next the proper address. And Rahm So if you take the fact that this jump instruction is going to be to base long, there's going to be the instruction and in the data. So also, we can see here the existent go intensive instruction address register are going to be enabled on to the boss and then they're going to get the name and address register. So that would point to the the first address and the and the Ram. Okay. And also the accumulator is going to be safe. So what are saying accumulator with this new boss Violet, this new value here? I'm sorry, love. That point there again is just getting ahead of the game as far as the next fetch cycle is concerned. So it's going to step number five. So when we go to stage five here, we can see that Vest Lane here is going to go live. So less is going live. So means that the contents of accumulator are going to be enabled going to the boss. So remember that Cuba is going to contain the address of the next instruction. So we had added 11 So we jumped over the They are, but from the previous instruction when I went to the next instruction. So if there isn't going to be any jump f then all happen. Is this value for this address year? We'll just head out to introduction address register, ready to jump on to the next instruction. But now when we jump on to stage number five, number six Sorry, this is when we're going to make the choice. So the choice is going to be Do we just jump point to the next instruction, or do we jump somewhere else? And this is the jump somewhere else, but and this is a choice has been made. So I school and have a look at that. Just know so no for its stage sex. Then best line here will be alive. No, If it come down to that all of turn pushed to the side gate, we can see that one of them here comes from the Qari or the is larger equals Ageless is the flags. So one of them comes from the flags. Now, if it turns out that none of the flags are set so that always you know then we're just gonna guys, you know, coming out here in that case here that there's no going to be any output to this on Kim. So that means that the instruction address register is going to be determined by the swine here, which is the accumulator enable. So that would just be telling us that there is no flags have been said. Therefore, just continue to the next instruction. OK, but f at times Oh, that one of the flag syphilis, for example. The zero flight had been set. Then it's going to jump f that zero flight gets sits or a favorite Beautiful. I could say it that goes high. That means that has high that's high and what it's teach sex that's going high. So that means that their output is years no high. So that means that the decedent from this or gate wouldn't come from this point here is going to come from this point here, which is the next address off the rum, which contains the address that you are actually wanting to jump to tonight, kid. Instance there. Then walk is onto the instruction address register hasn't the value for our accumulator is going to be the value that's and the rahm, which is the next address in the rahm. So that's the in effect, the choice to be made at that point there do be. Does the instruction of dress register contain the instruction for the next dear instruction he from accumulator? Or does it contain the value from the next place within the rahm? Okay, so that's the choice has been made. And whenever thus zero goes high is going to come from the rahm. So the next address within the Ram will contain the place that you actually want to jump to . So I stopped to the top level and we'll see this working. So let's put in construction. So it's going to be 01 01 and let's see that zero has been said so that zero there No, let's see if they also that we're going to be jumping to memory allocation 15. You know, we'll walk through this that nothing happened for the 1st 12 and on the 12th 1 you see here , will it? We had this boss One goes high because when I was a jump f have been or we're gonna have to be potentially pointing to not the next police within the round, which contains the data. We want to point to the one address beyond that. Okay, which contains the next instruction. So also, you can see here that the values instruction address register has been enabled, which is zero. And we're going to quit next court posts which will say that and to the memory address register. Mokelock value for the accumulator has bean. The one has been passed down through here. So no certain in this accumulator. So really, whenever we walked through the next steps, the choice is going to be Do be a little doctor. The instruction address register with the address sadness, accumulator or Dubiel doctor instruction address register from the next bait within the rahm And that's the choice was just about to make so if we had gone to make get the next possession So we got two o'clock is no enabled. We could head back down in here and we can see but on this possession here. So possession number five, we can see here that the accumulator has bean enabled with the U value and it's just sitting there and whatever the clock say comes along. I will get past two instruction address register. So let's go up to the top and whatever we call it a clock say there. So that's the new value there, which would be possession one. Okay, there's no passed on to the instruction address register. So it's sitting in there and it's finest that stocks are Address ranges, registers consumed. That's the next instruction that we're going to use. So let's look had saved the control section for the choice. So right. No, a certain stage five. And we can see here that the instruction address register is getting its value from accumulator. But he'll never be gone. A stage number, sex. What can happen is this can be over written. So instead of the stock shin address, she age registered, getting its value from their cue milia. It can get its value from the rahm a little against value from the rum F one of these gets Say hi. Okay. So if any one of these gates said hi, the four bets. So the car the the is greater the equal zero Any other school high. This point was high. This point was high. Therefore the value and Destruction address register will actually come from the rum so that it gives a good indication as to how we make the choice between the value that's and the instruction addressed register coming from accumulator or Laurent. But you know, here that there's a little red lane, so red lines should be warnings, cause that's really on error. No, I can't show you the feel simulation run all the way through to stage sex because we jump to stage sex the way it say open. The woman were actually trying to change two things at once and larger sums. Not happy with that. So you may be seeing well. Does that mean the design doesn't work well, nor the dizzying works perfectly well. But because I've had to disconnect sections here in order to end put send to try ensure you how the thing works and doing saw were not able to run through the entire simulation. But once it's all connected up, then you will be able to see it walking and it well, what perfectly well. But because it's a kind of chicken and egg here at the moment, I'm taking away sections off the control section so that you can make it makes it easier to understand each little part off the instruction set. But in doing sore and some of the simulations on, I'm not able to show you every single part of it. OK, but you won't see it working once it's all built together. So they've been thanks to take care of this fair deal as really the and the control section here been able to we're understand where we made the choice. So no, there's one other little fact that we've got to take care of here. So what a packet. The top level here and you'll see have actually changed us a little bit of schefty dust registered donor or about here. And we've got an extra couple off que CSOs. There's a gate here and there's a little and here is just, ah, one bad memory. No, there's a reason for Putin and and that is that have people to look it. The car t o. Here with General with our Minister Cariou, we just get through of little one bad memory, and it would just feed by Ken to the Cartier and saw, and if it carry it just goes back to carry on. But there was a problem with us. And the problem is is that whenever we get through every single instruction, we're always going to be odd. One on to this, at this point here for the boss. So we had one on one in order to ensure that we point to the next instruction. But on that process of ardent one, or and in order to get to the next instruction Well, no, actually intellectually than this Carrion. We're only interested in the carrion whenever were performing and hear your function. So this is a possibility off having an extra one chemin in here, Jude ing this fetch cycle So unsteady Arden Wonder when we could potentially are too on. So that would give us on the era. So in order to prevent that from happening, we've got that slow on the G and she never in order for the county n here to go high a little ego high. Whenever we're performing an air, your instruction and all only go high. Our protector, our point and the point is going to be given by the sample here, which is at the stage five off the EOE your instruction. So really the state, same stage as this flag, say instruction, which we talked about just a manner I go. So whenever less goes high, it tells us that we're at the right point of the air, your instruction on at that point there. Then we can look at the county and and we could use the county, and but we wouldn't be. Otherwise, we wouldn't be interesting, the carrion and that Carrie and Mobile War. So it means that we don't have the potential adding an extra one on whatever we do the fetch cycle. So that's one problem, but we're running a second problem is real, and that's what that's little registers four. So let's go and talk about, I don't know so far did alot temporary memory location here just to save the value off the Qari never have done that because we want to make sure that we've got the correct cardi. And if we were to take a copy of the Qari at Stage four of the Year now we can get Stage four of the Alieu by connecting to this template, because that goes high at stage for So if we take a copy of that, then we know when we get to stage five off the air. Your instruction. We indeed have the rate card, the value available tours. Every time the have this thing, there's a potential for that county value to change. If it changed, then we will be feeding then the wrong county value. So this is really just died for a little taming issue. So that's the last of the jump instructions. There's only one more destruction to walk through, and it's gonna be an easy, short one, and we'll get to that in the next video. So thank you for listening and goodbye. 24. CLEAR FLAGS Instruction: so well done. If you go this far, this is a very last instruction. So let's good we'll see how it works. So are clear flags instruction. Just say it's all the flags to zero. So instructions given by 0110 and we don't care about in the last four bets. So this is a clear flag instruction. So rather than Gwen and building this open large ism precisely quit a simple function here . So let's just go ahead on Will have Are we looking at? Our address is done. We would have a nuclear flag instruction, which would be 0110 now begin to recede by Dick Order and it would choose the next Iron Gate. Don't, which would be the seventh. I'm get this point. Here we go. Hi. Whenever we go along to ST for on the stepper then this point Here we go. Hi. And what we would do then It's a bit connect that's on to the boss. Oh, so we have our value of 11 to the boss and maybe we go to the flags register and we would say it off like register. So how is that going to say every zero. Well, let's see on the next page. So originally the boss would be certainly always euros. And then whenever we set the boss, one at high would be get a value of one. So that's L U B and put with then go to the value one. So the l you will be in the art moot, so the output will be either one or obey 01 paid in whether there is a Carrie and or no sir , if there's eye candy and we have 10 and if there wasn't a county, and would you have 01? But crucially, here we won't have a cardio, and the answer is No. Zero and B will be larger than a year. So that means that there e equal and ill Arja will both be sent. Zero. It's a noble a condition, which what we want. We want all over their flags to be set zero, so nobody would know that all the fighters are saying is, you know, weaken Gwen and we can put the same value of the flag, register toe high, and that's going to resettle the flags to zero. So read over this and I suggest, baby, if you want to, you can open up a top level simulation, let alone and try this for yourself. But that's all that is for the clear flags instruction and as a very last instruction. So we're going to go ahead. No. And we're going to start putting the whole thing together and it one complete control section. So thank you for listening and goodbye. 25. ASSEMBLER: and this very We're going to bring all of our instructions together and build on a sampler and exhale. So let's start building our assembler. No, don't worry. If you're not sure on the same waters, you'll know by the end of this video. So we start off with art recap of all of our instructions. So we've seen. First of all, we had an ale, your instruction. So if the first that was high, then it's an ear. Your instruction. The next three bets tells it whether the instruction is an odd chef rate chef with no and or exclusive four or compere. So that's the record for each of those and the next two Bethea, tell us what register we're going to be using our 0123 and least last two bets here tell you what. Register from RB we're going to be using soon, really put the code for a big Kidreh as add are a comma RB so that compare a little assembly language code for one of these instructions. So what the assembler language could tells us is we want to add the co intense off the register are a to the contents of the Register R B and put the answer and to register RB. So this year's or assembly language. But what we have here up here on ones and zeroes as our machine court. So that's the ones and zeros that the CPU actually understands. So, for example, this our ad arty out be, would be given by our one 000 on every bit of a choice Ferrari in R B. So, for example, could be 00 for our zero. And it could be, um, 01 for our one. So we need to find a simple way of converting this assembly language and to the ones and zeroes off the machine court. And that's what our assemblers is going to do so before regarding that would just go ahead and will have a lick it some of the rest of her instructions. So the next instruction were like that was the store instruction. So the store instruction is given by 000 on the value for store between 10001 and then we again would have a choice off the registers we want to store to be the are H E on will be able to choose the four registers and in the Bay Bridge B. And I gave me Billy choose one of the four registers. So the assembly lines for this here would be brightness esty for store and everybody else are a coma. R b So, really, this is telling us. But we want to do is we can store the contents off the register. I'll be to a rahm application, which is given and register r E. So next silicate there would instruction. So the wood instructions given by 0000 for the Lord And then we've got choice here over our A and R R B. So the wood instruction on our assembler language Revilla retinas L d Ari Coma R b so LD for load well, this instruction desert woods The register given an R B with the contents from the Rahm address Government register R E were they looked at the data instruction and they did instructions given by 0010 We didn't care where these two bets are, and then the last two bets were rage be so we could choose either register are 012 or three , so enter assembler language. Just gonna be rightness data. I'll be korma and then they would be seatbelts. Really? What's not seen us? You want to loot the eight bets from the next rahm address and to register R B? Next we looked at the foster over jump instructions. So this is jump register, and that's governed by 0011 returned here with these two bets. Where and the last two bench chose the Reg Be? So are the same of the languages GMP are for jump register space R B So really all less is does is change the program execution so that it jumps to their dress. Govern in register R B. Our second jump instruction was jump address that's given by 0100 And these last four bets are Don't care. So this ably lying still as GMP space e d d r. So that's jump address. So it jumps to They're dressed govern and the next bait and graham the fatal jump instruction with the jumper F. So the code for a 0101 I wouldn't be I checked. The flagged boats governed by Qari is greater is equal and zero So this is going to be given by our assembler language, JMP for jump. And of course, we'll have one of thes four bets will be, say, an O b e D D r So what this does is it jumps to the address given and the next rahm publication. If the flags are set, the next instruction was the Clear Flags instruction. That's Kevin by 0110 and we don't care about these and that. Just say it's all the flags to zero and our assembler language for his C L F. A fatal instruction is the end instruction unless given by 11001111 and the same language for a as end. And it just tells us that we're at the end of the program. So we want to gather together all of our assembly, language and machine could and the one place and we can do that simply, and an Excel spreadsheet. So have an example here, and this is our entire assembly language Onda description over and words on an example and also the machine code here. So let's take, for example, that the fairly Force one So there are instruction where the orb court, which is the machine could for is given by 1000 And there's a space here for another four bets. Those other four backs are going to be the register and register. Be choice. So the description here is weaken at our A and R B. I put the answer and I'll be so the example for that There's going to be odd are a coma R b . So you can see here the first law here, of course. The one say hi. Remember when it was a one Say hi, It was gonna be an l Your instruction and these are all our a l your instructions here so pecker, another one exclusive or are a coma RB So it doesnt exclusive or with the contents of register our A and R B and puts the answer to our be the same thing goes for we have ah, Lord instruction. And again it's looking for another four bets with your store of data. Jump register with a jump instruction when we will get a jump f instructions, which are the phooey bets. I've got all 16 of those and we've got our clear flags. They're the born here, a car end instruction and and here we'll just put the values for the register. So register are zero is going to be 00 and then 011011 Now, these Ford here we're not using them are in the moment. So that via gives his all the information you want in order to start building a well assembler so we can see what we would want the same love to do if we had written a program and assembly language. So let's say the program the first lane was that was odd are zero R one. Then we would have to go and find out what the actual machine Cordes for the art. So we'd have to have some sort of a lick up to come along and say, Well, odd is 1000 and they would have to find out for R zero wise. So r zero will be to come down here and we would find our zero. And it may be 00 and everything to think that we're R B s so again returned to come along here and find out be which is with this case, would be there are one and that would be 01 So all we're really doing with us assembler as changing this assembly language and to the machine cord just by looking up in finding what the particular or cordes for it. So that's where we're winning would do and exhale Soul s have a look at our No. So if you go down to the resources section, you'll see that there's access to an Excel spreadsheet called assembler so you can get down and open up. No, if you want access to actually run the micro which have developed in it if you probably have to go on enable micro. So if you get too, you're fail on. You get the options. There's going to be trust center on trust in or say things and micro settings. You can turn enable all micro's. You can always tell me off whenever you're finished. Okay, so that will let you run. And in the Microsoft Britain and Z B A. Also, if you want access to the actual developer section and you can open up and get the safe to develop our top again, this is running and Microsoft Office 2000 and 10. So maybe different dependent War version of office Exhale you're using. If you want access to any of the V B A quid to what you've written, then you have to get access to the developer section. So if you're and I excel, 2010 u going to fail on options, customized ribbon and then if you check this box here, said Developer, I'll give you access to this developer tub so potentially would need to go in to look at it . But ah, it's handed. Take, have a look and see, and it's you're easily, easily enough to understand the court and change it to suit yourself if you want to develop with us the same love for low. So if you want to use this the same blood, but you're not particularly interested in what's happening Host walking in the background. But what we could do is we could height thes two columns that combs M and N. You would need, um, what we're going to do as we put our chord that we want to run that as our assembler language. Unless corms, B, C, D and e No, there's a radia, a program set in there, and we haven't gone over how to write a program and assembly, but we'll do that in the next video. But that's little program here adds two numbers together. So let's take one particular lane. So Lane number 11 it says are are one with our two and a physical intense. And to are to no what? We want to walk a with a machine. Cordes. We just click on the output toe Lord, you some and it gets through and I walk. So the machine called for us and asks is where we want to see if they fail. So actually creates a fail called my some and we can please and our directory OK, so I'm going to police this and this director, he and there's a suggestion of a passing pepper path. You want to the press? OK, so it saved that fail. Now you can see here is generated all the machine code that we need. But the actual fail that we're going to use is gonna have to be and Hexi decimal. So we've got conversion here to Hexi Decimal, So our actual faint or fail was just going to look like this. And now open a fail that we're going to use in order to load up or CPU chalets could have a quick look at this fail. So this is a fail that the assembler creates. And we've just got all of the hex cord and Elaine and we are gonna zeros to the very end. And you can see here that the CF as the end command and that's all just zeros. So we're going to be a loading this up and to the CPU. But of course, we don't know where we're gonna he loaded yet we're still got one more level to create in the CPU. But before we do that, we'll go ahead and we'll have a look and see how we can actually rate that scored and how this is able to add two numbers together. So let's look at this assembler about more detail. If we were to open up all the other the messing calling souping double clicking this double Say this W that will open up all the mess and columns. Let's take one as an example again will take us. Add r one r two So we want to try and find the machine called for our Don one out to know when every worker is going to be this value here, which is one C 00011 Seattle Now in order to what? What it does is it comes along to the Let's call them here and it leaks up the odd. So it looks up this art value and let's call them here. Okay, so it feigns the are. Then let's call them and then it returns the value 1001 So that's what is done near it. Sure turned out value one serious here one. So it just ah v look up. And if we go to the next one it's looking for, there are two are one so looks for our one and let's call him here. So it finds there are one down here and it returns 01 So I just over you look up again and it returns the value 01 and we do the same for there are two, but it isn't it. Let's call them feigns are, too, and then it returns 10 So that's has got there the court here and these three columns and never got to incarnated as joined them together. So we joined them together. These three columns and this is a machine court that were looking for and it does not for all the rest them. So it's quite a simple thing. Just using veal cups. No, there's another extra little section here and is that we do know here that we're gonna actually have some of the instructions are going out to base. So that's good about thereby. And there's going to be there are here in this case, 00 and not be 00 Israel on. We're gonna have the other bait here. Israel. So that so that the instructions over to base. So it means we're gonna have to have some way off taking the machine court and then also the database. Here sources go. Our machine could there I never have also go, are are and benefit. This is our destruction. And this is our the base. So we're gonna have to take vests. They're bite here and shover and just don't belong. And this one, the next calm down below next corner table was going out to take all of these ongoing discreet, these other values and below. Or case or that one there should actually going in art space there and that when there should get to the space down below. So I've just read our script in order to do that. So in order to see the script, what you could do is you can get to design board and you can click on the actual bottom, which is just a the right hand state here so you can click on the button and I'll just show you the scriptural off. Let not writing a little bit of E B a scrap so you can read throughout your sale, for if you want to actually step through it, you could come in on. You can press the book, and you can see here is our step into which is f it. So we can just simply click one f it and will run through. And there you see, it's clear Dole, where core intense and I'll just run through the court. So whenever you walk through, you can pass through and you'll see the actual machine called appearing so you can you can follow this actual script here and you can see appearing there, OK, And when I get started and actually just asks, you really want to see it too? So that's the path that we're going to see it too. So if you're interested in and doing that, you could not know Open. Have a look yourself. Okay, so if you go to run through this and you have a problem here, So I just press woke a are OK. And thus you see it's comes up with an error because it's looking for a fail. So if that happens, then you can nail again to the debug, but have always see the quarter. You just end it and you can start again. Okay. So you could just end that start liking and Toyota and the right address. Okay, now that's all that is for the assembly line. A sample or you can take this and have a little play with. There is no completely robust, but it does work and it does give us the values that we need And it makes a lot quicker, a lot generate the machine could So thank you for listening this video and the next video we'll go and we'll look it adding two numbers together Clear assembler language program. So thank you for listening. Goodbye 26. Assembly Language Program: so less strata Foster Sable language program for our CPU. I suggest that you actually sat down with the CPU and you can walk through late pond lane and you could see actually walking good luck. So let's look and see how we multiply five times five. So end binary. This is going to be governed by 101 So we could put that and register one. I've got 101 game a computer and register zero. So, in order to multiply these two together, what we could do is we can look at the re significant back here of R zero especially significant, but happens to be a one name. We know that all we do is multiply the one with all of us. So we're just left with us are one. So we could do is we could take the contents of our one and just read the end to another register. See, arm zero. So we could are too. So we could that are won without to So we just bad 000 It's euros with the top line here. I will get us following you here. Okay, So what we could do then? is we could chef this value are one to the left. So in effect, we shaft us to the list, were multiplying by two or we're going up by a significant. But so it's equivalent to shift in this year and by one factor and everything go through the same process again, we can check and see whether the value is a one. Efforts are one again. We just add the value on to the contents of register R two F zero. Then we don't add Anderson on. But all we do is we just chef again to the the left, onto the next significant back up. And we continue what Condoned out process until were completed. And we should get the final answer here, which in this case here, over the value 11001 They technical to explain what's boccie. We can what your way through it and may become more upon what's happening. So I said, I walk through the actual court. So here's the court here. The first line here loads the value five and register arms. You know, the second Lane Lords, the value of five and to register are one and the sudden lane here. Answer Value one enter register are three They were gonna get used register are free as a little counter because it's gonna get be walking through a work and a walk through eight times so and that originally, after the starts, awful a value one. And in the works its way up the significant bets until it gets to the very end And when it's in the very end, renewable from through the court eight times and then a jump off the loophole case. That's just for accounting purposes. No, begin here and we exclusive or are too, with our to so many exclusive or the two numbers off the saving a value of zero. So it's just a way off a nationalizing best register and saying that zero Well, then clear all the flags and then we go in. Elaine five. Another chef right is really start over lip. And it's just the start of our our code Proper code. Okay, so we go in here and we chef value on register are zero to the right, and then we jump off the carry and set so we can see here every go back to this lane here. We're gonna in here. I'm a chef in us, to the right show. The ascension is here, Reshef that to the right, that's value. One is going to drop. Oh, so that Carly is going to be set. So to convince yourself of right, Gwen, and have a look at the E l you and you'll see when you chef great value one. The Qari flight will be set. So be just that. That's the county flag as set. Then with the next lane says, jump, Carly. So I'll jump to this lane here in this lane here is 1 to 4. It's last Lane 13 jump to be careful. Here is our 13 hasn't Lane 13 year is actually memory allocation 13. So the member allocations that you're actually going to go too Well, remember here the day instruction continued, contain Djetou banks. Okay, so that's going to be a member. Allocation zero one, 23456789 10 11 12 15. So a jumps to the clear flying instruction and in the next lane is not the valuation for R one and R two. So you can see here that and this incidents here remote playing these two numbers together with Check that this is a one as a one and that kiss whenever you might play the one with all of us You just left with the value of our one. So you can take the values register are one and you can add it to the value of range. There are two so originally are too started off with all zeros with superyacht R one to r two You just get us number here, which is the number five. Okay, so we got Don't at this point here it clears the flags again eggs in and it chefs left the value of our one inputs and are one so that's taken last thing here and chef not left. So finish left your vessel number here left and effect You're multiplying by two. So it's equivalent to working through the chef left here Whatever you do, the normal multiplication. So schefty dust left What we can do the last thing to do? No, as we shift the value with our three to the left. So originally the value of our three is just a value of one and we shift it one to the left . So no, it goes to this point here. And then we got to go and check and see as to jump a T. Kearney has been said so after said tax have been all the way along. 2.8. Then the Qari would be set whenever we shafted left and we'd know be bitten into the program and everybody at the into the program. We were just going to the next ah lane here, which would be, ah, the the jump while everybody jumped. Carly, should we be jumping to the very end here and I would be the end of the program. But that's not the case here. We've really got to a value off the next, more significant back up. So in that case here, it's no county. It's no card. Every also, just go to this point here at this point says, Jump to that Blaine here. So this lane here is 1 to 4 starts. 4567 Social Inequality Lane seven, Shalane seven. Again, it's going to be zero 123456 and seven. So the seventh plane is a clear flag and then it starts over again. So this is the next part over our cycle here. So it takes the register, are zero, and again it shifts it to the right. So we have a liquor at zero Here are zero. This time is gonna have the value zero at that point. So when I get Schefty to write as Ghani chef, toe a zero So if we get down here again and that Schefty does and it shifted, as you know, we know the card is not going to be saying no whenever, Chef, so that zero. So it's jumper for car without rain, so it doesn't cut. So what happens is it was on the next plane and actually jumps no, to this point here to this point, here is gonna be 1248 Hell, they saw this point here has actually just one beyond the arch construction because we don't need to add anything on here because it's just a value of zero. Also has just can't just jumps to this lane here, and it clears the flag and then again, it chefs the value on register are one to the left, so it shifts this year again to the left So, chef, until after again. It's like multiplying by two as equivalent to moving a long year, and are more significant bets. Whatever you do, the normal multiplication. So we get to that point, dear, on Riyadh on 11 to register after three again put around the one on today, just our three or no one at this point here. Okay, so we're shifting away after that last point here. We're still not finished yet. We're not funny. Show it jumps back again to the clear flight instruction. Anything that continues again with the shift rate for r zero, they were worked for three our way through this and tell eventual are three gets to the more significant, but here and when it drops off via there's like rt here and it sees jumped Carly to the end and it gets to the end of the program. So But of them only thought about Dole listening to that the best way to do it as for you to work through it yourself. And if you say up the register CBC register are zero R one R two and R three people and the national values and then you work through the values on the register as you walk through each off the cycles here care each of the lips, and you see their age does changing. And eventually you'll see the fei. No answer will be registered out, too. Which will be? That's 11001 which is five times five, which is 25. Oh, sure. End. Finally, we can see here that the actual cord for the program is written down here. Okay, So that this is a machine court and you could see them own instructions. There's going to be 23 instructions, so it's 22 plus zero as 23 instructions. So there's 23 um, one day 23 bass and this program, and this is on the right hand side. This is actually run and hex. Okay, so this is the heck scored that we go and we'll load and to the CPI year. So thank you for lesson to this. I'll get you in the next video. Goodbye. 27. Assembly Language Debugger: so you may have gathered from the previous video that can be difficult to re assembly language code special. We haven't done it before. They really need something to helpers. And that's what we got in this video of created on a saber language debunker of retina and exhale visual basic for applications that vb Oh, sure, you how to use this deep ocher and end the border section. I'll actually go over all of the cord so you can see how the court works. I haven't gone over records a year unless video, because it took me about a week to write the court and probably take a couple of videos to go over the full court. But at least you've got something here that you can use that will help you rate your assembler language programs. So good luck. If you go into the resources section, you'll see there's a fail called assembly language debunker so you can go and open that up . Now, when you open up, you have this page here. There's two tarps that the Born one called Deep are gonna walk one called sample program. So if you click on the sample programs, one you see that I've got to hear certain at the moment once called to Fibonacci, and it works at this fever. Nash's series and the other one is multiply, which is the Multiply two numbers together. So we've seen this multiply one previously. So what we can do is we can corpora control. See, We'll put up the debunker and we can please. And here So control V. So that's in Colmes, B, C, D and E. Now, if we click on our SAMBAL, it will create the Assembly language code for it. And then whenever we collect d book at work through each rule and eventually and you get all of the values here that we're interested, then So, for example, we're gonna have the actual step that it's on. So the actual co ordinate Shonan, then socks in address register instruction register. The registers are 0123 The cardio, the equally and B equals B in this adds to This is the flags here on the registers, and we've also got the memory locations here. So let's go ahead and we'll just press the book and we'll see this running. So you see here the start to walk through each and every line individually, and you can see all of the registers changing and all of the flags changing, and you can see it jumping Israel when it gets to the jump. Carney and you can see how the program actually floors so offset less so so it's running slowly in the moment so you can see it. But if you just place escape, then it will run through a bit quicker. And obviously, because I'm recording this my seat, my year computers running a little bit slower so as it finished here. And you can see that the answers and the register out, too, which is multiplying two numbers together, which is five times five, which is 25. So, no, the whole point about this is that what you could do is you can build up a program slowly. So, for example, you could do just one line at a time. So you press assemble and debug, and it will do just not one particular courts and escort year. It's adding the value five and to register given by R P, which is R zero. So it puts five, and the register here and you can continually our top and our Delange to this until you can . You get the entire court bell up and it just gives us you're away off designing your court one little step at a time. So no whenever you finished your cord. So let's say, for example, I actually worked in a court called the Fibonacci Series services that year. So I can control, see, and I can pace to end here. And if I was to a se bullet and then place the debug, you'll see it running through the debunker on place escape. And I will run through a little bit quicker and actually generates the Fibonacci CNBC, and you can see the numbers generated. That's a 35 eat. They're 10 21 therefore, and go all the way up and told it gets to a number is just less than 255 Sophie Press. Ah, well, that's it. Finished? No. So the final number was 233 So know we could take this court year. And if we want to run it owner CPU, we can click on our export, and then we can put our sale Neiman, So let me go ahead and I'll do that. Just know thirsty Bogle is no are finished article at the moment and I will be working order and will be operating it. But you can use it in order to build assembler language programs. If you want to have a look at it, you can go into the developer section and you can click on the view cord and you have access to all the court area. No, as I said, it's no at the moment completely finished and the court can do be done. Acadia alot of optimization on the court The f you know some Vehbi, eh? Then you could also always get another little look at that and see exactly how the court was put together. Benefit What this does is more those the CPI year and at mortals it well enough such that whenever you rate out the could and the the broker, we can see that an export automobile toe lord end to the CPU, and it should run exactly the same in a CPU as it does in this debunker. No efforts to walk through and describe all of the court. Every probably cover four or five videos so I'm not going to do that here. But what I will do, as in the bonus section, are covered in detail. So that means point. But that's video here is that you have access to to that you can use that will help you to rate assembly language programs and also and the bonus section are then some extra examples . So, for example, I have the Fibonacci series done. I lost a lick it doing the highest common factor, which is one of the problems that we had looked at earlier on in the course. That's all there is for this video. I suggest that if you want to get some practice rating assembly line, which for or CPU, you could open up the debunker and you could walk through the example half there on the Fever National Series. If you don't know whether, as you can, always going to go and have a look, you could walk through that and you could see exactly how that cord works, and it's just are simple. I'll go them and I'll get you used to use 90 bargor. Also, try and work out a few examples of yourself for yourself, for example, the eyes common factor is a good one to try. So thank you for listening. I'll get you in the next video. Goodbye. 28. CPU: joystick, all of the blocks of design so far and we'll put it together and we create our CPU. So know that we've built up all individual parts for the control section. We've got to bring them all together and to one single block. So if you go to the resources section, you'll see a fatal fail called control section faint. Also, you can go and open that up. No, remember this Fail only pretends to us. Fadil has only been created so that you can see what the fatal control section looks like. So I wouldn't go using this fail any really Elks throat courses. Really Just for less video. So if you come down to the balm, you see control section faint. Actually, double click on that. And this is the fatal control section. So let me three men so we can have a better look at her. So this is the fate of control section here, And you could see here is that it should look several of to what we've done before. And you could see all individual parts. We've got the instruction registered came in at the bottom. We'll get there or cords for the oil you. This is a comparator section. We have the flags. Here is well for the flight that's been set that we have a registered in the register be we have all over enables condone the left hand side and all of the set skin Along the right hand side, we have our three by a recorder on the output from the dick order going to arm gates and each of these will be a definite instruction. And you see in the he's all around gates here, which pervade the connections up to the staple here. And also although put So I think that always sit with all these extra or gates and here Israel because we need thes because each of thes enables and they say it's they're going to be used multiple times for each different construction. So we need to put all of the instructions and effect and to an or gate and then pass them on. So this isn't going to be a fatal version off the control section. We're going to have the ad, some small sections and here and there in order to get the full CPU working. So let's go ahead for over the rest of us video. And we'll start our dinner sections together on all over the extra parts. We're gonna have to er than to get the whole CPO up and running so you can go ahead and cause the control section fail and you'll see And the resources section there's another failed called CPU underscore design. So this is our phenyl cp your design on. I'm going to go ahead and the main section here, and I'm going to build up the CPI year No one sits belt or stop, and we can have a wee look and I'll talk over the block so you can see what the blocks are . And you can go ahead if you want, and you can build it yourself. Okay, so just give me a minute to build us. - Yeah , so that says phenyl Abella per CPU, you've got the bossed around the outside. We gotta registers of Goa. Rahm, God heal you. We've got our instruction address register, instruction register cumulate, the boss, the temp, the clock, the flags in the control section. So we've got everything bell up here and we're going through the design off every single part off the CPU over the previous videos. If you want access to this fail, you get to your CPU design. And if you come down to the bomb, was one year called CP Year. Underscore Talk, underscore tape and lets go this temporary designed. Of course, that's just finished design. We're gonna have to add extra sections and in order to Would detained to the Rahm. But at least it's here, and you can have a look it up on a play with a F Ew Lake. There's only one problem with the CPU and as we don't have any method off looting and a program to so we could steak and individual zeros and ones and two the memory allocations and say Haram. But that's very inefficient, and it would probably we would make errors in doing that. So we want to have some method off one rating a program, two loading the program and and three running the program and seeing that it runs properly so we gotta cover those on the next videos. But at least we've got this bell up. I'm of Gore Cp your belt here and we can see exactly what it looks like and it's quite enough D piece of equipment. Thank you for listening. I'll get you in the next video. Goodbye 29. Reset the CPU: In order to get a CPU working properly, we're going to have the ardent a few extra sections. So if you get to the resources section, you can open up the Fail called CPU Underscore design Come all the way down to the bomb to CPU underscore top underscore temp. So this is the one we just built up, um, on the previous video. So it's not just a little bit now, the first thing to note here is that before we start any simulations want to make sure that all of the registers and all of the memory locations are all set to zero. So we want everything and the CPU say zero. So we're seeing previously that we could do this and the Ram section by Putin in a reset pen. And we've seen the every single bait and here had a little reset. No, I think we give the zoom and here So we went to each of these at each of these hard, a little reset pent up to and through the or get So we have a method of recent the rahm, but we want to be able to reset all of these rages. Does the destruction reddest on address, register, accumulate everything. It's got to say it, but we want to be able to reset it. No, In order to do that, what we could do is we can make sure that they're all the Reese. All the sets go high and say, Does control section So I've got a set pen he a reset plan here at the control section? No, If I zoom in to the control section of actually outdated, that's already with the secretary we need in order to be set, so would you, Suman And we can talk her way through it. Super of donors off added, Unless we say born here. And you can see in these all these extra or case so the reset pen comes down and get sent to the all the same pen Zia violence or gay and, of course, the other. And put heads on to his hope of the arm gets OK so that our lows is to over raid everything that happens to all of the sets and this control sections of another. I put, like, reset high it just times all of the sets high, so let's go back to the top level. So in order to get us walking the reset working, what we can do is we can stick up in so less is an input pen. Now it's facing north. You can connect on there and we can call it reset. American, get tunnel, and we can connect a tunnel on. And again, we can call that tunnel reset, and then we can take a corporate the tunnel. I know we can connect that top corporate the tunnel on a reset pen here in a Haram. So if you just set against the point there is actually setting you could put widely that if you wanted to. Okay, so that's no connected up. So the idea here is identified over less. Reset goes high. We should have ah zero coming out. And as you recommend to every single point and the and the chip and the CPU. But how do you mean or were actually going to get a zero? How do we know the first value corroding the boss is gonna be a zero? Well, we'll set up like that because after you got to Gwen too, every single connection to the boss. So all that OPM puts and all of and the registers and also and the memory address register and the years So every connection onto that boss. If you go into the actual pens and have a little look, you'll see every single pen. If I collect one, it is caught. Behavior pill down. So one assumes is the bus. If the bus doesn't know what the national values going to be? If all these connections on it, the boss are saying pull down, then it ensures that the initial value is going to be a zero. So all the really needs No. Then as one point, are one out to here or input to be connected to the boss. Now, what we can do here is we can noble it for the moment. We can just delete this one off, and we can just take a one and here for the moment. So we need one enable to go high. No, I won't enable will go high whenever we go through and build entire soccer up and go through the simulations. But the short here, we just need to connect one of these high. Okay, so we connect that high, dear. Okay, Now, whenever I go through the simulation for less it on simulation, whenever I can post us visa, you see instantly all of the states of all gone high. Okay, every single say it's going high, and there's no one being zero being placed on to the boss. No, it doesn't matter where the zero comes from. As long as we ensure the every single connection on to this boss as set at pill down, then Nasha initiation that can initialization it can all ever be a zero. So that's how we reset the entire CP year. So no been or how we're going to reset the CPU and the next video We'll go and we'll look it. How we're going to Lord A program and to the CPU. So that's all for this video. Thanks for listening and goodbye. 30. Load the CPU: so there's still a few other things behalf they are to the CPU in order to get it to function properly. So we're going to look in this video at the hotel, toward the CPU with a program and also how to see how the program finishes. So let's get to so let's look known, we'll see how we're able to ward a program and to the CPU. So if you go to the resources section on your pinup CPU, underscore design and then come down to CP Year, she's there. Double click or not. Oh, so many here to make it about bigger. Okay, the first thing we want to know here is that we want to be able to access to the Rahm because we want to be able to load up our program and to the rahm. So what we have to do is we have to break the input to the room so that then put can come from two different places. So one then compute can come from the boss, which is it's normal operation. And secondly, the input can come from some other point called Rahman. Put. This is just a pence's and and put pence is going to get this information from some other part off the circuit. No, but we want to be able to do as make the choice between these two. No, we can make the choice between them using our multiplex So the multiplex are available and the section on the plex or so he can have a look. And you see the available there. Now we could build up less multiplex, so use nine gates. It's quite a simple thing, but for less or purposes here, we're just gonna Paco and issues there or the one that's available. So what we went to people to do as whenever this controlling here goes high, is going to choose the Rahman put on whatever it goes, law, Then push. Just going to come from the boss. So when we went to Lord Information into the rum, we want less and put to go high. So what we'll do is we'll call that point a would point, so of created a tunnel here is just called would, and the actual and put pen is certain up here. So that's them. Put pen for the Lord, So whatever we want to load information. And that pen, dear. Of course. High. And what? That will get that information from somewhere else. OK, soup, which we're going to just in a minute. So we'll go. Our Lord Pine, Cameron and the Lords get into the control section. We've got a little tunnel here. The tunnel here connects so into that tunnel point here unless the lotus to choose where the end comes from. One other thing to note here is that the Lord also goes into the control section because whenever we're unless process of loading the information and to the rahm we don't want the control section to be doing anything. An effect. We went to overrate the control section and just stop it in its tracks. So they stroll pen in the control section will see how we do that. So you can see here that we've court Les Lord pen. That's the pain came in on for the Lord is going to a north G. And it's also, you know, off broken Nesler or point here. At that point, he has been broken because this year is the very first thing the the control section does it going to the boss now we don't want it doing anything. We don't want it. Put in a one on to the boss. So what we can do is we can put a little line, the end there, and we can put the connection in the Lord. So whenever the Lord is law, this point is high, and the CPU is just walking through and the control sections working through in its normal operation. But whenever the Lord goes high, then this point here goes law. And when this goes law, that means that this paper here doesn't go high, so it doesn't pass one on the bus. So in effect, the normal operation has been stopped. But we don't just want to stop it. Beer. We want to make sure that not the kind of doesn't cone along either. So what we can do is we can put a non gay and here for the clock and put to the stepper. So whenever there Lord is law, that point is high. So it means that the clock would just passed through his normal. That's normal operation. But whenever the Lord was high that point there goes law. So it means that the clock will not pass through and to the stepper. So it just prevents the normal operation off that stepper. It stops the control section completely. Now there's one other thing that we need to do and you see here of Katie Desk Little, um, point called Lord. So that's a little tunnel. And of course, our corporate over down here. Israel, because a little bit would deceive the control unit to stop. The Stella couple are little functions we actually wanna perform. So one of them, as we want to be able to say, the rahm. So in order to load information and around, we have to make sure we can make the rahm say go high on the same thing with the memory address register were stolen. If you want to load than any information and to Rahm, we have to have access to the memory address. Register sets off, idea an extra little or get here and you got the memory address register pen here, Kevin on to the control section. So that's really at this faras they extra circuitry we need in order to would. So let's go back to the top level. So let's go ahead with a little simulation here, and we'll show the couple extra parts minute er to get this thing done. So if we I want to see Emily first of all, we gotta re say everything. So if I pressed the reset So because high and n equals law so you can see everything is set to zero and the chip is the CPU is ready for us to start receiving data. So no, we want to Lord data. And first of all, we know that the Lord Lane has to go high. So that's an end put pen. And again it was going to get it from a top level, which we'll see in a little while. So that goes high. You can see we could drop into there control section. And when it's high, that means that this point here as law. So it means that we will not count along the stepper. That is the steppers completely stopped. So we head bike up to the top here. No, whatever. The Lord is going high. It means that it's selecting this Rahman put again us and input from a top level which will see just in a minute now, one other thing we have to know here is that in order to redone, we're going to have to say the memory address register. So we're going to set name, address, register high. So that's it. The clicking on that last, that email mailing address region of say hi via the control section, because we have to be able to read then this information and to each and every individual basis. So that means that all of these 256 Bates are, in effect, open and ready to receive information. But of course, we want to be able to just choose one at a time. So an order teachers one at a time. We have to be able to count this information. And to this rahm no recode to end using this little cone up. So let's have a look. It That's Kate. Are you can see here that what's gonna happen again there the cone on a second. But what happens is the coat our coats up to 256 and you can see the co owner is connected to the boss is connected to the boss. Fire this buffer, of course. Really want account up to come in and start counting and get access to the boss whenever one lord in information. And so that would line here as connected on here. So that says, whenever the Lord was high, which, as is the woman, as passes the information from this co owner onto the boss, which basically just coach to 256 and it just based it on a 56 values on the bus s. Aw, if we look at the input from that, will then put it's actually coming from this clock here or care clock ale. So if you head up here, you can see here that the clue Kale as just this clock here. So this is the clock this running 1/2 very off the master clock, which is here. Okay, so we've got access this court when put the core can. So whenever the cork is high, this and the Lord is high. It starts clock in this var clock through, and it starts coating through 2 to 5 sex or if we just quickly drop into the counter. So this is a counter here, and I can't have fused what's available within Lord use. Um, and this is called a D tape flip flop. So that's D tape flip flop. We set the control lane high and we take the output is the co owner and there's an auto one . And here, that's the car E. But they sit like Carly one. Okay, so that's just a little coat now that we're going to use. So let's watch this. Counting through this is the mean clock Women in here and you could see this clock here life it as half three of the main cloak. So is this counts up. You see, that's one to 34 and it just counts up all the way to 25 sex or an effect. It just makes the address here and a member address register cone up from the 1225 sex And each time it counts. It's good to pokes in this rum and put bait. So this comes from the top level, which is one level above this, which will see in a minute and this I cannot hear the top label current Senate. This seemly is this co owner here. So in if it whenever less changes to our particular bait. Then this changes to the next bait here as well. And it chooses each individual bait within the ram and it Woods and the and put here and Teach and H and every day. So that's how we load. Then there, 256 Bates from our program. So there's one other thing. We want to look it here, and this is the idea off the end. So what donors have I d? Then a little section, which tells us whenever the program has ended on at the top level. Tom, a little weight on it, says This is a program completely source. Have a look and see how it does thus. So, first of all, that's just a note put pen called end. So if we commend to the control section and you can see here that that's actually an end, you hear an endo who is going into this e n pu and get so that's the open e N e n Peron. Get know the N puts here. Well, what? That was our phoned. A spear instruction that wasn't getting used. So that's P instruction is going to be one one 001111 So you can see here that whenever the proof of the control section receives this particular instruction, then we're going to get a high output here, which is our end. So what I do is whenever our write a program, I'll make sure the fairy washed wine off the program could as this lane here, which is going to be the end over program. So head back, open to the talk level and you can see that there's actually one other place where we use this end. So you can see here, have got the end there. And I've got a little tunnel there for the end. So that low and also appears up here, the less is a mean clock and put. And what what did there is. I don't want to continue working. Gets were rowing the boat. That's control section. Whatever of the actual program Executions finished. So I want to do is just to stop the clock. So stop the court here, Chrisman, over the end goes high. Then this point here goes law on From that point that goes law. Best clock will not pokes through here, So that means that the clock will be stopped. So that means that we had the end of the program and the clock stops. So that's the clock. Actually, at this level stops. But at the top level, the master clock here we're still just take away. Chavez has covered all the extras that we've I did then to the CPU in order to get it function and properly. One other little thing to know is that off taking a copy off The values are held in these registers and this is the here, and we'll particular these to the talk level along with the values on the bus on several other values that we may faint intonation, for example, that accumulator instruction address register on instruction register. But we'll see that on the next video. That's enough for this video. Thank you for listening and goodbye. 31. Top Level Simulation: So what finally reached the point where we could run a program on our CPU? So let's go do it. No. So finally were able to load up a program and to our CPU. So that's cool, and we'll see how this works. If you go down to the resources section, you can open up a fail called CPU underscored design. And then if you come down to CPU and you'll see the CPI year, that will spin the previous videos, designing no mention before that we want to be able to load data, and from this and put here and to the Rahm. So this is a man put pen, and the information has to come from somewhere. So it's going to come from the one hierarchy above this. So there's one other level above this, which is the absolute top level over CPU, the one that will actually be walking from so also be a wood pen and also memory address register plan on. But could you take lots of information is where we're going to take the value of all of the registers and all the value of the instruction address register, and the instruction register knocks the accumulator and also the values on the boss. And as a few other things, we're going to take care. Israel. So I've created an instance for that CP year. So if you go to the CPU on a follow panel so you can see here. So if you go to the c P year on, if you right click on the CPI year right click on the Sea Pier. Edits aka Peons. How do you see that? That there as the top level or CPU? And it's call of the outputs here and all of their armpits. Israel. So we'll go ahead and we'll open up the absolute top level. And I promise you there's no other levels above this. So if you condone away, don't to see p underscore test and this is the top level over CPU. So let's have a look and see. But with God, that's talk level, but we got the CPI year. So you see, in the instance of the CPU just a second ago, they'd rather have wires running all over the top level are connected a tunnel to each of the inputs of That's an input pending odious yet green circle So that's an input pen there . And this tunnel here as this and put pen. So for example, I know he of the boss open. This is just the value that's on the boss within the CPU. And we can see here that's connected to this point up here, which is our boss and have opened up the eight bets. A real bill, the best, and we put them in these these things here are hicks digital displays. So what they do is that's when he takes the 1st 4 bets and it gives us the hex number for those four binary bets on this one Here takes the next four baby backs and Gafsa the hex number. So we're able to produce a hex number for the too hot the eat bets here. Okay, So what we do is we tico the registers that were interested, and so we're interested in the boss, but getting tasty. Also in the value in the accumulator instruction address, register, instruction register and the four registers are zero R one R two and r three. So it means we're able to watch these coat and changes. We work our way through the program now. We also mentioned that we want to be able to lord the program into the CPU. So we're going to load the program and hear from this thing here. Have called us external Rahm. Know what this thing is? This will be click on it. It's on a rahm will kiss about Rahm is actually available tours and the memory section here . So rather than build up a whole new rahm, I could just use the one that's actually available. So that's the rahm here. So that's this one here. So this rum woods up with the hex numbers. Okay, so those two bestir not equivalent to on eat but binary number. So maybe we can load the program directly and to this. So whenever the Lord goes high were able to start loading this information and you can see it's sitting there just waiting for the first value to get ready then but in order to load and we have the wood and via a clock and this are counter. So this again is that a lot will count on its It seems the co owner with CNN say the CPU. So if we zoom into that again this is Our current are here for you. Click on that as I counter and you again. You get available here on the left hand side. And it just can't stop from 0 to 255 populate. 12256 No, The output from this rahm here is going to be a program. So, programmers, coming out of here honest, coming in here. And if you get down to the next level down, you be able to see that it's actually coming in to this point here. So this is a program getting county done to the rahm. So ahead, bike, up to the top level. No, there's not a couple of thanks you have to talk about. Well, first of all, we've got the control for the whole of the CPU. So if I was to turn Les Lord off to the moment and just reset everything, tell us everything reset. There's no values in any of these, Okay? If he's dropped down in the CPU, everything would be read because it doesn't know what's happening. Okay, So the very first thing we want to be able to do as we want to make sure that we can load the data into the CP Year. So the first thing we want to do as good a state one which is Lord. So we click on that. This is those in state one and then after be pressed the Lord, we want to reset everything. So we want to make sure everything was goes to zero. Impressed that he said, You see these old go to zero. Now, if you want to again to the CPU Israel, you could have a lick and Sade the ram block and you'll see that these values here, these have all gone to zero as well. We can then go to stage three, which is to sitting in a pennant race register high. They were ready to load the program into this external rahm. So an order till the wood that you right click edit co intense. And you got this little box appearing and you can go with you look and you can open up. So, Chris, open now you could open up the sale. I called my son so that the fair we generated whenever we that the assembler generated for a So this is going to be multiplying two numbers together. So if we open that up, you can see here that is lordy than the hex values for the program. And he's here fan she's off with and command, which is always a CF. So licenses, as in a possession, ready to start loading the data on to the CPU. So in order to start that we could get to simulate and we can actually change the frequency of simulation so we could make it run really slowly so you can see every individual change within the CPI year. Or you could just run it really quickly in order to get the values. Lordy Denso. Let's just run it at 4.1 Kelly Hess. So you click on Samueli taking table and you see it start to load up there program from US external rum and to the CPU, and that's OK all the way up to FF. So prism and to the CPI year, you see the boss changing the errors on the values can up to 55 on. You can actually look in to the Ram sales Israel. So we head into the rahm. You can see here that all the vertical Wayne's accountant and all the horizontal lines are gone and Israel would not. The ram and you could see the Ram being loaded here with the program or case of those are the values killing me to the Ram. So head by cop, too. It's told level, and that's OK up to FF. Now it's running eventually here. Just know because my laptop on record, unless is doing it, which lose my laptop don't. Plus, I've got 12 year old laptop, which just doesn't run very fast. So that's what possibly on, ah, lot faster on your machine. So okay, up to FF that answer is loaded all the data. So what you could do is you go Samueli and you can collect tech and evil and that Tom's the simulation off. So that size no lordy, then all of the data and to the CPU hidden is rahm and that's all that they are going into the drum for the program. Okay, So head back up to the top level. It's an overrated to run the actual program. The very first thing we have to do is ensure that this clock here is in the rate possession . So we need this and 01 and zero. So I took these little clock while yours from the CPU up to the top level so we could physically see what was happening. So this has to be and a possession 010 because we're running through a four faced clock. So it takes four pulses of this clock and order to go through one set, enable, say posts. And we need to make sure you watch Tom. And that's correct. Possession. If we do it start last possession simulation would work. It's a big record in that possession. There we can Tom, the name, address, register off. We can turn this Lord off. So what moment? Our possession to run the simulation. So waking up to simulate check enable. And I also start to run through the simulation and he see here that's put five and the register are zero for five in the register are one they were going to multiply the value off these two registers together and on the register are to the final solution. The value will be one main, so I still don't know what really can say that as this was running away. So you can see here all the values running through as we run through the court. And if you come down into the control section, you can see the control section running away here. Oh my be Zuman so we can see it. So if you see coating away here, no wisely cone a lot quicker A. Slows up whenever line moving about and between simulations here and between pierogies. A plus off gas look, computer here probably run a lot faster than your computer. Also, I'm recording. That's which tends to run a loft, tickle off my CPU time so we head up to the total have, like in So you could see this running and you can see No, it's actually come up with a correct answer, which is 19 So we multiply five with five, which gives a value of 25 which is another dust rage that here but 25 hex is one main. So that is, in fact, the correct answer. No, it's going to continue running along here because it's going to be multiplying together. All the higher significant bets. No, the higher, significant but it's actually in this case are all 06 just multiplying those zeros together , but we'll just leave it to run through the fuel cycle. Now you could drop down and again, have a look and you can see we drop into the the L You You can see everything posting, aware and again. If you want to get through this yourself, you could run a lot slower on fight if you wanted to. You could run it and it's an individual clock pulses just by clicking on the clock posies here so you can see here it's actually finished. I've been always finished because the end has gone red. Plus, I've stopped all of their registers at that point as well, so we could get to the simulate wreaking go tech enables that stuns oclock off announces run through our first full program on the CPU. Multiply five with five I'm of Gone Answer. 25. So there's one other thing. I like the idea, and it's about the smooth running off large Isam. So if enough for what? I open up my program, it first. So I click on Open and I click on the design that I'm working on. It's a CPU underscored design. No it doesn't always open up and the correct conduction. So, for example, far to head down here on a go to CP. Then whenever I go to the sameness, I could go into wood and that compression reset and you'll notice you of that. This one hasn't resale. Now I can clean oppression reset on a just simply won't reset. No, this is not to do with the design here. It's really about Lord, you Sam saw. I could potentially open up. Lord, you some. I could close us down again and open up and everything will be perfect. What I could cause it don't open up and maybe one other one. There's no working properly, so it's really jury the fight. I think that we're running largely, some to its very limits. So if you get that conditional cutting, the quickest way to sort it is just looking feel. They register, so it's register are one. So hey, don't done faint register our one and you can see the two crosses there tells us that there's just no for Britain properly, so I would click on it, delete the instance, and if inches corporate a sentence over control, C Control V and play sword. No, whenever I come up to the top level on a place reset again. So our simulation border pleasure you say you can see it's research and evidence. E Okay, No, the seam occurs. Don't and the rahm section saw. Sometimes you'll find that the ram section No all off the base. We'll say it properly. So when I come down here if you had the law, what you have to do is you have to check everyone used to see where there's a little cross on them, that there's a little close on them. It means that just hasn't reset properly. So there's what, for instance, there's one. There's no happens known again with an ord one or two. So that's one there. So again, you tough to delete and Korpi, that's so another one and it's please, no, whatever. You do that and get back up to top level and you can actually say that will be a okay to go because you can see this. Maybe there's another one there. Now you only to do that's that once. So whenever you open up, you can get through and just check these ones just to see whether any of them are corrupted . So that's all I can really don't want. I can really Years is just that corruption, because there's nothing logically wrong with it. The the design I can should be able again and reset it just simply won't reset it. So if you come up end again off to the top level, they go in the simulation on your press reset, then all of the ways will no be back in the correct possession and the will be set in its heroes. And there won't be any issues with, um, so they said, whenever you start open first, it just seems that large Isam doesn't always start up and the proper possession. And there's annoyed one of two elements that just are setting in some kinda Reese condition Ondas Very random so I could open up again to fight, and another wrenching so over and they're heavily would be okay, so just something to take off. That's all the rest for the top level video and the bonus section. We're going to go over another simulation and we're gonna go over Ah, much neater way off loading this information into the Ram because I think the information loading that I do here s a little bit clunky. So there's a bit of the other way that are phoned to do that. So thank you for listening to this video. I'll get you on their next video. Goodbye. 32. Goodbye: well done if you managed to get to the end of the course and build your CPU and get it working. No, this is by no means the end of the CPI year. As a work in progress, you could update yourself. So, for example, you could updated and change the instruction set. You could die then. Definite dressing wards. You can add an interrupts or again towards Isam, and they've got various different components there. So, for example, you could create a screen and a keyboard, So it's lots of things you could do with that CPU. Also note that I will be periodically updating the bonus section with extra videos. So keep an eye in the so thank you for taking the course. I hope you enjoyed the hope. It was a value to you. I don't see you on my next course. Goodbye. 33. Bonus New Design: This is the first of our bonus videos. I'm good to be making some updates to the CPU. You can also walk through some updates yourself, and you could use these videos. Are I gade as to how you can change the CPI or to make it a little bit better? Because it's not finished article. We can continue improve in order. So I said, Well, let me see what I've done in this video. So the loading off the CPU was always about clunky and not very elegant. So off simplified that little. But so if you were to open up the design, which is in a resources section called CPU underscored day Zane underscore borders. And if you got to get in there and three, set the simulation, so you'll notice here that that's just one single. Will you say it. But you just actually said, and that's it. Ready to go, Then you can right click, edit, core intense, and then you can open up the core intense from your fail. So that's a lordly done. I know. Pointed do is just press the run so tech enable, and we don't need to worry about the clock of the possession of the court and all tech and combed through to the value of their faith. So I'll get you back in a second whether it's finished. So let's actually loaded up and instantly just jumps on and stops walking through the simulation. So this put five and it put five. And so that's that you will. Camo is 19 in a few seconds, so you can see that's it. Finished the week again and we can stop the tech. So that's it. Completely finished? No. So let's get down into the CPU of a quick talk through and see the changes are made in order to me make this work. So really changes are within the control section. So what I've done in the control section has introduced a new instruction. The instruction is going to be zero or zeros. Oh, this instruction, it wasn't getting used. And we know that whenever we initialized the CPU, there's a zero and the first bay off the ram, so we can use that in order to initiate the Lord. So FB 00 that have taken from here to. So they're all Commander zero digging through a non gate and indicate throughout north Gate . So where next instruction can consent is euros. We got one here, the Lord and less controls the floor Information wrote about our control unit. So we've got their split here with the and gate that stops the stepper from actually accountant. And this will be depended on that value for the Lord suffers always zeros. We got high Kevin over here, but that's not there. All the things I have to take care of. We have to look at the fact that, well, the one that stood out for 256 clock pulses because we're going to get rolled up to 56 base . So we have to have this value to five sex coming from the counter as well, by can hear. And get through the arm, get and you see here the place where had the main address register? I can be packed up from this point ale one. Okay. And also the point. Don't here for the Ramsey. Perfect up from point. A real one. So we don't need to bother doing these. These are taken care of automatically. No, it's not necessarily the best way of doing it. the smarter ways of doing it, but we could set down on at some point the future. I walk through some other examples. So, for example, I could have the output here heading up, and I can control thes sets and enables direct with from there, so put via the salmon gets on the other options there. So a good thing to do is realize you could take this design and you can mess about yourself and you could take your own, make your own instructions up and redesigned less and odd sections on for your own instruction. So lost stuff that you could do in this. But I think that this certainly makes the CPU runabout easier. And it's a lot. You're always prone to make mistakes whenever you're going and sit in the CPU up from the beginning. So that's all the rest of us. If I deal, thanks for listening. I'll get you in the next board this video Goodbye 34. 16 BIT CPU: what? See how we could extend the CPU from an eight back to a 16? But if you get to the resources section, you see there's a fail called CPU. Underscore. Designers got a bonus underscore 16 Bet so you can open up on your head. Don't to see if your test and double click now, but what I've done is I've extended the eBay CPU that we've just designed to 16 boats. So if no God are 16 but boss running around a Sade, all the registers no are 16 bets. So you see there's No. 16 but registers here. And if we hear that, you'll see that whenever we get to the air, you all the functions within the EOE you have there, you got 16 bets. So if I was to hear them to the control section, No, I've left the control section as it was previously, but there is a sim deafness knows that the we know have 16 bets came in on to the control section, so it's a 16. Best coming in here is a portion of a bus, so that means that we're gonna have available to us on extra eat bets in order to defamed what happens within the control section. So you couldn message coming here and stayed have nothing by a tick order and having a different functions that we can perform here. You could have the extra A bets, and you could have a whole would mawr functions that you could perform. No, that was the lowest too increase the number of instructions on our instruction set and, in fact, the people to look at on actual modern CP year. The instructions say it would be much bigger than the one that we have created, but you can see here that there's a potential of extending thus design and this manner. But if you have to try and actually run, this is a 16 but you find that you would run into problems every just run very, very slowly indeed. So if we live reached the limitations of using a large ism by building on a but machine, what we've seen a deadlier Whenever we designed the de Braga that we have an alternative process off simulating or CPU so we could rate it and, for example, VB here, or we could return any other program language Java C C plus plus, we could model the CPI here. There's always be understood and were able to divine define instruction set there. It gets perfectly feasible for us to model of CPU, and one of those languages are supposed to build in it. And that's physical sense here and large Isam. So there are lots of different ways that we can take the sample CPU and extend it and expand it. We can lick it, increasing the instruction, say, and have war complicated instructions. The social lick it, creating a simulation or ah, model off the CPI year on extending model within a programming language of your choice. We could also look it actually trying to realize the CPU using physical components. Another option as we could, designed the CPU on an integrated circuit. Former. So there are lots of different ways we can extend on this course. Another option would be to try and late rate ah, higher level programming language, something quite simple, but something with the basic corn stocks that you would recognize and leppings doctors, for example, before next, do the way all the F, then an else statements and then rating for that, a little partial. That will, although is too. Change it from the programming lines that we have turning to the assembly language, and then we could use the same block together and to the machine could so keep an eye on the resources section for extra programs. Also, if you have any assembler language cordial lately trying rate what you having problems with ? You could always get in contact with me. Something else we could possibly do. Israel has built up a small set off routines that we retained to use quite regularly. For example, the multiplication routine. We could have, Ah, division on our subtraction and so on and so forth and from Lewis little routines you could build up a simple little court are simpler method off employing those cretins efficiently. One in the CPI here. So, for that's give Jeffrey ideas and a taste for or common future courses. Thank you for listening to this video. Goodbye