hey we're looking at my CPU in this video just a real introduction to it from quite a basic level so a CPU if you don't know it sits on for motherboard versus a motherboard here it's rectangle object loads of ports on it this is a heatsink and this is what's sing on top of a CPU CPU looks a bit like this just a pin that plugs into your motherboard and because it's so powerful because it produces so much heat it needs its own dedicated fan called the heatsink to call it down sufficiently so this is where you'd find it actually as the hotter device on the computer but we look at it from a more theoretical point of view in this video so it stands for central processing units and it's for Hardware over controls the manipulation of data that processes data that's what it does and it's worth pointing out for in a computer there are potentially several processors not only can you have multi-core CPUs where you have kind of like several CPUs within a CPU that make sense we'll look about a bit later but you knows are processing things like graphics cards and sound cards so process is kind of like a general term but it is used interchangeably of CPU just bear that in mind but to start off let's just break it down into three components the ALU for control unit for Cu and for register unit so firstly as if he was not stevis simplified but firstly the ALU is actually what does for processing that actually carries out the instructions this is the arithmetic logic unit is written with a forward slash for some reason that I can't say I know why but it is so ALU 50 logic unit and mr. she performs operations that performs derivative operations like addition multiplication division so on and the logic ones like I mean basically evaluating something to false or true but two boolean values so this is what actually does kind of a hard work but it's overseen by the control unit which actually coordinates for CPU and because the CPU is kind of what is controlling the whole computer as what's doing all the computer's processing apart from these potential graphics card sound card processor which is doing a very specific task but generally it's controlling royal computer you wouldn't be watching this video for CPU wasn't working in your device and we're talking to actually kind of warms up the circuitry decodes of instructions actually deals with the days transfer and so on and the registers are small quick sources eighty might have say only thirty-two on your CPU and some of them are used for programmers some are used for the fetch excuse cycle which we'll cover later they're very quick very small virtually on the chip and they're mostly there for efficiency because it's very slow comparatively to have to keep going back and forth between memory if I used komak a temporary storage on the CPU and they used in this operation as well so I wanted to talk about a von Neumann architecture briefly and this is a term for essentially what we've just looked at it falls under this category and over hardware we're looking at all the modern computers fall under this category of von Neumann architecture and this is often a point of confusion was not really taught because it's so ubiquitous because everything essentially is based on its architecture means the teachers don't really explicitly say it's a von Neumann architecture people often get confused because they see this term and they're like I've never heard of this before actually it's what learn all along so you know you don't really have to know about the other architectures other models available this is going back to 1945 but essentially it says where we can break our systems down into four components for main memory or just memory which is where four registers in this kind of model would fit in and we'll talk about memory a lot more on the hardware videos but also got early we've got control unit list of processing units of this if you're a school system and also quite input devices and their game is going back to 1945 so if you can imagine processes and for computers as a whole back then this is very simplistic but this does also mean a second major characteristic of this is a instructions that executed the instructions for is q2 stored alongside the data in memory so everything is stored in memory alongside each other in binary as we would have talked about another point of course I miss concepts with fact refer the data and the instructions are stores together is the stored program concept and again this is often attributed to von Neumann perhaps unfairly to the people who actually did it because I think he was just anyway he was very famous um but this contrasts with another model which isn't really used in modern computers and misses this would be the hard Harvard model and in Mahalo model there's basically two different memories one for the instructions and one for the data but we don't use that so we're not gonna worry about that too much Amira von Neumann model architecture instructions are executed sequentially and this is how it works in our computers so one instruction at time is fetched from for memory and pass to the CPU and this means but even if your CPU is absolutely rapid and it's very very fast if the connection between memory and the CPU in this bus in this wire if it's very slow you get a bottleneck which is called a von Neumann bottleneck and that's just an interesting feature of this architecture I mean I say interesting anyway we have to talk about the clock briefly we missed topic is actually very important for the whole computer but especially for the CPUs operation so computers have a system clock which is actually where to provide just general timing signals is not specific to anything it's just better in the background provide timely signals and it's used by the circuits any circuits to synchronize itself and it's not like a clock like we used to it's like a metronome in music which conscious produces a steady steady rhythm a steady pulse of voltage versus representative and voltage levels could be on and off that could be 5 volts and 10 volts but the fact remains that it's a very steady kind of pulse pulse pulse and first of all you can use it to synchronize your circuits so for example you might only transfer data on a rising edge of the clock or you might only do on the falling edge of the clock you might only write data when per clock is high asserted high or if it's asserted low essentially the devices can use the clock as they wish and the clock the system clock actually sits on the motherboard and like I said it's used but any devices where CPU uses it and CPUs are designed and manufactured to operate at a specific frequency the CPU is much faster than all the other components so it needs to essentially have a clock for oscillates faster that has a higher frequency and so the CPU takes for system clock and changes it so it's a lot faster and this is the clock speed and the clock speed is very important because the CPU knee is a certain amount of clock cycles or ticks essentially an arbitrary amount of these we could just say one for example per instruction so use the cycle and miss cycle is for fetch execute cycle so all this does is this is just for process of the CPU executing a single instruction so if we just go back a second in my executing stripe instruction whenever clock is high so the instruction here instruction instruction here and so on and the faster this is done and the faster the CPU will operate because it's got a higher clock speed anyway so the fetch a second cycle first up first of all as we've talked about this for memory is external to the CPU and the instructions are stored at the memory so they need to be retrieved by the CPU from the memory and this is just a fetch stage of this cycle so first of all instructions go to a CPU when they're there they go into the control unit and the instructions broken down into its kind of constituent parts and an instruction is split up into its operator and it's operand the operator is telling you what it's doing like ad in this example actually addition here is an operator and operand is another word for data so we have two operands here these are two registers so this instruction in assembly code is saying we want to add the contents of our five register five super contents of register 1 and so in this stage it works a lot of instruction is depending on what for your crater is it will essentially it's relevant for the execute stage where every gate is actually executed here the CPU will use information it's got from the decoding stage to activate for necessary circuitry ALU or if it needs more data or for needs to transfer to or from registers like it does in this case it will do it in execute stadium this is all done by the control unit the actual execution of instructions for following off instructions is done by the ALU and the output of this is stalled in a register or maybe store and also any other later maybe read over it into registers or main memory so in this case it's got read from r5 it's gotta be the contents of r5 and it's got to store this as r1 so it's got to do a bit of reading and writing in the execute stage so this is a cycle and as I say it needs a certain amount of clock ticks per instruction and so the fast of a clock speed is four more cycles it will do because it's just going to inherently fall over cycle and so the fast of a clock speed is four high of a frequency for fast of a CPU is