Introduction to Microprocessors | Bharat Acharya Education

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so in today's video we're going to learn the basic introduction to microprocessors okay you may be learning 885 microprocessor or 8886 or any microprocessor or a microcontroller the basics of processing remain the same so uh i'll tell you something about this subject it's my favorite subject when i was doing engineering it's been 18 years i've been teaching since this subject since 18 years uh the opinion that i always get i want you to listen to this okay uh the opinion that i always get from students is before they start learning the subject many students say this is the toughest subject of engineering it's not it's probably the most interesting subject of engineering you're going to love this subject if you understand it the right way i'll tell you why people find this subject tough because they try to learn big things without having their basics right so that's the point of this whole lecture now this lecture when i take in the class i take it for three hours i'm going to compress it try to fit it in 45 minutes maybe an hour at the most but we'll cover all the basics that is required a foundation that needs to be laid you want to learn big things your basics have to be right so i'm going to start with basics give you an idea what this whole subject is all about so that you can start learning i would suggest in case you come across this video by seeing other videos of mine i would suggest first of all watch this video completely before you start watching the bigger topics it will give you a very clear picture sometimes when i have uploaded architecture and other videos the bigger ones and students ask questions when you look at those questions i feel you've got to be really understanding the basics first otherwise these questions will never come up these questions only the silly doubts i won't say silly but innocent doubts because you don't know the basic concepts okay so let's start uh before i teach anything the first thing i always tell students is you should know why you're learning it if you know why you're learning anything the whole interest level increases and it just things don't just start making more sense so why are we learning microprocessors such a big subject that you're going to learn why are you spending that time are microprocessors used in the world they're used everywhere everywhere around you in fact between you and me right now all the various devices from the one which is shooting this video till the one that's going to be uploaded and so all the routers the servers they all use microprocessors so that's the only reason why you and i can right now uh communicate with each other uh so where do you require a microprocessor is there a new p i'm going to call it a mup in short is there a new pea in a fan no in a tube light no in a remote control yes in a mobile phone yes in a computer definitely yes so where do you require a a muppy is used let me wear come on tell me why do you not need a muppy in a fan why don't we need it in a tube light why do we need it in a computer what is it that a computer or phone or a remote controller does which a fan or a tube light doesn't do programming wherever programming is involved get this clear if you want to do programming you need a processor the only thing on this whole planet that can execute a program is a microprocessor so all the programs that you have written in life and which you will write eventually they will all be executed by some of the other microprocessors so from now onwards whenever you see devices around you in your day-to-day life and you feel there is a program running this device instantly realize there will be a microprocessor or a microcontroller they're just two sides of the same coin there will be a processor inside okay that will be executing those programs now coming back to your fan why doesn't it need a mup because there's no program involved in it you switch on the button it starts you switch it off it stops yeah the remote control fans then the remote receiver will require it but i'm talking about the normal low tech the normal devices that we see around same goes with the tube light and on the other hand if you look at this uh remote control is programming involved of course it's not magic i press different buttons different things happen to the air conditioner so first of all there is a program that reads which key is being pressed then sends appropriate data through serial wireless communication the receiver receives it sees the data understands which button was pressed and does the appropriate action all of this requires programming so here and the receiver in that ac both of them require a microprocessor to send and to understand what's going on okay now the simplest example oh there's so many this this billions and billions of microprocessors used all over the world if you think of a traffic light come on since childhood you've been looking at traffic lights in school you've been taught red weight yellow start moving green yeah now it's the time to go uh anyway uh so uh when you look at the traffic light not as a layman as an engineering student you should realize this is nothing else but a program what is the algorithm of the program show red wait for some time show yellow wait for some time show green wait for some time put it in a loop am i right or not so if there is a program that means that traffic light has a microprocessor if you go to a railway station you see an indicator telling you what rain coming at what time inside a train you get those messages the next station so and so all of those are programs and all of them are executed by processors now what we see the most massive biggest use of a processor we see it in a computer now suppose today you go and buy the latest computer in the market which microprocessor will you find inside yep good intel core i7 or an amd processor in case you the you use you're familiar with the amd family but what's used most often most people in the world use intel processors so let's say you have a core i5 or a core i7 or maybe a core i3 processor so are we learning those processors right now no no you don't start learning with those processors those are a result of 40 years of tremendous development and technology we start with some most basic microprocessors most people in the world who started learning new p they started learning either with 885 or with 8086 they were such well crafted processors and they were the initial commercially successful processors so let's let's give you a small piece of history very small not too much into it uh the first complete commercial successful microprocessor made by intel was 885 before that there were various attempts the closest one was eight zero eight zero just it didn't have a stable voltage so it was requested to eight zero eight five with a five volts power supply not getting into that i'm not getting into that i'm just telling you so the first complete new p was 85 but it was not very powerful it was just a basic it was the first step baby steps taken by intel to explore the world of computing then came a remarkable processor 8086 eight zero eight six chain the face of this planet single-handedly eight zero eight six intel combined with ibm uh made the personal computer ibm pc and then it just took off then there was no turning back apple came into the picture uh microsoft came into the picture good operating systems game processors became more and more powerful so every three years new processor three four years new processors were being released they are all intel processors so km80186 they all called the eight six family two eight six three eight six another benchmark processor eight zero three eight six got in some really cool concepts in computing uh whenever you learn it you'll come to know mind blowing processor eight zero four eight six marginal improvement eight zero five eight six again this is what made computers a whole household name eight zero five eight six is also called pentium one officially released in 1993 beta versions earlier but anyway with pentium one computers uh started engaging in multimedia tremendously because of the power of pentium and that's when people started realizing that computers cannot be used only for boring things they can also be used to watch movies uh play good high quality video games and stuff like that so that's when the the the commercial and the entertainment angle came into picture anyway then came pentium 2 pentium 3 pentium 4 in the beginning of this millennium year 2000 code to do another benchmark processor around 2004 core i7 2008 9 and still going on further generations of it so this is where the world has reached today and this is what you would be studying when you start learning if you're watching this video this is what you'll be learning anyway so uh the moment somebody sees this they think what rubbish is this the world has gone so far ahead why are we wasting time you're not wasting any time you can't learn poetry if you don't know basic grammar if you don't know abcd yeah your goal is to write poetry but for that you have to do the effort of learning basics first same goes with processors they are far more complex than writing poetry i'm not saying that is easy but these are far more complex and far more technically developed so to learn all these powerful processes you need basic processors like ada d5886 any one of them you need thorough knowledge of them before you can launch yourself to learn bigger processors now where are they used 888586 are not used in modern computers modern computers have become way too powerful people do wonderful things using their computer which i will not even get into that's your personal computer do what you want my point is to do all those things which you started imagining already you need good powerful processors come back to the point please you need good powerful processors so for that you need something like these these ones okay so this is what most people use today and we'll be using for a long time even now because they're pretty good processors anyway so where are 8085 8886 used now intel as such is no longer interested in manufacturing these processors it has outsourced the license the architecture license to other small companies they make processors of the same grade as 808586 and so on not exactly the same numbers but processors of the same grade of the same category they are used in mass volumes in small basic applications that's where microcontrollers come into picture they are of the grade 8851 etcetera they are of the grade of 8085 but they are not add five as such the same grade so where are they used something like a traffic light like i just told you a traffic light you're pretty sure by now a traffic light works on a program if it's a program that means there has to be a microprocessor you think those traffic lights have a core i7 inside or a code to do your railway your that message that comes with sometimes very annoying the next station the next stage very informative of course also so do you think that has a core i7 or a pentium inside no it doesn't need something like that something as basic as an 80d flower and edd6 will do the job if you look at this remote control there is no way there will be a pentium processor inside or anything of that sort because it's not going to run windows it's not running android it's not running ios or mac it's running a basic program to just see which button is pressed to do something like that you need basic processors so please do not think that the processors you are learning are outdated they are not outdated they are still very much used yeah you will not if this remote control breaks and you see the processor inside if the number is not eight zero eight five don't be surprised it may not be the same number but if you ever learn its architecture you'll come to know it so the same grade of 88 and 886 anyway so you're learning them because they're used in the world and as i said to learn bigger processes you need to know smaller ones now those were numbers starting with some concepts i'm going to start with basics the whole idea of this video today is to cover your basics okay so it's going to start with a very at a very basic level but do not make a mistake of thinking that it's too basic it's not soon before you realize new concepts will start pouring in from every direction by the time we end this video you'll have a fair enough knowledge of what microprocessors are you could directly start watching architecture immediately after this okay so it may seem very basic in the beginning but it will not be at that level throughout okay now suppose you look at a computer you have a computer in all probability right now in front of you unless you're watching this on a ipad or a phone or whatever if you're looking at a computer there's so many objects in a computer where does the microprocessor fit in let's see you have a keyboard and a mouse the keyboard and the mouse are called input devices you may understand obviously this is stored in school keyboard and mouse are used to give inputs to the system are they required yes are they running our programs no if i want to add two numbers is the keyboard adding them no is the mouse adding them no but are they required yes to give the numbers inside so their job is to give inputs similarly printer and monitor what are they called output devices their job is to give outputs neither is the printer adding the two numbers nor is the monitor adding those two numbers monitor is not deciding what has to be displayed it is just displaying it just i will i will teach you that soon printer is not deciding what has to be printed it is just printing they just get a bitmap file which they just plot ink or plot colors on the screen and that's how you get outputs they don't decide anything all that decision making happens inside that big box called as a cpu i'm sure you know that okay now when you open a cpu you see a motherboard i'm sure you've seen it if not you can check out any video about it you need to know how motherboard looks like not that your aim is to uh assemble them i mean you could but not that most people want to do that but you need to know i mean come on this is the things that a person for the sake of general knowledge or whatever at least you should know how it looks like anyway so when you see a motherboard right in the middle you see a big fat chip the size of our arm you will not be able to see it directly it'll be covered with a heat sink or a fan if it's a better better motherboard modern motherboards have a fan earlier motherboards used to have a heat sink because the device gets heated very much you unhook the fan and underneath that you'll find your microprocessor that is your intel core i7 if you're using an i7 processor so that's where your mewp is in the scheme of things in your whole computer when somebody sees a computer they see the big thing when an engineer looks at it get the plastic out of the system all that you're seeing is basically your processor and input output devices and some storage now the same thing same thing i have put in a small diagram throughout learning this subject we keep referring to this diagram again and again and again okay so this is your computer system i made a simple block diagram of that whatever you see on a computer can be broadly classified into one of these three sections this section is called the i o section i o stands for input and output i repeat its purpose is only to give inputs and produce outputs it is not doing any processing are we clear the device is a keyboard mouse printer monitor etc you know input output devices very well they give inputs and they produce outputs there is a big section inside a computer where all the information is stored stored what do you call this section memory i will be discussing memory a lot not in this video i would love to but then it will become too long a video to understand and we'll be deviating from the main concept of learning processes but i promise i will be making a video covering the basics of memory memory itself is a huge it's a subject by itself okay so to cover its basics itself would need about an hour or so if you really want to understand what memory is but i will give you a brief idea though so what is memory memory is used to store okay simple does the memory do any processing no do songs or movies stored inside your computer change as much as you'd want to they don't so memory cannot do any processing it's just used to store store what it stores programs and it stores data i repeat everything there are thousands of files inside your computer's memory in your hard disk everything stored in the memory is either a program file or a data file have i made myself clear you either have programs or you have data let's take examples you have word microsoft word what is word it's a program the documents that you create out of it are the data you have whatsapp in your phone what is whatsapp an application it's a program the messages that you send are data your camera app is an app it's an application means it's a program the images that you want clicking on the videos which is being recorded right now is the data okay the sound player that you use vin amp or whichever song player real player microsoft music player app whichever one you use that is a program and the songs are the data your image viewer is a program the images are data and so on so i can i can go on the whole day about it i think you got my point so everything inside your computer is either a program or it is data they are all stored inside the memory for the last time what does memory do it stores nothing else it just used to store now when you say the word memory lots of devices come to our mind you don't know how much i'm controlling myself i would just take a plunge into the whole thing but i'm not lots of devices come come to my mind hard disk floppy it's outdated but it used to be there uh cd dvd which are almost outdated now and drives very much there uh cache memory i'm sure you heard of it ram rom etc so there are numerous types of memories now most of the memories that i spoke about right now fall in under the category of secondary memory they are only used for secondary storage they are not used to work on they are just used for storage the work happens on primary memory okay these things you'll understand when you watch the video of memory but i need to say this over here otherwise people start on the wrong foot they start thinking of wrong things the processors that we start learning from 8085 8886 they were made in 1970s secondary memory was non-existent at that time okay towards the end of 70s it started but at least when these were made at that time it was not there secondly memory was invented much later to increase the background storage what computers needed mostly at that time was basic primary memory so if you're learning 8085 or 8886 the word memory for you is primary memory primary memory means ram and wrong so i will not repeat this again and again when i say the word memory throughout learning 8085 and 8886 when you say the word memory you are talking about ram and rom are we clear about this nothing else the only memories that we are interested in is primary memory that is ram and rom out of which rom you i'm sure you know what is ram and rom rom stands for read only memory you can only read you cannot write so it is permanent so it's used for permanent information ram is random access memory you can read and write both it is volatile so it's temporary but you can read and write if you switch off the computer the contents of rama erase so it's wiped out so it again becomes fresh every time you start again whereas the contents of rom they are permanent rom information in rom is stored like the print in a hand it is etched inside so it will not change so it doesn't need power supply to hold it whenever i look at it it will be the same but i cannot change it it is permanent whereas information in ram is changed at a day-to-day basis at a runtime basis so what a computer uses is ram and rom as primary memory out of which rom is used only for a few permanent programs called a bios whenever you learn memories you know mainly when you say memory you're talking about ram okay so when i say memory it is in your utmost interest to keep ram in mind okay when you say memory when i'm sure even your phone when your phone starts behaving very slow you do some checks on your phone and see how much memory is remaining what memory are you talking about you're talking about your ram okay the 4gb ram or the 6gb ram that your phone has or 2 or 3gb ram it shows you how much is used how much is remaining when you kill the apps when you kill the currently used apps your amount of memory storage increases free memory storage that means what those apps have been removed from the ram they go back into secondary storage which is basically a flash card in your phone see as i said i will go on getting into it this lecture is not about memories i will take a separate lecture and i'll go complete in depth show you the whole idea i would love to do it in the class i do it together because we have three hours over here it'll just be too long a video as a single video in the class i can hold attention of every student here if you start wondering here and there's nothing i can do about it that's why i want to cut it short i will put a separate video for that now coming back so memory is used to do what store store what programs and data now how does data look like data can be boring numbers data can be text it can be images songs videos what do you want to know how do we store a movie or how do we store a song or an image you tell me you choose the option and i will answer what do you want to know first how to store a movie or how to store a song or an image or word documents if that's your thing [Music] none of them if you are thinking how to store a song you will not learn anything because a song is not stored as a song a movie is not stored as a movie an image is not stored as an image everything is just stored as a series of millions and billions of zeros and ones get this clear this is your entry point i am opening the gate of this subject to you once you understand this sentence you will take the right track to learn the subject in our subject everything behind me in that diagram in that system is just zeros and ones is that clear i'll tell you i'm very sensitive when i explain this point because it's straight out of personal experience first semester of engineering right after 12 standard about 95 percent and 12th uh had big dreams about learning wonderful things in engineering which of course got fulfilled also but uh i got a shock as well i'm from the era where we move from audio cassettes to cds so uh i've always been very interested in music first day of the class i asked my teacher how is a song stored in a cd and the answer that i got was answer that probably motivated me to learn all this in much more detail the answer was don't ask stupid questions this is not your subject so uh the mistake was mine it was not the teacher it was my mistake to ask that question the question is the wrong question if you ask how to store a song in a cd no a cd doesn't even know that it's storing a song the same cd when you buy a blank cd you can store a song in it you can store a movie in it you can store whatever you want to do with it it is not created to store a song it is just creative source heroes and ones so get this picture when you buy a pen drive today while buying you don't make a promise i will only store songs you can store what you want you store a song erase it store a movie raise it store boring word documents so what you feel like so when you think of memory you want to understand memory don't try to understand how to store those things just understand how to store a zero or a one once you understand how to store a zero or a one you know how to store anything just combine millions and billions of those whatever you want can be stored now we were talking about ram there are two types of rams in the world they are called sram and dram sram stands for static ram dram stands for dynamic ram there is a new ram called sd ram that is called not static dynamic it's called synchronous dynamic ram people think it's static dynamic can't be they're two completely different technologies you can't mix the two anyway so it's also a type of dram so there are two types of rams now static ram is tremendously fast as compared to dynamic ram i'll give you the reason also in a minute most computers use majority of dynamic ram and a small amount of static ram called cash not relevant in 188586 cash was not even invented in these days the problem is today because there is so much flow of information students hear the most latest technology and they try to search for it in 1885 it cannot be you cannot look for cash and europe so that's why this i'm just trying to erase all the unnecessary things so that you're on the right track okay so for us there is no cash for us in our subject there is no real difference between sram and dram except for the last lecture when you try to do interfacing then there is a difference but otherwise throughout learning the subject makes no difference whether the ram you're talking about with sram or dram i'll tell you what is the difference between the two just out of in case you're curious uh so you're talking about storing images or movies whatever how do you store them zeros and ones how does a movie or an image become zeros and ones suppose i start my phone and i start my camera yes it's the 10 yeah so uh suppose i've taken an image right now right now in front of you i captured an image that image is stored in my phone's memory i hit on the image that image is back on the screen now you tell me uh what was stored inside this beautiful image that you see you think this image was stored inside like this no what is stored inside the computer's memory is zeros and ones now how did this image become zeros and ones and how did zeros at once come back and project this image how did that happen and that too so fast when i start clicking the image when i open my camera the screen is divided into rows and columns giving you small small intersections called pixels picture element in short combined together pixel picture element okay so there are numerous pixels they are rectangular in shape not squarish because our vision is also rectangular the way it is shaped anyway anyway i'm not getting to graph excited graphics also not getting into that so so the screen is divided into small small tiny rectangular shape pixels okay when i hit capture which means i want to capture the image what defines this image the color of all the pixel am i right i don't know what am i seeing on the screen therapy cells and each pixel has a color it may represent a classroom it may represent your favorite movie star doesn't matter it just pixels with colors on it so when i hit capture the processor captures the color of all the pixels and stores it as a file when i want to project it back on the screen it divides the screen again into same number of pixels one by one starts projecting all the colors and yo the same image comes back on the screen please tell me did you understand this much so what do you understand what was stored inside the memory the color of all the pixels so there are two questions over here first should there be less pixels or more pixels obviously more pixels more the pixels tinier will be each pixel come on it's so easy to understand that the same screen divided into four pixels each pixel will be so big divided into four million pixels each pixel will be so small what do you want to do suppose you're taking my picture you want and suppose a single pixel represents my face a single pixel you wanted to capture the color of this pixel how can there be one color there are so many shades happening over here how can you capture one color now when you project it back it'll just be you know what i'm talking about look like a cartoon's face you will not see real colors at all you will not see this whole shading so for that you need to have tiny pixels smaller the pixel more is the detail the tiniest detail you'll be able to capture there is a difference of color between here and here and here and here and here you'll be able to capture all of that so that's why cameras have more and more pixels that's the difference between a five megapixel eight megapixel 10 megapixel and so on megapixel camera more the number of pixels more is the detail captured of course there's a trade-off to it the more is the processing required and i said i'm not getting an image processing just telling you what's the meaning of megapixel cameras and what is pixels so again what was stored inside the file the color of all the pixels so first thing that we've established is there should be lots of pixels secondly how do you store the color are you going to store it as names red yellow light pink baby pink navy blue no no you're not going to do that you're going to have numbers for every color numbers representing colors okay now suppose i am storing here this very clearly suppose i am storing one bit per pixel for every pixel i'm storing only one bit now a bit can be just a zero or a one that means it can represent only two colors a black or a white so what happens you've taken my the photo photo of my face all of it is not black all of it is i'm not please let's understand what i'm trying to say all of it is not black all of it is not white you cannot and it's not exactly black and white there are so many shades happening if you try to project it back what you'll get is patches of black and white which will look basically like the cartoon face that used to make when we were children that circle with the line representing the nose and two dots and two dots for the eyes two lines for the eyebrows two lines for the lips it's going to look like that all this detail that you see will not be there at all so where did we go wrong we went wrong thinking that we will have only one bit per pixel now instead of one bit if for every pixel we have two bits what will happen you'll get zero zero zero one one zero one one two bits will give you four options you understand that so that means now you can store four different colors zero zero four pitch black one one for pure white and there'll be two shades of grey a lighter gray and a darker gray so then what happens now when you capture it and project it back you will be able to see some kind of shading it will still look very ghostly but it will be better than what it was earlier and now you have got the idea how to make it better put three bits per pixel what is increasing size of the file it doesn't matter what are you getting clarity put three bits per pixel you'll get eight shades of gray you'll be able to differentiate this whole region not comp as as beautifully as you can see it right now but yes you'll be able to create shades four bits you will get 16 shades now what do you do with 16 shades of grey i said 16 you start putting colors so uh you'll have 16 colors this is what c programming does if you're done graphics in c programming you have 16 colors 0 0 to 15 0 representing black 15 representing white and then different colors so you'll be able to get a colorful image but again those colors are not the same as colors that you see over here you can see so many shades of brown you'll get one or two browns it's like a sketch pen set with 16 colors in it come on how beautiful can you make an image out of that there will be distinction there will be there's something called mac bands in uh graphics you'll be able to see bands you'll not be able to see so many shades so what you need to do is tremendously go on pumping more and more bits per pixel so let's take a big leap if you have 16 bits per pixel per pixel you have 16 bits representing color you'll get 2 raise to 16 2 raise to 16 is six five 65 three six sixty four k so you get sixty four thousand colors simply speaking how many colors sixty four thousand you would say they are not sixty four thousand colors correct there's four those the same uh sixteen colors sixty four thousand divided by sixteen is four thousand so for the same 16 colors now you have 4 000 shades when i say brown i have 4 thousand rounds when i say blue i have 4 000 blues now you'll be able to represent shading see that is called 16-bit color coding then comes 20-bit 24-bit true code and so on and so then becomes hd and high quality images what happens i'm sure you have downloaded high quality images at home i'm sure you do that everybody does that for the wallpaper you want the most beautiful image on your screen when you do that you notice those images are so good no matter how much you zoom they don't crack and they're just so pleasing to look at in the eye what is the trade-off what is the flip side to it the size of the file is humongous a normal image file should be a few hundred k maybe one mb or two mb at best but these image files go up to five six seven eight and be bigger than the size of a song why is that so because of two reasons which i've already explained to you first there are more and more pixels second each pixel has lots and lots of bits to represent color that's how the image becomes so big but my point over here don't deviate from the point my point here is no matter how beautiful an image is at the end of the day it is just a series of zeros and ones the next time you look at your beautiful wallpaper understand what you see is not what is there inside what is there inside is just zeros and ones yes it represents it this video that's coming to your house is zeros and ones okay anyway so an image i think by now you've got it clear an image is just a series of zeros and ones so can a video be a series of zeros and ones of course what is a video continuous set of images happening so fast that because of persistence of vision we think it's continuous otherwise it's actually frames 30 frames per second 60 frames per second depending upon the recording speed anyway so a video is just a bigger series of zeros and ones that's why video files are much bigger there are a few gigabytes going up to depending on the length of the video because the video because the file anyway audio again with one bit sound you can get two sounds with two bit sounds you can get four sounds with three bit sounds you can get eight sounds and bigger the more the number of bits more is the clarity because the file size you can download the same song for 4 mb the same song for 8 mb 12 mb because there are more and more bits used to put the sound so that you get more and more clarity anyway so my point is all media in the world which may be very wonderful to look at or listen to is just zeros and ones so if you want to understand memory you don't need to understand how to store a song you need to understand how to store a bit once you know how to store one bit you know combining millions and billions of those you can show whatever you want to have i made myself clear that cd which is 700 mb in size 800 mb in size uh stores 800 million bytes each byte has eight bits so multiplied by eight those many million bits zeros and ones what do they comprise what do they create it may be a song it may be a movie doesn't matter so the question again comes back how do you store a zero and a one we are talking about ram i said there are two types of rams sram and dram what's the difference sram stores data in flip flops dram stores data in capacitors students start they start losing it how did a song get into a flip flop how did a movie get into a capacitor no a movie is not getting into a capacitor a movie is represented as zeros and ones all that a capacitor does a single capacitor does is you can be charged it can be discharged when i charge it i'm holding it as logic one that five volts is treated as logic one when i discharge it it's treated as logic zero if i charge the capacitor it will hold the charge of course there is refreshing required but assuming that the refreshing is there it will hold the charge when i discharge it it will hold that discharge that means i can store a logic one a logic zero whenever i want i can make it one again whenever i want i can make it zero again that means i can write this data now combine millions and billions of these capacitors you can store a movie did you understand this same goes with the flip flop simplest flip flop sr flip flop or a d flip flop whichever you set it you reset it if it's an sr flip flop you set it it holds a one you reset it holds a zero you can set it again you can reset it again that means one flip flop can hold one bit combine millions of those you can store a song billions of those you can store a movie that means if you want to store information inside the computer and change it at runtime you either need to use flip flops or you need to use capacitors those are the two types of rams one ram uses flip flops one ram uses capacitors now which ram will be faster the one that uses flip flops because capacitors take their own sweet time to charge and discharge which i'm sure you have done sums of if you reach this level in science i'm sure you cross the initial parts so you know capacitors have a charging time and discharging time and when you talk about millions of capacitors being charged and discharged the time gets multiplied in a much bigger way so dram works clearly much slower as compared to sram but it's also much cheaper so that's why computers have a good balance of dram and sn my point is i hope you understood what is dram what is sam what is uh memory what does memory do memory is used to do what store store what zeros and ones and those zeros and ones give you files those files can be data files like songs blah blah blah or they can be program files now let's talk about program files before we go ahead this is your memory it's used to store this is your i o it gives inputs produces outputs till now this lecture is supposed to be introduction to processors till now i'm not even started about it because first you needed some background here is your processor look at the diagram immediately get a point without my help come on get a point by yourself there are three objects on the screen there are only two links between the processor and the memory and the processor and the i o what does this mean processor controls the memory processor controls i o memory and i o do not control each other which is so obvious to understand if that was happening then information stored inside your computer will directly start coming on the screen without your knowledge may even get printed may even go out and be sent to your friends without your permission obviously that's not gonna happen everything is controlled by the processor okay now we said the main job of a processor is to execute programs so now let's talk about programs what is the program a set of instructions where is the program stored memory you type your program on the keyboard i'm sure you've done some program or the other at least add two numbers i'm sure you've done more than that of course so if you type your program on the keyboard when you type yes you're using the keyboard to type it is it getting stored on the back side of the keyboard no way the program is getting stored in the memory now your program is stored ready for execution you hit the execute button what happens this means on your phone you hit an app that means you say you want to execute this app that's what i'm saying so what happens instructions are stored in the memory who has to execute them the processor what will it do it will first of all take an instruction inside that taking is called fetching so the first thing a process processor has to do is fetch instructions instructions are stored in the memory they're executed by the processor whether it is 8085 or whether it is core i7 the first thing it has to do is fix the instruction are we clear so it will fetch the instruction from the memory now the instruction has come inside the processor now what do i do execute the instruction no between fetching and execution comes a step called decoding i had a specific risk request by this gentleman some i think somewhere in france asking me to make a video on what is the meaning of decoding that comes in a subject called coa compute organization architecture i t stat subject to and i will be making videos of those in some time right now i'll give you a brief idea what is decoding just in a nutshell this is an introduction video okay but if you apply your mind and you get this you understand this you'll be able to understand decoding at any level then it just becomes bigger and smarter but the basic concept remains the same now what is decoding people think decoding means converting the instruction into zeros and ones no that is not decoding the instruction already is in zeros and ones come on my friend i've spent 20 minutes to make you understand something don't let me down now everything stored in the memory is zeros and ones your program when you typed it yes you didn't type zeros and ones of course no human being type zeros and ones that's machine language that's why it's called machine language you type beautiful languages you type something like a is equal to b plus c this is the syntax of most modern languages c c plus plus java etc they are called higher level language they are the easiest to understand and come on you don't have to be as rocket scientist to understand what happened over here a gets the result of b plus c it's directly derived from the way you write english or mathematical statements so that's why it's the easiest language so most people who know programming in the world they know this level of programming then people who learn this beautiful subject learn a sub-level called assembly language all core programming of our subject is done in assembly language it is a little more tricky than this but still understandable when you write add b comma c pretty much simple you adding the value of b and c registers you know you you learn what are registers that comes later in the architecture lecture i've explained that anyway so add b comma c will add the value of b and c if you're learning 8086 the registers will be called bl and cl if you're learning some other processors the names of the registers will change if you're learning 8051 it'll be r0 to r7 a etc anyway so this is higher level language this is called assembly level language and the lowest level lower level language also called machine code also called object code also called binary language is zero one one zero one zero one one i've just written a random pattern do you write this language no why because you have an attitude problem no because it is cumbersome it is you think people who are who pay you such big salaries because you're a software engineer that's because in the office you're gonna type zeros and ones no no human being types this it's cumbersome it's going to create a lot of mistakes it's going to waste time what's the point so we write better languages either higher level language or assembly level language when we type a program in higher level language we give that program to a compiler if we type assembly level language we give that program to an assembler i am sure you know these words a compiler will compile the program what does that mean i've asked this student to question to students during interviews and i've been appalled at the answer students gave like come on you finished engineering applying for a job interview and this is the answer you want to give when you ask a student why do you compile a program they say to check for errors come on your interview will get over that very moment and you'll be sent back home you don't compile a program to check for errors you compile a program to convert it into machine language yes if there is an error it cannot be compiled so it throws up an error but the purpose of compilation is not to check for errors the purpose of compilation is to convert it into machine level language so that can be executed by the processor are we clear so when you compile a program it becomes binary language your c file becomes obj file in case you familiar with c programming anyway anyway uh similarly if you type your program in assembly language you give it to another software called assembler if you've started programs in college if in 80d6 you type a program you save it as dot asm that means it's assembly language as of now then you use tasmasim or any kind of assembler that gives you dot obj that means it's been converted to machine language so a compiler or an assembler is used it's a software it's a program it's used to convert it into machine language are you clear my point is whether you type your program in higher language or in assembly language simply for the sake of convenience when it is stored in the memory it is in binary form who put it in binary form not you either the compiler or the assembler depending on which language of programming you've done has converted it into binary when the mu p is going to attack your program or fetch your instruction it will get it in the binary form so decoding does not mean converting it into binary it is already in binary have i made my point clear it is the binary form that the mup gets are you clear this binary form of an instruction is called the op code op code is a combination of two words operation code that means the binary code of the operation to be performed that means add instruction will have an op code subtract will have a different opcode multiply will have a different top code every instruction has its own unique op code say it again every instruction has its own unique upward so when you type your program the compiler or the assembler converted every instruction into machine level language and represented them as zeros and ones called their op codes are you clear when you say the processor has fetched the instruction what has it got it has got an op code are you clear a pattern of zeros and ones now you said after fetching we want to execute yes of course we want to execute but to execute we should we means the processor the processor has to first understand what has to be done it will look at that binary pattern and will make sense out of it that process is called decoding the technical definition understanding the op code i repeat decoding means understanding the upward making sense out of the op code it's called decoding not converting it into upward it is already in binary form it just has to be decoded now i'll show you decoding in the simplest form okay this is specially for that gentleman who had requested suppose there is a very basic microprocessor and it has four instructions just four instructions okay we're talking about a simplistic microprocessor in the world so it has only four instructions add subtract multiply divide since there are only four instructions there will be only four op quotes tell me do you agree since there are only four op quotes opcode will be of two bits do you agree correct since upload will be of two bits these will be the combinations 0 0 will represent let's say add 0 1 for subtract 1 0 4 multiply 1 1 for divide this is which language machine language this is which language assembly language you type your program in which language assembly when it is stored in the memory it is stored in which language machine language now are you understanding it the assembler converted this into machine language and stored in the memory so this is my program stored in the memory at different different locations okay these are addresses this is my program stored so this is my program zero zero zero zero zero zero one one can you please read it aloud and say what my instructions are say it loud doesn't matter if anybody looking at you who cares come on what are these instructions come on loud yes add add add divide what you did right now is called decoding you did it right now by yourself what did you do you saw this you came to this table you saw zero zero stands for add that means i have to add zero one is subtract blah blah blah so this is add this is add this is add this divide what you did is called decoding the same thing the processor also has to do when it fetched the instruction it got an op code it has ready-made circuits to do addition subtraction multiplication division that's in the alu which is the part of the processor okay so it has ready-made circuits to do it now which out of these circuits has to be triggered that depends upon what opcode has come so the op code has to be first decode it will put the oppo into a 24 decoder i'm sure you know what our decoders even if you don't just listen a two is two four decoder has two inputs and four outputs if it sees zero zero will trigger the first output if it sees zero one will trigger the next output and so on and so on so when it sees zero zero will trigger add the next one zero zero again add the next one zero zero again add the last one one one that means divide this process is called fetching this process is called decoding and then doing the final operation is called execution that entire process is called the instruction cycle the whole life cycle of an instruction first of all being fetched from the memory into the processor then decoding it inside the processor and finally doing the operation that's called execution please tell me is this whole thing clear now when you look at bigger processors what happens is decoding becomes bigger and bigger you understand with the two bit op code you had four combinations with the three bit of code you'll have eight combinations so you need a three square decoder four bit up code 16 combination four is to 16 decoder of course modern processors will not have four five tens fifteen instructions they have hundreds and hundreds and hundreds of instructions with multiple instruction sets you'll not know what i'm talking about as you learn pentium and stuff like that you'll come to know what what serger said anyway so with so many instructions you will not have a physical decoder like this this is called hardwired decoding then what we have is something called microprogram decoding beautiful things to learn but much ahead you cannot learn all of it in one lecture okay and that is not a part of this subject at all that is a part of subject called computer organization where you learn control units and you learn how they are made from inside very interesting but not a part of the subject i cannot read i i can't deviate from what i'm trying to make you understand here so i think by now you got my point what is the meaning of fetch decode and execute so like this one by one one by one one by one instructions will be fetched decoded and executed and the program will be executed please tell me is this much introduction clear now there's so much more on the board that i want to teach but for that you need to know a few basics first so first of all i want you to understand what is binary the concept of binary and hexadecimal numbers and also powers of two these are two things which i'll go on the other side and shift the camera and make you understand those then we will come back into this diagram okay now when you're learning our subjects of microprocessors and microcontrollers we only work in hexadecimal system every number written in these subjects is always in hexadecimal so students wonder why what was wrong with our good old decimal system why did we come up with this new thing it's a necessity we needed it see why uh the age-old system that humans were using and the one that you've been using since childhood is decimal system now in decimal a single digit goes from zero to 9 which means it gives you 10 different values tell me do you understand that much now inside the computer you know everything is just zeros and ones do you know this everything is stored inside a computer is in binary form so when i try to convert decimal numbers into binary i face a problem here is the problem what will 0 be in binary yes it's so obvious it will be 0 that's not the question the question is how many zeros how many binary bits do i devote to represent one digit if i devote only one bit it will have only two options zero and one i will never be able to represent 2 if i use 2 bits i will get 4 options 0 0 0 1 1 0 1 1 so i'll be able to go to 0 1 2 3 similarly if i use 3 bits i'll get 8 options 0 to 7 my problem is i want to go from 0 to 9 i have 10 values now to represent that 3 bits are not sufficient i need 4 bits tell me do you understand the point i'm making so far so far so students say what's the problem use four bits of course we'll use four bits so zero will become zero zero zero zero one will be zero zero zero one nine will be one zero zero one i'm sure everybody knows how to do this come on this is you you don't you don't wanna memorize their binary forms there is a trick eight four two one if you follow that like how which we have in decimal system units tens hundreds thousands similarly in binary they are all powers of two so two raised to zero two raised to one two raised to two two is three so if i want nine nine means i want an eight and a one eight plus one is nine so that is one zero zero one if i want four that is zero one zero zero if i want six there is zero one one zero uh if i want two that is zero zero one zero and so on i'm sure you know that okay so coming back to represent one digit i use four bits is this point clear now the problem is in four bits you can get 16 combinations you have used only 10 combinations so that means there are six combinations which are forbidden they don't have an equivalent representation in the hexadecimal form are you understanding the point i'm making so then what goes wrong if i try to do any arithmetic like simplest 8 plus 2 8 is 1 0 0 0 2 is 0 0 1 0 i end up with a pattern 1 0 1 0 which has no representation over here as a digit n in decimal form is written as two digits but i have got a single digit because i am using four bits to represent a digit so if i am using four bits i am sure i am going to get 16 combinations i need to name each of those combinations there came the need for creating a new system which has 16 representations please tell me is the concept of using hexadecimal numbers clear if you use decimal numbers you get 10 combinations if you use hexadecimal numbers you go 0 to 9 and then 10 which is a so you got something to represent this pattern a then comes b which is 11 c that is 12 d 13 e 14 f 15 so you get 0 to 15 which gives you 16 combinations as compared to 10 so first of all your advantage is every possible binary combination has now been represented as a digit moreover on a single digit you get 16 values whereas on a single digit you're getting 10 values that means you can store more information in less space now over here the difference seems to be small 10 and 16 seems to be small it is not small it is humongous if you look at a four digit number a four digit number in decimal system can be maximum nine nine nine nine nine thousand nine hundred ninety nine simply speaking ten thousand whereas a four digit hexadecimal number goes up to ffff which is 65 535 do you see the difference both are using the same space but who is giving you far more information hexadecimal system because it used up every possible combination so when it gets multiplied over a bigger number you can see the difference is 10 000 this is 65 000. if i tell you your starting salary will be a four digit number you would want it to be a what number decimal or hexadecimal you got my point so in computers we do not use decimal system decimal system is for the real world because it's easy to count it came from this it's the age-old system at that time all these concepts were not there obviously but computers are from the educated world from the intelligent world where they created a concept of zeros and ones to do binary arithmetic now when you have binary to represent all possible combinations of zeros and ones you need four bits because you want 10 numbers the 4 bits will give you 16 combinations so create a music system that accommodates all those 16 combinations so that's why everything in this subject is in hexadecimal form do not get confused inside the computer everything is binary but it is not the binary form of decimal numbers it's the binary form of hexadecimal numbers so that you can represent every four combination of every four bits is that clear now this conversion should be very fast i give you the trick already eight four two one so suppose i ask you what is nine nine is eight plus one that will give you one zero zero one a is ten ten means eight plus two that will be one 0 1 0 so a little faster now by yourself i want 3 what is 3 come on what is 3 0 0 1 1 nice i want 5 what is 5 0 1 0 1 nice i want 35 come on come on what is 35 come on don't don't don't get scared this is 3 this is 5 i ask you 35 35 is just the same two things 3 is 0 0 1 1 5 is 0 1 0 1 hold on is this how you represent 35 3 and 5 i'm asking you yes if you know what many people think no this is not how you do it it's the problem then people say microprocessors are tough they are not tough but if you start on such a wrong foot you're starting on a tangent how do you expect to understand big things if your basics are so shaky there is another procedure of divide by two divide by two method you know that right when do you use that when you're converting from decimal to binary and that will never happen in our subject in our subject microprocessors we only work in hexadecimal system i've given you the reason for that two minutes back so every time you are converting you're converting hex to binary and hex to binary is converted the way i have converted right now for every digit you represent bits but how many bits four bits the reason for that is one digit has 16 combinations 16 combinations needs 4 bits are you clear so 35 is this is 3 this is 5 74 0 1 1 1 is 7 0 1 0 0 is 4 93 1 0 0 1 is 9 0 0 one one is three ff one one one one one one one zero zero zero zero zero zero zero zero zero zero hold on now look at this zero zero thirty five seventy four ninety three ff they all totally totally required how many bits eight bits that is why they are called eight bit numbers now when you learn microprocessors you keep coming across eight bit numbers and sixteen bit numbers all the time instead of being confused every time and every time racking your brains over something so silly get it clear once for all tell me if after this you ever see this word written anywhere so and so is an 8 bit register so and so is an 8 bit number what does that mean what is the range of an 8-bit number come on an 8-bit number has 8 bits so the smallest value will be 8 0's yes how many zeros are these come on come on don't see what is just shown use your brains and answer how many zeros are these these are not two zeros these are eight zeros that's the ironing of the situation we call it an eight bit number we don't write eight bits because we don't write zeros and ones we write it in hexadecimal form because it's easy to write it's a compressed form works faster on writing on paper but inside the computer this will be stored as zero zero zero zero zero zero zero zero so this is an eight bit number it's the smallest possible eight bit number please send me did you understand this and the biggest 8-bit number will be 1 1 1 1 1 1 1 which in hexadecimal form will be ff so the range of an 8-bit number goes from 0 0 to f the range of a 16-bit number is 0-0 0-0 up to ffff please tell me is this clear 8 bit number is also called a byte 16 bit number is also called a word are you clear or 2 bytes if you like it that way now i'm going to do a small exercise with you i'm going to go on writing numbers on the board and you're going to go on telling me whether it's an 8-bit number or a 16-bit number say it out loud who cares who's if somebody's watching you doesn't matter you know you're doing the right thing okay let's be quick on this 25 how many bit number yeah how many bit number correct eight bit one two three four sixteen bit i will not keep writing the h every number in our subject is hexadecimal five one four zero eight sixteen bit four zero eight bit two zero eight bit eight zero eight bit eight zero zero zero sixteen bit five one three six sixteen bit number so and i think you got my point if i ask you represent this number in binary come on five one three six is zero one zero one that is five zero zero zero 1 that is 1 0 0 1 1 that is 3 0 1 1 0 that is 6 that is 5 1 3 6 like this anytime if i ask you to represent any number will you be able to do it you need to these are all basics this is not the whole learning of microprocessors microprocessor is very deep and very interesting but to learn all of that your basics have to be right so this is the point where many people uh get stuck up and then they goof up in the bigger points so just wanted this to be crystal clear henceforth anybody says an 8-bit number or a 16-bit number you should know what they're talking about okay now we're going to learn parts of two anybody learning microprocessors or microcontrollers or uh computer organization or any digital subject has this thing all the time in our subject everything is a power of two okay everything is in binary so every number eventually is some power of two or thereabouts so instead of being confused all the time what is kilo what is mega what is giga what is 2 raise to 32 give me five minutes five minutes that's it is all i want and you'll be damn clear about every power of two ever required while learning the subject okay let's start so let's look at the basic parts 2 raise to 0 is 1 2 raise to 1 is 2 2 raised to 2 is 4 just keep multiplying by 2 it's not rocket science 2 raised to 3 is 8 2 raise to 4 is 16 32 64 72 7 is 128 256 512 1 okay 2 raised to 9 is 5 on 2 2 raised to 10 obviously is 1 0 two four one zero two four in our subject is called one k a kilo a kilo in micro processors or in computers is not exactly a thousand it is two to the power ten that is one zero two 4 are you so far clear now look at these and if i ask you any power of 2 you should be able to answer if you want to take a look if you won't try to answer it from your mind that'd be better that'll be better 2 raised to 5 32 2 raise to 7 128 try not to look come on no g 2 raise to 3 8 2 raise to 4 16 2 raise to 6 64 2 raised to 7 128 2 raised to 2 4 2 raised to 8 256 2 raised to 9 5 1 2 2 raised to 10 1 k 2 raised to 11 2 raised to 11 now you don't have to think over it all over it again 2 raised to 11 can be derived as 2 raised to 1 into 2 raised to 10 2 raised to 1 is 2 2 raised to 10 is 1k 2 raised to 1 is 2 2 raised to 10 is 1 k so this becomes 2 k please tell me did you understand so 2 raised to 11 is 2k 2 raised to 12 is 4k 2 raised to 13 8k 2 raised to 16. if you learned little bit of microprocessors here and there you will now start coming across numbers that you've been seeing in the books all the time 2 days to 16 is 64 k come on it's not rocket science you just have to tell me a k next to all these numbers okay it's not that difficult 2 raised to 18 256 k 2 raised to 19 5 1 2 k 2 raised to 20 1 k k a kilo into a kilo is a mega 1000 into 1000 becomes million so 2 raised to 20 is 2 raised to 10 into 2 raised to 10 that is a kilo multiplied by a kilo that is a mega so 2 raised to 20 is 1 m you ever hear one mega pixel or one megabyte understand in our subject that simply means two days to 20 are you clear so now what is two days to 24 come on now don't make a big mistake please two days 224 16 mega good two raised to 26 64 mega 64 mb if you want to say it that way 2 raised to 28 256 mega 2 days to 29 502 mega 2 race to 30 2 raise to 30 is 2 raised to 10 multiplied by 2 raised to 20 2 raised to 10 is a kilo every time you hit a kilo you go to the next level okay on every time you reach 1000 you go to the next level so 2 raised to 30 is a kilo into a mega a kilo into a mega becomes a giga so 2 raised to 30 is a giga so when i say i have 4 gb ram what does that mean 4 giga 4 is 2 raised to 2 giga is 2 raised to 30 that means it is 2 raised to 32 are you clear when i say 2 raised to 36 come on now give me a correct answer make me happy 2 raise to 36 is 2 raise to 6 multiplied by 2 raised to 30 2 raised to 6 is 64 2 30 is a giga 64 g are you clear in case your phone has 64 gb memory by phone uh 256 gb memory come on 256 gb memory break it down for me 256 is 2 raised to 8 g is 2 raised to 30 that means 2 raised to 38 so if you learn this thing in our subject it will be written as 2 raised to 38 2 raised to 38 for the layman for the normal people around us that's 64 256 gb 2 raised to 29 512 gb 2 raised 2 30 sorry 2 raised to 40 2 raised to 40 is 2 raised to 10 multiplied by 2 raised to 30 2 raised to 10 is a kilo i told you every time you hit a kilo you go to the next level so it's a kilo multiplied by a giga becomes an error so 2 raised to 40 is a terror of course it goes much more than this there is no limit to numbers they go up to infinity but this is what a person needs to know while learning these subjects these are real world numbers what's the size of your hard disk most of us use a hard disk of you know come on most of us use a hard disk of around one tb at home so when somebody asks you an oral exam which we call vivas in bombay university most universities in india they called use that word anyway so uh examiner says what's the size of your hard disk they say a student says it's uh one tb examiner says my hard disk is 2 raise to 40 whose is bigger it's the same they're just trying to confuse you these are all numbers which are powers of two okay so just wanted you to know that what is two raised to now i'm going to ask you four questions one two three four try to get all the four right and i'll be super happy what is 2 raise to 43 8 error excellent what is 2 raised to 36 64 giga nice what is 2 days 225 25 32 mega excellent what is 2 raised to 14 16 kilos nice nice and 2 raised to yeah so now you got your pass but you just wanted you know you'll come again you may be thinking it was so uh basic it is of course it is basically the basics of the subject well the more you learn the subject the more you'll remember this uh small video that we had of this powers of two because you'll need it all the time every answer of the subject microprocessors has something to do with some power of two so instead of being confused all the time learn it once for all i hope you got it that's it now that you know what are powers of two and what's the meaning of binary and hexadecimal we can come back into this diagram just a few more basics remaining and then as i said you can start learning the architectures and everything else about the subject now okay uh so in this diagram whenever i put my finger i want a clear answer what does it do okay no story simple clear cut answer what does memory do store what does mup do fetch decode and execute instructions what does io do gives inputs and produces outputs what are these yeah this is where our focus is now these are called buses okay what is the bus nothing else but a set of lines if i wanted i could have drawn individual lines that would just make the diagram too untidy but we still get the same information just be a stupid diagram to look at so we combine them together that's called a bus so a bus is a set of lines have you seen them oh yeah you see them everywhere like in a pen drive if i'm sure at least once in your life you've tried to peep inside a pen drive come on that's that's why you took this whole subject that's why you learn because you're interested in electronics yes or no now when you look at a pen drive if you peep inside you'll see a set of lines what is that that's a bus that pen drive goes into a port called as a usb what is usb universal serial bus that's one example if you look at the motherboard you see lines going across one place to the other a set of those lines is a bus so those are basically buses and so on i can give you numerous examples so they exist they very much exist now what is the bus use for transferring information do we need to transfer information of course all the time we say the instruction is first of all fetch from the memory so when it is fetched from the memory it won't fly and come it needs a medium to travel that medium is the bus suppose you're listening to a song for you it's a beautiful experience of listening to a song in reality what is happening where is the song in the memory who is going to process it processor how do you get to listen to it speaker that means there are millions of bytes traveling from the memory to the processor and going finally to the speaker that's how the more you learn this the pleasure of the simple innocent pleasures of life i want to be able to see the matrix eventually any any coming back so it's just millions of bytes going from memory to the processor processor to the i o now my point is for all that information to travel you need some medium so that medium is a bus so bus is nothing else but a set of lines how does information travel on a bus i say the bus is a set of lines take one line what do you want to transfer let's say you want to transfer a song or maybe a movie you know on your phone you have that uh charging point to which you connect your cable that's a data cable it's not only used to give charging or charge your phone it's also used to transfer data from your computer etc into your phone i'm sure you know that very well so again over there where it connects the bus my point is can you transfer a song through that bus yes can you transfer a movie yes image yes what do you want to know how to transfer a song or a movie or an image nice if you give the correct answer i'm impressed the bus doesn't care what is its trance what is it transferring because all its transferring is zeros and ones don't try to understand how to transfer a song if i try to understand how my transferring voice over here i'm not going to learn anything what i'm transferring is zeros and ones but here it's in analog form either way let's not get into that i don't confuse you the point is you're transferring zeros and ones okay everywhere so a bus is a set of lines take one line i want to send thousands and millions of zeros and ones from here to here what can i do i can either connect this line to vcc or i can connect it to ground if i connect it to vcc over here i will get logic one if i connect it to ground over here i'll get logic zero so by constantly fluctuating or shuffling this connection between vcc and ground and vcc and ground and vcc and ground i can transfer millions of bits this is how all information transfers in the world are you clear now the question is students say sir we transfer a song in a jiffy one song if you want to transfer it takes barely a second a movie today gets transferred within a minute or so so the song is nothing anyway so how do we transfer so many millions of bits in a second how can the line switch between zero and one millions of times in a second if that's a question in your mind i have started liking you because that means you are interested in learning such kinds of questions only come to people who want to really learn the subject yes there cannot be a physical switch that can do million movements in a second that is physically not possible it is only possible if it's an electronic switch what is an electronic switch a transistor take this line connected to the transistor the transistor can be biased the way you want to this is vcc this is ground you can get it the way you want and connect the line to ecc and ground and change that biasing millions of times in a second that's why transistors are used that's how you learn transistors the basic function of a transistor is to act as a switch and then of course the various functions i'm not getting into that my point is so you understand what a bus does a bus has a set of lines each line at the end point is connected to a transistor depending on the data that is coming it will be either biased in some way or the other so that it will either transmit vcc or the transmitted ground that means the logic one or logic zero now one line can transmit one bit at a time if you wanna transmit four bits at a time you need four lines this is called a four bit bus eight bit bus has eight lines 16 bit bus has 16 lines more the lines more the information can be transferred at a time but at the same time the cost and physical space required will be more so it's always a trade-off so different companies do it in such a way that they get the perfect balance between the space used on the motherboard and the amount of information transferred so a bus is a set of lines i think i've said it 10 times by now if i say size of a bus what am i talking about am i talking the length of the bus no who cares size of a bus means the number of lines so it's always given in terms of bits 8-bit bus means 8 lines 16-bit bus means 16 lines now any system you learn from the most basic to the most advanced will have these three types of buses address bus data bus control bus this is the last discussion of this lecture okay there are three types of buses address bus data bus and control bus together they are called the system bus so what you saw earlier over here was a system bus which i've just broken it down into three parts now address data control now all the three have very obvious uses the job of the address bus is to give the address the job of the data bus is to carry the data and the job of the control bus is to control the operation now let's go one step detail and we are done the first bus address bus what does it give the address of the operation now look here this is the memory what do you do in the memory you store yes we are clear about these basics now what are you gonna store are you gonna store only one number no you wanna store millions of numbers that means there will be millions of locations it's so obvious to understand it's like this classroom though you can't see this crosstalk classroom you know this is the classroom so there'll be 60 70 benches each bench can take about five six people you understand what i'm saying so similarly there are millions of locations every location has its own unique address you don't need me to tell you this this is obvious if addresses was not unique then why would it be there the job of address is to identify the location so it is obvious that every location will have its own unique address and in that location there will be some data so if i say 4225 what do you understand at the location 4000 the data stored is 25 please tell me is this clear now can this be a part of a song yes can it be a part of a movie yes it can be a part of any information it can be a part of an sms you get sms on your phone a text message it has wonderful characters making a beautiful message most of the times hopefully what you see on the screen is not what is stored inside the phone inside the phone alphabets are stored using their sky value today of course there are better representations it started with us but anyways as key ask however you want to pronounce it now this could be the sky value of some alphabet so that means this could be a part of your sms it could be a whole sms for all you okay that's stupid message k anyway so my point is this can be any kind of information now i want to change this location 4000 carries 25 i want it to be 35 i wanted to carry 35 that means this is what happens when you save a file right now start my camera take a picture of yours what am i doing saving millions of bytes at millions of locations if you understand how to save one number do that same operation millions of times you have saved the whole file are you understanding it there's no concept of saving a file the concept is to save one number and doing it millions of times is that clear so you're learning how that one number is stored at one location this is location 4000 it contains 25 processor is not happy it wants to store the value 35 because you asked it to store because you press save okay so processor wants to send the data understand the words once you send the data 35 at the address 4000 okay out of the three buses what do you think which bus will come into picture first which will be the first bus to be used obviously address bus good answer it's common isn't it is there anybody who thinks first we'll send data how can you send data first you'll go to some random location corrupt something which was very nice the first thing that you do is give the address so that you identify the location that you want to operate on so in any operation right now we are doing it as a basic later on when you do timing diagrams this thing will become very big in every operation in the beginning the first thing the processor does is gives an address so it will give an address what address four thousand out of all the millions of locations this location has been selected now whatever will happen will happen between processor and location four thousand so is the job of address was clear the job of address bus was to identify the location are we done now comes the second bus which was data bus processor will put the number 35 will it put 35 on the address bus no if it puts study from the address but location 35 will get selected address bus is used to identify the location data buses used to put data into the location there are two different buses doing two entirely different things are you understanding my point so then you'll know they are multiplex and then eventually they also demultiplex all that is later first understand what these buses are so address bus gave the address the location got selected now comes the database data bus will carry the value 35 is the operation complete no the last was last few minutes of this discussion the control bus why do we need a control bus see what has happened you are the processor i am the memory you have given me address four thousand so i have selected location four thousand kept in front of you this is location four thousand do what you want now you as a processor can do two things on this location either you can take data from this location or you can put data into this location taking the data is called a read operation putting the data is a write operation you have to tell me whether you want to do a read operation or a write operation you as in who the processor the processor has to indicate indicate whether it wants to read data or whether it wants to write data are you understanding my point and that is indicated by which verse address was no address was given address database carries the data it's the third bus called the control bus which will control the operation by giving two very important control signals called read and write as you learn the subject mode you'll understand there are many more control signals but when you say the word controllers the first thing that should come to your mind are these two signals they are the primary control signals they are called read and write they are active low so they're pronounced as read bar and write but i'm not getting into that right now i'm keeping it simple for you so there are read and write signals now many students throughout the subject keep getting confused about this what is a read what is a right sir if data is going like this processor is reading memory who is reading who is writing it is clear for once for once for all get this clear the names read and write are always mentioned with respect to the processor i am saying it again they are always mentioned with respect to the processor so if i say a read operation is going on who is reading the processor processor is getting data that's called a read operation when i say write is going on who is writing processor that means it is sending data read me read means processor is getting data right means processor is sending data so in i'll move my hand you will tell me whether it's a read or a write operation try to say it loud i always say this give your answers aloud there's a big difference between thinking it and saying it when you're thinking it you're 50 50 when you say it you commit what happens either you know whether you're right or wrong if you're wrong at least you'll realize you're wrong and next time you'll give a better answer okay so try to say it don't care about who's around you makes no difference like who really cares anyway so uh coming back i'm moving my hand you're going to tell me whether it's a read or write yeah this is a read operation this is a write operation i repeat read write this is read this is right this is read this is right whenever processor gets the data that's called a read operation whenever processor sends the data that's called a write operation are you clear so in our example processor wants to send data so it will give the right signal right bar active low i'm not getting to active low logic here so processor says i want to write i want to write the number 35 at the location 4000 that's when 35 will be written over here that completes an operation let's take two more examples and let's get done with this let's say this is location 5000 i want quick answers now processor wants to write the value 77 next time you press save on any file tell yourself i know what is happening the whole file is not saved together it's saved one by one it happens very fast of course modern processors do billion operations a second so it happens very fast but what is happening is one operation same thing billions of times with different numbers at different locations if you understand that one operation you understand how file is saved come on processor wants to write the value 77 at the location 5000 first bus address bus correct we'll send the address 5000 this location is selected second bus data bus processor will put the value 77 is the operation complete no the third was control bus it will say i want to write that's when 77 will be written at location 5000. one last example it's going to be a little different but i'm pretty sure you'll be able to answer okay this is location 1000 it carries the data 33 i don't know what it carries i want to know what it carries that means you're going to do a what operation exactly read operation of course you won't keep doing the same thing again and again right we've done right operations a few times now i'm showing you how to do a read operation this is what happens when you open a file next time you open a file tell yourself i know the whole process inside there is a set of sequence of events that take place come on start processor wants to read come on by yourself what is the first bus what are the first bus address bus processor will give the address 1000 this location is selected now second bus come on data bus or control bus control bus did you understand is there is a subtle difference between a read operation and a write operation when you want to do a write operation you know the data because you are writing so you give the address you put the data and say i want to write when you do a read operation do you know the data of course not if you know the data why are you reading you only know the address you means the processor you will put the address and you will say i want to read these minor points that i'm saying later on will become very big when you do timing diagrams there is something called a propagation delay which happens in a read cycle but not in a right cycle playing the foundation for that all these things that i say in this first lecture when i teach in the classroom in the first lecture they all become very important points later on i'm laying the foundation yeah yeah of course you cannot learn the whole subject together but if you have the right foundation later on things become easier so when we do a read operation process i will give the address 1000 will say i want to do a read read means data will come from memory will data come from the whole memory no we have selected the location data will come from that location 33 will come on the data bus and will be given to the processor please tell me this is clear so what is the sequence when you do a write operation it is address data and say i want to write when you do a read operation it is address control signal and you get the data please send me are you clear uh address is given by the new p read whether we want to do a read or a write is given by the new p says whether it wants to read or write mu p controls the memory mu p gives the address data is bi-directional because we can read also and write also i hope with the directions you understood all this that's it now this was the introduction i wanted you to have there was a massive demand for this video a lot of students were saying this you know as i said even if not directly indirectly they've been saying it because of the kind of doubt students ask sometimes i'm like how can you understand programming how can you understand architecture if you don't know these basic things so i hope you understood this basic i've tried to keep the video as light as possible i've taught nothing technical all of this was very simple the foundation basic stuff what i would suggest if you like to follow suggestions watch this video more than once what i would suggest why you realize it when you learn the subject more you'll realize why i said it now i am in the process of making videos for this subject uh i've been working around the clock doing it as much as i can uh i'm putting up i've been putting up all these videos on my own website it's called www dot bharat acharya education.com it's the same name that is the name of this channel okay so uh if you want to watch all the videos and learn the entire subject all you need to do is go log on to that website create your own login id like you create everywhere in every social media site uh it's a paid site because all of this requires a lot of effort it's trying to keep the amount as low as possible subscriptions start from 499 then there are better uh packages which are a little more expensive but give you more more and more features we have we are constantly working on that so we gonna add many more features as and when we can but anyway anyway so the subscriptions have started people are people are watching that website so uh you most welcome if you want to learn the whole subject uh check out the website also my book is available now earlier it used to be on amazon i've removed it from there my book is now on my website all you need to do is again the same thing the price of the book i've kept it as low as possible include shipment about 500 599 as of now it as of now as with the new increase in rates everywhere anyway so uh the physical deliveries of the book are only in india uh so all you need to do is again log in give your full address make the payment the book will be dispatched on the very next day and generally it reaches even far from places within three to four max six working days we say that just for the safety sake generally it's less than that okay wish you all the best do well you
Info
Channel: Bharat Acharya Education
Views: 3,347,123
Rating: 4.9198542 out of 5
Keywords: 8051 microcontroller, 8086 microprocessor, microprocessors, 8085, nptel 8051, 8086, learn microcontrollers, processors, 8086 architecture, mup, floating point numbers, learn 8051, intel 8051, 8086 online videos, learn 8086 online, learn 8051 free, computer organisation, 8085 microprocessor, learn 8086 free, 8051, bharat acharya, intel 8086, intel 8085, learn microprocessors, bharat sir, learn 8085, 8086 bharat acharya, learn 8086, nptel 8086, learn computer organisation
Id: Xl2nWDcy0To
Channel Id: undefined
Length: 86min 30sec (5190 seconds)
Published: Fri Jan 05 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.