all right hello everyone welcome to this channel we are now in chapter 3 hardware of igcse computer science and in this video we are going to learn about what a cpu is and what it does and also the monument architecture so the cpu is central to our modern computer system um one misconception about cpu is that people always thought that cpu is the desktop and laptop that we use on a day-to-day basis but in reality it's just a chip on the computer itself and its responsibility is to carry it out pers and process all the instruction and data in a computer application so what are instructions let me give you an example so we have here we have a snapshot of the game valeron and when we were to when we shoot a bullet using the ground there are actually multiple instructions that is happening behind the hood in the computer so the first instruction it could be the reduction of your bullet in your gun all right and it could also be the reduction of your enemy's health when you hit the target so these are all the instructions that needs to be carried out by a cpu and how the computer often work with a cpu is via this architecture called the monument architecture in which it consists of multiple components so if you look at the star here first of all the cpu is part of the monument architecture the first one and also the memory unit our ram followed by input and output the devices where we give the computer an input and also an output how the output is shown and in this video we are going to go through each component in a very briefly to show you what they do and how they work together to help a computer to carry out an instruction and let's move on says let's look at them one by one the first component that we are going to look into is the aru which we call the arithmetic and logic unit as implied by the name it carries out aromatic operations such as adding subtracting multiplying and dividing and it also carried out logical operation which helps the computer to make certain decisions and here there's a note here which is it's possible for a computer to have more than one aru so in a cpu chip that could be more than one aru in which each alu will carry out a very specific task so for instance one could be doing the addition subtraction part the other could be doing the multiplication and the division part so um how it works here i have included some drawing here and it often takes multiple inputs from the ram and produces an output so that's aru and the second components in the monument architecture is the memory unit which is the ram it which in which it is just a storage box that stores all the instructions that the cpu needs to access okay and how the cpu obtains all this instruction is that it first take data and programs how in the heart disk drive and put them into our ram so if you are of in a video editing software what the cpu does is that it will take the codes from the hard disk and move it to the ram so that the cpu can access it and the reason this is needed is because the read and write operation carried out using the ram are considerably faster than those in a hard disk drive this is why the cpu needs to move all this data from the hard disk to the ram so that they can access it faster and another note about ram is that it is a type of voltage memory in which its content will not be retained after the computer is shut off so an example they can think of is that when you are playing a game if you don't save your progress the and you power off the computer the progress will not be in your permanent memory will not be in your hardest the progress is all gone because ram is where your computer will save your progress but after you save your game after the same progress all this data will be moved from the ram into the permanent memory that's how the ram work is of type of volatile memory so having talked about a ram another component that we're currently talking about is the registers the five registers which we were learned in reality there are more than that but in our course we are just going to look into the five registers and here they said that the registers are one of the most fundamental components of a monument architecture it means that without them the cpu wouldn't be able to work and one thing about registers that is very similar to what ram does is also stores instruction in which each registers they store different parts of the instruction and let's look into the current regis instruction register crr the first one as implied by the name it stores the current instruction being decoded and executed and the second register is the accumulator it is used to store the result of the alu calculation if you remember the aru will produce an output and the result of this output will be stored into the accumulator and next up the memory address register it is used to store the address of the memory location currently being read and write to and as for the memory data it stores data which is needed to be stored and last but not least the program counter is still the address where the next instruction to be read can be fine and at this point of time you might find it hard to understand why are all this register needed but as we go through the fetch decode execute cycle in the next video you are going to see how these components work together to help a cpu carried out a task all right so these are the five registers and next up we have the control unit which is also located inside the cpu as the control unit controls all the operations in a cpu i like to think of it as see control unit as the boss of all the components because it will what it does is that recent instruction and the address of the location can be found is stored in the program counter and this instruction is then interpreted during the fetch decode execute cycle and what control unit does is that in third point it sends signals along the control bus to all the components so that other components know what to do so it's basically the coordinator of all the instructions that need to be carried out so um the control unit is here they say it's responsible for making sure all this component follow the instruction it has processed from the input so that's control unit the big boss of the cpu and we also have the bus if you look here here we have go through the multiple components of a cpu but how do they really communicate right and the the way that you do this is to fire the buses we have three types of buses which is known as the address bus the data bus and the control bus all these buses they are like the connections here in which they carry data around a computer so it's just that each bus that carries different types of data for the address bus it carries the address between the memory unit here from the memory unit back to the cpu and as for the data bus it carries the data from the memory unit and the cpu and the control bus it carries a signal from the control unit to all the other component computer components and one notice about all these buses is that the weight of the buses are important the wider the bus the larger the word length in other words the more data it can carry so so having learned about all these um components of the ornament architecture um i hope that you will understand all the elements that are in the cpu so what we learned is that we learned that there are multiple components in a cpu such as the aru first one the control unit and all the buses and followed by the registers and apart from the cpu the memory unit here they are also part of monument architecture input and output so here we can conclude the entire video so in this video we learned about all the components of the cpu and also all the elements in a monument architecture and in the next video we are going to see how all these components and elements work together to help a cpu process and instruction i'll see you in the next video goodbye all right hello everyone welcome back to this channel and watch in this in the last video we learned about all the components of a cpu and how all the elements of a monument architecture work um together so in this video we are going to go into the fetch decode execute cycle in which it is a method of processing data that the volume and architecture uses and this cycle usually happens very quickly in a matter of a millisecond which means that there can be billions of cycles happening in just one second and all the components inside the cpu will involve in this operation so for simplicity's sake i transformed this diagram into the simpler one in which the central processing unit is on the left and a more detailed version of the memory unit is on our right and how do we read this memory unit diagram is that the right hand side of the memory unit is the address of the memory unit and in each address there will be data stored here okay so um there's some side notes here all of these values the address and the data will actually be stored using machine code which is zero and one but for explanation purpose i put it as a binary form so that you can understand what i'm saying here so these are the six steps of the fetch decode execute cycle it's pretty lengthy and therefore we are going to go through each step by looking by visualizing it using a diagram so imagine that these is the instruction that we want our computer to carry out instruction and let's look at how many cycles that we need to carry out this instruction even though we know that this beyonce is five how will the computer do this so first of all if you look at the memory unit we have the value 2 and 3 located in our memory unit all right so let's see how they are being added together so first step the program counter stores the address location of the next instruction to be carried out so the first instruction is 101 so we just have to look into what is inside our 101 um location which is this instruction load 10 and this location number 101 will then be copied into our memory address registers so that's what they are saying here in our first step step number two this program counter is incremented by one so from 101 incremented to 102 so that the computer will know what is the next instruction that needs to be carried out after load 10 is being carried out okay so step number three at this point we already know what is the instruction that we need to carry it out which is 101 and the control unit will then make a request to the ram for the instruction and obtain the address of the location from the mer by sending a signal which means control unit will now get the address from the memory address register which is 101 from the memory address register okay and the fourth step is that the data that is being held in the ram in the correct address is carried the control unit will then ask the memory unit to send whatever that is in 101 to the memory data register which is used to store the data load 10 and once the extraction arrives at nvr it's copied into the current instruction registers in which we can see it here and current instruction register is basically stores the instruction carried out by at that time and the instruction is then decoded in cir using the arithmetic logic unit the result of this processing is stored in the accumulator and the word load 10 here it doesn't mean we want to load the value 10 in fact it is saying that i want to load whatever that is inside location 10 i want to load the value into our accumulator so as you can see from the right hand side at location 10 the value is 2 and therefore this value 2 will be stored will be first be moved to the memory data register and then it will be stored into our accumulator and that's the end of our first instruction we all we have done is just to reload the value 2 into our accumulator so next up next instruction is that okay again it's the same step it's just another cycle the program counter now will store what the instruction that we need to carry it out which is 102 and this 102 will be copied into the mar memory address register and the program counter will then be incremented by one from 102 to 103 and the control unit blah blah blah it will make a request so that it knows what instruction to be carried out in the fourth step this instruction from address 102 is moved to the memory data register and the next step this instruction will be carried out copy into current instruction register and the control unit will do its tasks so this instruction at 11 again we are not adding the value 11 we are adding whatever that is inside location 11 in the memory unit so the alu will then carry out what is being required 2 plus 3 and the result of this processing is stored in the accumulator so the result of the alu will store into the accumulator so but we haven't really we calculated the value but the value is still not stored in our memory unit yet so we need to do another cycle second the third cycle again the same thing this memory address registered they are the same which carried out what is the address of the instruction that i need to carry it out now and program counter incremented by one the control unit make a request to the ram for the instruction and obtain whatever that is inside the mar okay and this instruction will then be moved to the memory data register and the instruction will then copy again you can see that it's repeated the action is repeated store 12 is being put into cir and then the instruction is decoded decoded and carried out so this dot 12 again we what they're saying here is that we want to store the result of our computation here 5 into location 12. so take a look at location 12 it's now been storing the value 5 which is our result so that's all we have done 2 plus 3 and we put the result to location 12. and can you see that there are so many instructions involved if for just one mathematical operation so this is the um instruction part of it so this is essentially fetch the code execute cycle first firstly all the data that's needed will be fetched from the memory unit to the cpu and then these these instructions will be decoded inside the cpu and be executed and this is the essence of fetch decoy execute cycle and now in the next video we are going to talk about what are some of the factors that affect how fast the computer can carry out all this instruction i'll see you then goodbye all right hello everyone in this video we are going to look into the factors affecting the computer speed and in the last video we learned that factually code execute cycle is a very lengthy process however computer is fast enough to carry out billions and billions of cycles in just one second and there are a few factors that which affect how fast the computer carries out all this cycle and we are going to look into the three factors first one is the clock speed the catch memory and also the calls all right so let's look at the clock speed clock speed is an important measure in terms of cpu performance capability it basically refers to the number of electrical pulses that the clock inside the cpu can produce every second and basically clock speeds is just the quantity the number of cycles that a computer can carry out in one second and by increasing the clock speed the processing speed of the computer is also increased so an example is that if your computer has a speed of 3.5 gigahertz this means in one second your cpu will be able to process 3.5 billion instructions and by increasing the clock speed your computer can carry out more instruction in just one second and one term we need to look into is called the overclocking in which it the computer uses a clock speed higher than the computer it's designed for and the problem of this is though it will lead to seriously unsynchronized operations which means an instruction is unable to complete in time before the next one is to be executed this would cause the computer to crash and the other problem of this is that overheating of the cpu will happen so here are some of the disadvantages of overclocking your computer and the next factors that will affect your computer speed is the number of calls that you use in your computer we often hear that a cpu has quad core dual core and what do they really mean right it basically means that um a cpu has multiple cores and which which means they will have multiple alu multiple registers and the idea of using more core elevates the need to continually increase clock speed what do i mean here so imagine that this is a one core cpu which we just learned and having a multi-core cpu it basically means that we just have two sets of cpu here and it is um that means two instructions can be carried out simultaneously because we are currently having two cpu cores and one side notes here is that oftentimes doubling the number of calls will not guarantee um a double in speed because we need to take into account the communication time the communication time in which these communications are needed so that this both cpu can be in sync and the multi-course eight course is a similar pattern it just means that we have multiple cpu in our cpu so so that's um the two factors first one is clock speed but however we know that we can't overclock very often and therefore um computer scientists have come up with a way to put multiple core within the cpu and the third method that we can increase our cpu performance is to use catch memories in our cpu and unlike ram which is located outside the cpu this catch memory is located within the cpu itself which means that if the cpu has some information to access instead of accessing it from the ram it can accept from the catch in which it will be faster because it is located within the cpu and what the catch memory usually will store instructions and data that that will be accessed often okay so in point number four it says that if a cpu wishes to read the memory it will first check whether the catch has that instruction before accessing the run and the larger the catch memory size the better the cpu performance is and for you to visualize the catch memory is basically just um one mini ram that is located inside a cpu check so um so far we have learned the three methods of increasing our cpu speed the first one is to overclock it to increase the not overclock to increase the clock speed increase clock speed and the second method is to use a multiple cores in our cpu multiple cores and the third method is to include catch memories in our in our cpu so that's the three factors that affect the cpu speed thank you everyone all right hello everyone welcome to this channel so in this video we are going to look into what are instruction set and embedded system so for instruction set is basically a common set of instructions that have been developed by processor manufacturers so that cpu can operate as effectively efficiently as possible so this instruction set basically consists of a sensor instruction that the computer will use in a very frequent manner and so let's look into what we did in um the fat critical execute cycle if you remember we have our cpu here and also our memory unit here and when we are doing the fetch deco execute cycle we have something inside the memory unit called the instruction the instructions so the instructions said it's basically a collection of all these common instructions that will be used by a computer so let's study them in a very in a more detailed manner so these are the three instructions that we learned and the there are basically two parts of for for this instruction the first part is called the opcode and the second part is called the operands as for the op quotes it's basically a short cut way of saying operational code it gives the computer a precise job that is required to happen and they are usually in in the form of verbs okay they are verbs so these outputs are stored on the computer hard disk and will be copied into memory ram whenever they are needed remember that the computer can access the ram memory faster as compared to the hard disk and the most regularly used up codes will be stored in the catch itself because it's even faster for computers to access the catch and that's the opcode they basically are the verbs of an instruction the verbs for instance load that means you load a value add you add value store you store something into the memory unit and the second part of the instruction is the operands all right um these operands they can be either the address so for our case here load 10 doesn't mean that you are loading the value 10 but you are loading the instruction that is stored in the location 10 and it could also be a data for instance load 10 it can be a value of 10. all right so instruction set is in essence it's basically a set of all the instructions that a computer will be will need and let's move on to embedded system so um traditionally we would think that computers are like the desktop and laptops that we use on a day-to-day basis and these are called the general purpose computers because they can do a lot of things you can have you can play music game and even serve the internet in this computer therefore it's a very general computer so however for embedded system it is also a type of computer but in contrast to general computer they carried out more specific tasks and drop and how they do it is that they embed a computer chip into a device to carry out function in a more effective way in other words what they say here is a combination of hardware and software which is designed to carry out specific sets of function and the keyword here is that specific and beta system carries out very specific tars some tears on general ideas of what is consists of on what an embedded system consists of it usually have an analog or digital input and to take that input they will certainly need a user interface and after the data is being processed it produces some types of output and here are some examples um the first one is vending machine all right it has some sort of input to take in money it can it also has a user interface and after it processes the data it will output the object that the user has purchased okay another thing could be lightning system and they can take input in the form of detecting their temperature the light sources and open the suitable light and here are some information about embedded system in which um some of them they they are all low power devices they don't need a lot of electricity and the second point of the embedded system is that some are programmable and which means you can customize the computer system to suit your need however some are not pro non-programmable um in general to be replaced if they require a software update all right so programmer device requires upgrade by two methods if you want to program the embedded system you are either connect your device to a computer or you download a software update or you can automate take updates via a wi-fi satellite or cellular so that's all about embedded system it's basically a specific types of computer that carries very specific tasks all right unlike the computer that we use and so that's the end of it um about instruction set and it's embedded system i'll see you in the next video goodbye so hello everyone welcome back to this channel again and in this video we are going to learn about the multiple input devices that a computer would need so just a recap on the volume architecture we have the central processing unit ram and also input and output device and our focus for this video is the input devices that a computer would need think about it without input devices our computer would probably work on autopilot in which we can't really communicate with it we can't really do the stuff that we would want therefore input devices are extremely important to make computer useful to a lot of us and we are going to go through input devices one by one and study what they do and how they work internally so the first input device that we're gonna go into in is the keyboard um we all know what keyboard is it allows us to type in letters and numbers into computer and they are connected either using a usb port or wirelessly using a bluetooth connection all right so um there are other types of keyboard that we use on the day-to-day basis this is called numpad and digital keyboard that is on our phone is also want and also the most recently announced magic keyboard from apple these are all keyboards but just that they are in a different manner so it is a type of input device because it allows us to send data to the computer and how it works internally is that whenever we type a character on the keyboard it can be any types of keyboard this um action will translate into a the binary understood by computer and it will then be sent to this concentric processing unit to be processed that's how computer process input data every action that we do to our input devices will be converted into binary and then processed by the cpu so um besides the keyboard we also have the mouse um very simple it's left and right button is often used as a pointing device basically helps us to point to a place where we want to be again similar to a keyboard is connected using usb or bluetooth and here is some information of how it works internally it basically um for your mouse a red led light is used at the base of the mouse so i have a mouse here um um your mouse would have this thing too so basically when i were to if i were to turn this off it would turn red and the rate like is used for reflection so what they say is that weight loss will be bounced off the surface and the reflection will be picked up by a cmos which is a types of materials used and this cmos will generate electric pulses to represent the reflected red light and these pulses are sent to a digital signal processor and by using the reflection of the like it what they say here is that the processor can work out the coordinates of where we are pointing to using our computer and then the computer will then move the cursor to the coordinates sent by the mouse um remember this it happens in a millisecond just like facts they could execute cycles all these things happen very quickly that's how they ensure that you are moving in real time your movement can be shown in real time on your monitor okay so um there are other types of pointing devices um besides the mouse you could have it could also be a gaming controller touchpad on your laptop or even a stylus which i'm using now on my ipad so the next input devices is also your touch screen which is more common in our smartphones today they react to a finger press that allows the user to carry out the same function as they would be with a pointing device so instead um i think once steve job wants it um instead of having all this different gadget as your pointing device you are using your finger as your pointing device so that's how touch screen works so um in our subject here we will learn we are going to have learn three types of touch screen in which each touch screen has some advantages and disadvantages the first one is the capacitive touchscreen they are usually used in our phones they have better image clarity and they support multi-touch and which this type of touchscreen can work by having even if you put two fingers they will be able to react to two fingers movement simultaneously all right here are some of the information of how it works internally you can read it and this is disadvantages that is more expensive to manufacture so on this capacitive and we have another type of touch screen called a resistive it basically work by calculating the amount of downward pressure applied to the screen and then based on the pressure um they detect the coordinates of where the pressure change has happened the advantage of this type of screen is that it can be used in bad finger stylus or even glove hand which means it's very versatile and its disadvantage is that it has low versus touch sensitivity and no multi-touch they are basically used in shopping mall where we um need to check for directory the type of screen all right so that's resistive touch and last but not least as the infrared touch screen is the most sensible sensitive touchscreen um among the tree it works by emitting a grid of light and when this light grid is interrupted the touch on causes are disturbance and the disturbance is then we translate into accordance in which the screen will react to and because it's very sensitive one of the disadvantages that is very susceptible to false touch so these are the three types of touchscreen capacitive resistive and infrared each has their own advantage and disadvantage you will need to memorize them just in case they ask you in your passive in your exam so the fourth input device that we're learning is the scanner in which they convert text or images on paper into digital format all right so um how it works is that you can just place a paper on on the scanner and then the content of the paper will be translated into digital forms such as pdf or word document and the information all right all this how it works is that the like will reflect onto the paper and determine what are the colors and the image and this information is then used by the computer to produce the document and in the scanner there's this technology called the optical character recognition and ocr is basically used by computer to scan text from document and convert into text file format this um this technologies is useful because they can translate it into the format which you can change the text if you were to scan the text called abcd they would translate it into a document which contains the word abcd and at the same time you will be able to change whatever that is on that document all right so um if the original document was a photograph or image then the scanned image will form an image file such as the jpeg so besides scan 2d scanner 2d scanner is used for paper a 3d scanner is then used to scan a 3d objects and then the re all the reflections all the scanning will be translated into a model to be shown so that um here are some of the application that for 2d scanner is used in the airport to read the passport so that um with the ocr technologies the image like your photos or your informations they can be manipulated and stored into their database all right and as for the 3d image scanner they are usually used by designers to create prototype by scanning just the object and then translate it into a computer to be manipulated so these are scanner the another type of input device is the barcode scanner which i usually use in shop and they use infrared light to read the bars right in in the code and what it does is that it accesses information about a product within a store so this is um a bar code here and in this part we'll learn how to read that so each barcode actually stores information about like product identification number country of origin and manufacturer all right okay so what it does is that um we have a barcode here 543051 and how we read this is that by reading this part the computer will know that this is the value 5 by checking out the table here as you can see all right they're basically spinning to the left hand part and the right hand part and for the left hand side this 5 here will be right from here and four again they will cross check which shape it is and that's how a computer read the barcode and translate it into numbers and all these numbers will then be used to match the database record to check what is the price what is the price of the object okay of the product so that's how bar code work um how they weigh is that basically um the use of infrared like to read the bars in the code and based on the like that is reflected the data is determined all right so another form of input device is the quick response scanner which is the qr code and instead of using a line like barcode they use some boxes it lost characters what it does allow characters digit and internet address to be encoded so so that the user will not have to remember every information you can just scan and access the information and here are some comparisons of qr code and barcode qr code can store more information and they are easier to read they don't need expensive laser or led your phone will be able to do that and it's also possible to encrypt qr code to give them greater protection as for barcode more than one qr format is available and qr codes can be used to translate malicious code all right so um barcode is a lot safer because it can't you can't store malicious codes out there and um the last two input device such as digital camera is also an input device and we should take a digital image of the view in front of its lens and how it works is that it captures lights um using a light sensitive cell and all this cells is made of tiny sensors which acts as photo diodes all right and these devices these components they convert lights into electricity and all these images will then be viewed um after being converted to digital converter to a digital image array in which a two-dimensional pixel array to be shown on our computer or monitor and last but not least it's the microphone um instead of taking images like the webcam microphone's taken sound and it's connected either using a usb port or bluetooth what it does is that it converts analog signals into digital signals it's mainly used for wrap conferencing and so imagine that this is the word that i'm saying hut and this sound will be picked up by the microphone and be converted into binary value and then processed by the cpu so these are all the input devices that we learned today we never go into the details of it too much but here's here are all the things that we need to know we go through what is keyboard mouse and how they work touch screen and the three types of touch screen that are involved scanner 2d and 3d scanner barcode reader and also the qr code digital camera and microphones so that's the end of this video thank you for watching see you all right hello everyone welcome to this channel so in this video we are going to learn what is the sensor and what are some of the applications if you remember in our volume and architecture video we introduced some of these elements here so we have the cpu the memory unit the input and output and think of sensors as an automatic input if you think about it for a normal sensor device such as mouse or keyboard you will need human interference but as for sensor think of it as an automatic input device in which it can work itself by detecting what is happening before the surrounding and help the cpu to make the right decision so here are the function of a sensor it read and measure physical properties from their surrounding and the properties that they measure could be temperature pressure acidity level or even length etc and before we proceed to knowing the different types of sensor around we need to understand this component known as the analog to digital converter and if you remember in our data representation video computer can only understand binary which is 0 and 1. therefore if a sensor were to give it a value of 39 degrees celsius for example the computer wouldn't be able to understand it therefore an adc is needed to convert what is captured by the sensor and to digital data like zero and one and there's an extra node here in which you can see with site adc we also have dac for instance if you want to convert the binary data back to analog signal you have to use this component call as the digital to analog converter and another term we need to understand is the term called feedback that what we can read here sensor readings may cause microprocessor to outer valve or model and this means that the sensors will sense something and then tell the cpu to control the wave or model and change the next reading taken by the sensor and because of what is the action that's being taken the reading that is received by the sensor will change and the output from the microprocessor will impact on the next input received as it attempts to bring the system within the desired parameters so let me show you an example of what a feedback is like so for instance here you have a system that controls the temperature of a room and you will need a temperature sensor and imagine that the value that it detects is 40 degrees celsius and this value as i mentioned it needs to be converted to binary using the analog to digital digital converter and this value will be received out by a microprocessor and the microprocessor would then control the output by releasing code and because of this action the next reading that is taken by the thermometer will be different because of the cold air that we release and this is called feedback which means that after sensor detects the value it sends the signal to a microprocessor and the microprocessor do something and this something causes the input to be taken by the sensor to be different as compared to what is being taken prior to this and this is called feedback which is very useful when we are doing the assay question okay so here are the different types of sensors that we will learn um knowing these types of sensors is important so that you know what types of sensors should be used if you are given a scenario this scenario and so on and the first one we have our temperature sensor like what we discussed it basically measures the temperature of the surrounding and it is used in a control heating system chemical process and also monitor temperature in the greenhouse and the second sensor is the moisture sensors it as the name implies this measures the water level for example in a soy it is also useful in a greenhouse and also the moisture level in the food processing factory and ensures that the food is not too moisturized and the third census we have the humidity sensor it's a little bit different to moisture humidity measures the amount of water vapor in the air all right again it's used in a factory manufacturing microchip to ensure that the air humidity is not very high and also again the greenhouse is in again and the fourth sensor that we learned is the light sensor in which they use photoelectric cells to capture and produce an output depending on the brightness of the level right so that's the how they tell the computer how bright it is and the surrounding and followed by the infrared sensor it is an invisible beam of infrared radiation picked by a detector if the beam is broken then there will be a change in the amount of infra radiation reaching the detector and some of the application is is quite interesting what they say here is that imagine this infrared radiation can turn on a car windscreen white push when it detects rain on the wind speed so the infrared radiation will be interrupted by the rain the water droplets it will also use in security alarm system so the next sensor we have the pressure sensor it is produce and generate different electric currents depending on what is the pressure applied and it is used in lorries and waving station and also measure the gas pressure in nuclear reactor for now you don't really have to understand each census application i mean don't have to memorize it all you have to do is just understand what they do so that when the exam question gives you a scenario you know which sensors you should be using so firstly let's proceed to the next sensor which is our sound sensors it detects micro it's microphones that convert detected sound into electrical signals and pulses it's very obvious they pick up noises and then let the computers know that there's the noise there and also we have the gas sensor it basically um there are two types many many types of examples are the oxygen and carbon dioxide sensors they use the various methods to detect gas being monitored and produce an output that vary with the carbon dioxide and oxygen level present okay again it is used in greenhouse so the nice sensor is the ph sensors in which they measure the acidity through changes in voltages in for example soil again it's used in greenhouse and also used in chemical process and we also for don't forget the magnetic field sensor they measure the changes in magnetic fields and the signal outputs will depend on how the magnetic field has changed we won't go into details of how magnetic fields work because that's physics but just remember that that is a sensor that can measure how much change there is in a magnetic field okay and followed by the accelerometer sensor they basically measure how much acceleration an object has and they are used in custom measure rapid deceleration and applied airbag when you are in a crash it's also used by mobile phones to detect whether um the phone is in landscape mode it's in portrait mode or landscape mode and also the proximity sensor they measure the presence of the nearby project so they um if you use the recent iphone 11012 you'll notice that when you were to put your phone on your ear the screen will turn black that's the proximity sensors in action and the last slide we also have the flow sensors it measures how fast liquid or gas is moving that's why it's called flow sensors it's used in respiratory devices and inhaler in hospital and also measure gas flow in pipe for there's 14 sensors the last one that we are going to learn is the level sensors in which they use ultrasonic to to measure um the level of a tank for instance in a petrol tank and obviously detection in refrigerant so these are all the different types of sensors that we will learn in this syllabus so let's look at how these sensors are used in real life application all right there are two types of application the first type is called the monitoring application and also the controlling application all right so let's look at what they really are and here is this flowchart of how a monitoring and controlling application work so the first step is always that the sensors will detect value from their surrounding and then send the signals to the computer and then this signal will be converted into analog to digital signal using the adc converter and this computer will analyze the data received and check it against the stored value this is the key concept because think of store value as the default value that a computer can accept therefore if the sensor detected something some unusual value and this kind of signified to the computer that hey something is not wrong something is abnormal and you have to do something differently okay and let's look at first look at what the monitoring system does so we we were here here step number three so after a check against the value um and what is it stored this new data if this new data is outside the acceptable range for instance the normal temperature is 37 for ins let's say your temperature sensor detects a value of 38 and this value is outside of the accepted value and if this happens a warning signal will be sent to a screen or an alarm is activated the microprocessor has no effect on what is being monitored it is simply watching the process that means it's a monitoring process and a real life example would be a security system okay so the security system will use the following sensors like the infrared sensors the acoustic sensors and also pressure sensors to measure what is happening in the surrounding okay and again we like what we see in the flow chart this data received by the sensor will be sent through an adc to be converted to digital data and the computer will process the digital data coming from this sensor at a given frequency and the data is then compared with what is being stored what is the accepted value and if any of the incoming data value whether it's the infrared sensor value acoustic sensor value or the pressure sensor value if any of this data is outside of the acceptable range the computer will then send the signal to the siren to sound the alarm and also the light to start flashing like the dream smart video and this the adc will be used by device to convert all this digital data to analog data okay so as you can see in this application um the entire system is just monitoring it's not doing anything it's just signal monitoring the um the surrounding and then sending signals to inform whoever that is in concern and the last step is also the important in which the alarm will continue to sound or like could continue flash until the system is reset and which means until the user is being notified so another type of monitoring system is monitoring of patients in the hospital so these are all the sensors that are attached to a patient and they basically measures temperature heart rate and breathing rate and these sensors they are all attached to your computer system if they will constantly send data back to a computer system again this data will pass through adc and this computer will will sample the data at frequent interval that means they take in values um every once in a while and the range of acceptable value for each parameter is then key into the computer and the data is compatible with what is the data received by the sensors it's compared with what is in the computer and if any of the incoming data values are outside of the acceptable range again the computer only sends a signal only sends a warning like in this case they sound an alarm that oh the patient is in um in danger and last but not least if the data is within range the value are shown in graphical form on a screen or a digital reader and the monitoring continues until the senses are disconnected from the patients it's a continuous process and so these these are the monitoring system so let's proceed to what um a controlling application does um this is different because they actually do something after it detects an unusual value so for instance is the control of street light and to to sense the light we'll use a light sensor and again the microprocessor will sample the data every once in a while and the data is compared to what is being stored in memory all right the a signal is if the data is less than what is being stored in the memory which means the like is not as much as what we expected a signal is sent to the microprocessor to the street lamp and the lamp will be switched on and the slam will stay switch on for 30 minutes before the sensor reading are sampled again if the data from the sensors at this point is greater than or equal to value stored in memory a signal is sent to from the microprocessor to the street like again and then the streetlight will switch up and again they said for 30 minutes um the reason is because we don't want to detect we don't want to change the street like every once in a while what what happened if there's a cloud up there covering the light right so we open it for 30 minutes but um in different scenarios just works differently but the essence of it that i wanted you to see is that because of this sensor the computer system is able to control what is happening whether to turn on or to switch off the like okay so that's controlling system and this is how census is being used in this case and here we have some exam questions i don't usually do this in my video but i do know that there are these questions often repeat themselves so it's good to know how um to answer this type of question so the sensors are used with a microprocessor to count how many competitors competitors finish the race and explain how the sensor and microprocessor work together it's a six smart question if you were to look at the marking rubric they always start off with usually you can also add what types of sensors types of sensors you use it could be an infrared sensor because you are detecting how many competitors pass through a certain point and then you can just follow the format okay first you detect what is the type of sensor and then you say the sensor sends signals to microprocessors and the signal is converted to digital using adc like what we just said in all this example and the data is compared to store value if it doesn't match counter is incremented by one and the only customization part is this part where in different types of question you might need to do different thing and in this point what is since we are calculating how many competitors finish the race we increment the counter by one so that we are counting then the amount of people crossing the street and last but not least do not forget this is free mark to write that this is a continuous process that means this application runs continuously okay this is one example i'll show you another one to show you how thin how similar they are in terms of um the answering technique again here we have an automatic lightning system and if movement is detected like a switch on if not it for two minutes the light gets through drop and the the questions are the same if you were to look at the marking rubric again it's the same format they first detect what are the what is the type of sensor being used okay and then the sensors will send the data i receive to the the data is converted to digital data is compared to store value and if it's outside of range it will do something otherwise it won't do anything okay and each time when it's reset and this is only specific to this example for different types of questions you just have to understand what are the actions that need to be taken and then write accordingly and again you would you can just end your answer with by saying that the process is continuous okay so that's how you answer a census question um i believe these are the only one of the few questions that they will ask you about census so in this video we have go through all the different types of sensors available and how they work together to to make a system and now in the next video we are going to learn what storages is and and computer and i'll see you there goodbye all right hello everyone welcome to this channel again in this video we are going to learn about what data storage is in a computer system and what are the different types of data storage um that are available in the market so let's recap the volume and architecture so like in the last video we go through what a sensor is which is an automatic input and in this video we are going to go through the this part where the data is stored like the ram and the secondary storage such as our hdd and ssd so this is our focus in this video and here we have two different types of memories the first type is the primary memory in which they explain that internal devices used to store data that the computer can access directly and the secondary storage is the storage that allows users to store application data and files and here are some of the comparisons to help you understand the two different types of data storage in a volume and architecture okay so for the primary memory it is used to store data that is key to running the computer for instance the code that is currently being run the application and also part of the os system that needs to be taken to the ram so the primary memory and as for the secondary storage is more on storing the application data and files and the primary memory is directly accessible by the cpu and the secondary is not which means that if you were to run an application or a game of software this code for that software will need to be loaded into the ram first before it is being run because the cpu can only directly assess what is being stored in the primary memory and here they said ram is all secondary storages devices are non-volatile but for primary memory ram is volatile and rom is non-volatile volatility is basically mean whether the data will still be there when you turn off the computer and every storage that we are going to learn it will be non-volatile except for ram all right and the primary memory is built internally into the computer but the secondary storage it can be external or internal which means you can have a removable hard disk if you want to but you can't have a removable ram or rom in your computer and the example of primary memory is your ram your rom your catch memory and the secondary will be your hdd ssd and also your dvd blu-rays etc so so let's delve deeper into what the primary memory is and some of the different types of memory there are in this category so the first one the first type of primary memory is the ram which is known as the random access memory the meaning of the name is basically is any memory location in ram can be accessed independently of which memory location was last used if you look at this diagram here is our ram diagram basically it means that if i were to if i want to access this data in location 10 the computer can just access it directly without going through the memory one by one like how we used to check for a word in dictionary so that's the meaning of ram therefore when you run an application and program data is retrieved from secondary storage like what i say it has to be moved from secondary storage into the ram and placed temporarily into the run and some of the features of the ram is that it can be written to or read from and the data can be changed by the user or the computer it is used to store data files part of an application of part of the operating system currently in use note that we have a keyword here node called part of this means that if you were to run a game not every code will be moved from the storage into your ram um it's just part of it part of those that needs to be run all right and it is volatile which means memory content will be lost every memory here they will be lost when you power off the computer so that's how we call a storage water tile the larger the size of the ram the faster the computer will operate because it can take in much code are much programmed to be executed at the same time and when we learn about virtual memory you will again realize how beneficial it is to have more rams in your computer and there are two different types of ram here first one is called the dynamic ram which is commonly used in our day-to-day life something that we use in our computer it consists of many chips and each chip consists of millions of transistors and the other types of ram that we are learning here is the static ram which is um usually located inside the cpu they make sure of make use of flip flops which hold each bit memory and for dynamic ram it needs to be refreshed every 15 seconds but static it doesn't need to be refreshed the advantage of dynamic ram is that it's usually much less expensive cheaper and also consume less power and higher memory capacity than sram and as for that sram it is a faster type of ram okay they are basically they are usually used um for dram they are basically use sets of common ram common ram in our computer and as for the sram since it is very expensive therefore it's usually used as the cache in our computer if you remember cache is basically a memory storage within the cpu chip to store commonly used instruction and it speed up the computer speed okay so these are everything about ram and let's move on to rom which is the read only memory it cannot be changed or written to um the content can only be read that's why it's called read-only memory and it's non-volatile which means even though after you turn off your computer the content will still be there and they are that's why we call them permanent memories they are used to store data that the computer needs to access when powering up for the first time such as the bios program okay and these are known as startup instructions and here are some differences between ram and rom for ram is temporary memory device when you power off your device the content will be lost and for rom is permanent and ram is volatile and non-rom is non-volatile like what we said ram the data can be written to or read from and as for rom the data stored cannot be outed program is usually used to store data files programs part of the os currently being in use and as for rom is used to store startup program like the bios and so that's all about primary storage so let's move on to the secondary storage they are usually larger in sizes compared to um primary storage your the ram in your computer might be 32 gauge gigabytes but for your secondary storage like a hard disk it could be up to one to two terabytes okay so they are basically used to allow users to store application and they are non-volatile they have slower access time by the cpu the cpu can access them but is not usually the case um so let's look at the first device of the secondary storage which is the hard disk drive all right it's used to store data um in digital format on the magnetic surface of the disk so so here we have this here okay and the player here it can spin 7 000 times a second so how the data is read is that it uses something called electromagnetic heads this is consists of electromagnetics that are used to read and write data from to the platers and imagine this is the this and the plato is like that it will just bend and then the magnetic heads will read data by using this okay so um as for the hdd it consists of something known as the tracks um and the sector all right so um they are basically used to store data under this so it could be some binary here as you can see what i'm drawing here okay a sector on a given track will contain a fixed number of bytes so this is the sector and this is the track and we all know that hdd is comparatively slow as compared to ssd and this is because this is because to read data from this hdd it requires a lot of read and write action the read write has to constantly look for the block of data this means that a large number of hits movement so i would illustrate it by drawing some of the bets on cd imagine we have data here and also some data here if you were to access the first data and the secondary consequence consecutively this means that the electromagnetic hit imagine this is the head sorry for the bad drawing it will have to move here and then move to here again you'll have to have multiple movement and these effects of latency become significant when you have a lot of data to read and latency is defined as the time it takes for specific blocks of data on a data track to rotate to read right hand okay so that's what makes the hdd slow and also quite hard at times and another term for hdd not term but um something bad that could happen is called fragmentation because when the data is stored on the hdd the required number of sectors to store the data will be allocated which means that if i were to store a value here so data one two three four the data will be allocated a spot on the hdd to be stored but after a while the hdd will undergo numerous deletion and editing which means these data stored here will be super fragmented which means they will be stored um very far away okay they are split um therefore it will cause the cpu it will cause the reading speed to deteriorate because the the data are so far away and if this happened a defragmentation software can be used to tidy up this sector so what do you mean by tidy up is that this data here um so let me clear everything but it will be stored as this instead of the data being split to a multiple sector they all will be placed into in the first track so that when the cpu wants to read this data the electromagnetic heads won't have to move too much so that's fragmentation of hdd okay so another type of hdd is the removable hard disk um we all know what they are they are not stored internally in the computer but they allow you to carry stuff away and that's his hdd and an improved version of a hard disk drive would be the ssd the started state drive the other name of it is known as the flash storage as implied by the name we know that it's very fast flash they have no moving parts and all data is retrieved at the same rate so what we learned in hdd just now is that different types of data will have different retrieving speech because they the data could be fragmented but for ssd this problem wouldn't occur um here are some of the introduct instructions um data is stored as zero and one in millions of tiny transistors and these data are stored by movement of electron within the logic gates and the electric current reaches the control gate and flow through the floating gate to be stored a dielectric coating separate the two transistors which allow the flowing gate transistor to retain its charge basically it means that if you look at the electric source here the more how they control what data to be stored in each section is they control how much electric current is flowed at that time to detect how much what is the data being stored okay i'll include a link in the description that explain xsd much better than i could okay but here we just need to know that they are faster and also what are the advantages compared to ssd so i created acronym for this let me take fried chicken l stands for lighter they are lighter than them as hdd more reliable thinner faster and access later excess and cooler because they don't have the moving heads and the disadvantages is that they have poor longevity therefore it's not used in most servers um so um here we have another notes here is that um memory sticks the pen drive that we use they use solid state technology okay so let's move on to the third type of secondary storage which is the optical media and we have the cd dvd and also the blue radius and how the cd works is actually how do they store zero data there and once it's via the concepts of lan and peat so imagine this is the surface of the city and the surface will contain some of the called the land which is the upper area and also the pit and as with a hdd a city divided into sectors like this for direct access to data and the data is stored in whatever they call the pits and lane a red laser is used to read and write the data so how they read and write the data is very interesting so the laser beam like this red arrow here it will be emitted and if it reaches the pit it will take a longer time to be reflected back to the emitter so this tells the computer that this is a zero a zero in binary and on the other hand if the emitter reaches a length the reflection time for the like the time for the light to be reflected will be shorter and this tells the computer that this is a one instead and when it is spun the optical head moves to the point where the laser beam contacts with the this surface that emits the bright light okay and follow the spiral track from the center onwards that's how a cd is being read and the difference between c cd and dvd is that dvd has more storage than in cd because it can be dual layers that means both sides of the city can store data reading and writing of the second layer is done by raid laser focus on the fraction of a millimeter difference compared to the first layer and single layer dvds still have a large storage capacity density because of smaller pitch size we'll talk more about this when we go through the red blue radius all right so um let's talk about blue radius so the essence of blu-ray this is that instead of using a red color ray a blue color ray is used instead and the difference between the two types of rays is that the blu-ray it has a shorter wavelength shorter wavelength this means that the land and the pits they can be more concentrated there can be more pits and lens in just one centimeter meter square and the shorter the wavelength what they say is the laser light the greater the storage capacity of the medium and this blue radius will automatically come with secure encryption system to help prevent privacy piracy and copyright infringement and the data transfer for blu-ray is also faster okay and it can be single layer or a dual layer and here are the this size capacity for c dvd and blue radius it's a big difference that wise blu-ray discs are usually stored used to store high quality movies all right and that's the type of memory which we call the optical media we have the city dvd and the blue raiders so the fourth type of memory is a little bit tricky to understand it's called a virtual memory it's called virtual because it's not a hardware component but something that computer scientists use to make up of the lack of ram storage so part of the memory okay when do we need a virtual memory the scenario is when the processors run out of memory imagine that you have a lot of instructions to be run you have you want to run many programs at the same time but you just you have only very little ram and that will cause the ram to be insufficient and here they say if the amount of available ram exceeded due to multiple programs running it's likely to cause a system to crash this can be solved by using the hard disk drive or ssd if we need more memories so what do i mean by that imagine that we here we want to run five instructions but we only have four available slot in the ram all right in a ram so this means that the fifth instruction cannot be run first but we need a place to store the the instruction right therefore what virtual memory does is that we try to allocate part of the ssd or hdd or secondary storage to store what is supposed to be stored in the ram okay so imagine that each instruction is being mapped to a ram already and the one that doesn't get allocated will be stored into the hdd and ssd instead okay and virtual memory now will move the oldest data out of ram if and the hdd allowed program 4 to gain access to the ram in other words they kind of swap the instruction which can use the ram so for instance this the instruction 0 initially is using the ram for now it is being stored to the hdd and ssd so that instruction number 5 can use the ram slot here and this exchange will keep happening to make you feel like you have unlimited ram in your computer all right so that's um the essence of it i won't read this but um here's another term called this thrashing problem which means that if the all if what the computer does is just keep moving instruction around without doing anything this will make your computer very slow and this is why in our previous section we talked that we say that if you have more rams that would be better because virtual memory wouldn't be needed so often okay so that's the benefit of having high storage ram the fifth type of storage that we will learn the last one is called the cloud storage right a method of data storage where data is stored on remote server that means for instance your google drive your dropbox so instead of saving data on the local hard disk drive a user can save their data in the cloud instead okay so the advantages here are some of the advantages and disadvantages and the advantages is that it can be accessed anytime if you were to store your storage in a cloud it can be an access whether or not you bring your computer and as for the disadvantage um it would be that if you don't have a good internet connection then you wouldn't be able to access the data and the other advantage of cloud storage is that there's no need to carry an external storage because everything is stored on a cloud and the disadvantage is that cost can be high and the cloud storage provides the user with backups of data to elevate data loss and um the setback of cloud storage again is that what if the server goes down and this will result in the the data being not being able to be retrieved so that's all about the storage chapter we learned what primary memory is secondary memory and also optical media virtual memory and last but not least cloud storage and in the next video we are going to talk about what network some of the network hardwares and i'll see you there goodbye hello everyone welcome back to this channel so in this video we are going to look into what are some of the network hardwares and in the world right so here are the two network hardwares first one is called the network interface card it is you needed to allow a device to connect to a network such as the internet we'll definitely talk more about internet in chapter 5 but in this video we're just going to talk about what are some of the devices hardware that's needed to allow a computer to connect to the internet and this is one of it the network interface card which is usually embedded into your computer okay so they are another form of network interface card which is known as the wireless network interface card they use wireless connectivity using an antenna to connect with the internet while you microwave okay so what is let us introduce the concept of an ip address okay so an ip address is an address that is given to a router to a router when it connects to an internet this address is needed so that data need data knows where it is being sent to just like how you order something on the web and address is needed to know where the item needs to be sent to all right when a device connects to a private network like when a device your smartphone your laptops when it's connected to a private network a router will assign a private ip address to it okay so imagine this is the ip address of the router and with devices connected to it they'll be given an an iep address private ip address and this address is unique on the network but might be the same on as an ip address on a separate network all right so this is the format of for for an ip address all right this is for ipv4 each digit ranging from 0 to 255 if you remember what we learned in data representation we only need 8 bits to store this data and this each digit is separated by a dot and we'll have more than we have 4.3 billion combinations all right which means from zero um let me use another color from zero zero zero zero until two five six two sorry two five five two five five two five five we we will have in total four point three billion combination if you were to apply permutation to it all right and these value can be applied can be represented in hexadecimal too so um another form of format of ip address is called the ipv6 it is basically a longer version of the ip address in which each value ranges from 0 to 65 thousands um it's a lot more as compared to ipv4 and each digit uses 16 bits separated by colon instead okay um if you want to count how many combinations you can try to type in your calculator 65 000 to the power of 8 and see the value that you have okay so um the in in my class i asked my students what are some of the reason that ipv6 is needed if we already have ipv4 so here are some of the answers it reduces the risk of ip address collisions imagine this in this world there are tons of routers outside out there so we don't want them to have the same address that's why computer scientists expand ipv4 to be ipv6 and ipv6 also has some authentication check in which um it store additional value to check whether the values legitimate and another thing is that ipv6 has been designed to allow the internet to grow in terms of the number of hosts and potential increase in the amount of data traffic that's what i have been saying because the risk of collision decreases um that means more hosts can be created so there are two types of ip address the first one is called the static static ip address are permanently assigned to a device when they buy the internet service provider they don't change each time a device log into the internet it's used by remote server which are hosting a website or a online database it's allow faster upload and download speed all right so that's for static the other one is more flexible which is the dynamic ip address it is assigned by the isp each time a device logs into internet all right that means each time you are connected to the internet you get a different ip address all right um the advantage of it is that they provide greater privacy since they change each time and user login no one can track your ip address down because it keeps changing and here's the diagram so um of what happens behind who when we type in something into google so before you access the website before you access the website this device will need to go through an additional step to know okay what is my ip address to the dhcp server and this server would then send a dynamic ip address back no do know that this ip address will be different for the dynamic ip address um each time they use a lock into the internet okay and as for the static ip address um it it just doesn't do the first step because for the device it already has a fixed ip address so that's static the difference between dynamic and static ip address so we know that each router will have a unique ip address but we also know that multiple device can be connected to this router at the same time all right like that so what happened what we are concerning here is that what if a data reaches the router following the ip address how do we decide whether this data should go into computer a or computer b or computer c okay and therefore we need another address to uniquely identify a device which is called the mac media access control device it is used to identify a computer on a local avery network so what we have here is a local every network they all connect to the same router and this mac address will be used to identify which laptop needs to receive the data and like just like ipaddress they have a format here each digit is represented by hexadecimal and if the nic card is replaced the mac address of the device will also change um feel free to check what your what is the mac address for your device um i'm pretty sure you can get it um using google so um so that's mac address it is used to uniquely identify a device on the local area network and as for the router here let's move on to the router we'll just talk about some of the functions the function of a router the first one is that it enables data packets to be routed between different networks so um which means if i have i'm at location a and i want to send some data to location b um this data can will be directed by the router back to the right place okay so that's um what the router does the second function is that they take data transmitted in one format from a network which is using a particular protocol and converts the data back to protocol that that is understood by another network therefore it allows um the different computers to communicate that's also what makes the internet work and the third one is that since every computer on the same network has the same part of the internet address which means each device they have the same ip address therefore the router is able to send data packets to the appropriate switch and the data will be delivered to the correct device using the mac address that's how we identify whether this message should be sent to computer a or b we use the mac address and that's all about network hardware and it's also more everything about chapter 3 i hope you learned a lot in in this series of videos um that's the end of it i'll see you in the next video thank you