 Good morning Prof. I am Prakash Apte and I have been in IIT from 2001 teaching this subject to the undergraduates. Before that I was in Tata Institute of Fundamental Research doing experimental research in the integrated circuit fabrication and design. So, I was there for 31 years and some day I thought that now enough I like to teach. So, I came here. So, happily I have stopped doing research, but now I am doing research in teaching. So, cannot help it. So, I have to find out why education system has grown the way it has. So, now I know tell me I forget this is called the lecture. So, give a lecture student will not forget show me I remember that means, you have to show give demonstration show tutorial solve simple problems. So, they remember involve me I understand that is why there are laboratories. So, without laboratories they will only remember professor Apte taught well or he did not teach well and that is all about it after 2 years he cannot remember anything. So, in today's lecture I am going to tell you 2 jokes after sometime you will remember the 2 jokes because I am not going to teach you anything. So, I am not giving you a lecture nor I am going to give you a demo I am just going to get involvement from you by most of you have more experience than me on teaching. The second part of the teaching is that if I teach only one student that is called a tuition. So, I know exactly what his capabilities are and then I actually fine tune keep on varying till he understand. If there are 5, 6 students or a little more than it is called coaching even though there are a larger than number 1 I still from time to time know everybody is name and I know everybody is weak point and plus point and I still fill it up. If I teach a class of 60 which you may be having it is called lectures that is called lecturing and if you teach a class of 400 or 1000 that is called a address the audience. So, the last one I know we have to prepare a perfect thing with no flaws in it I must rehearse it properly. So, that exactly in 1 hour and 25 minutes I will finish it it is like acting you come on the stage on the cube and you start acting. So, giving a lecture to 400 plus people is like acting they have to perfect that art of acting. So, nobody is able to interact. So, this one is not acting this one is not lecture because they are not 60 of you they are only 30 of you. So, this is probably in between the coaching and the lecturing. So, I am not going to take you or teach you anything nor I will lecture you are going to take a journey with me from what I call inverter to VLSI. So, this digital lecture therefore, it is inverter to VLSI if it is some other lecture like analog then I will say RLC to LSI. If it is some other lecture called design of experiment then I will say design of experiments to industrial optimization. So, I have got such 6 topics meant for an introduction to people who already are in field it is not the undergager students already in the field give them a quick overview take them on a journey right from the first thing to the A and T. And I hope that if you like it I can make all these things available to you. And the first lecture in digital electronics should be this one. So, you also need to take the students on a journey to tell them in the first lecture how much of this goes all the way and everything is not taught there is no teaching in this. But since I am going to use the slides which I have prepared and you will of course see great familiarity with that. So, I am not going to pause too much and we will complete the journey. So, I want to begin with the first light hearted things I do not want any serious faces before me and after me there will be people who will give you serious teaching. They are they are in the business of teaching I was not in the business of teaching. So, there is this corporate new corporate world called IT when I went to Pune on a sabbatical I found that all these young people 30 years after 6, 7, 8 years of their inducting into the IT they become managers. And then they have to have their principal sitting in US. So, they have to make a conference call at 8 a.m. before those guys go home. And then they have to wait till they come back next day at 8 a.m. that means this guy is there for 12 hours or more because the Americans who give the money they want to ask what did you do whole day. So, they wake up and then they want to know what was done in the previous day. So, these guys are working 8 to 8 and then they get so tired and they earn lots of money in return. But they all become very lethargic their face blots up and permanently you feel that they are lack of sleep. And there is a general feeling that weight is growing at the wrong points. And you know there is a tiredness and then they say that some of these guys are physically fit something has to be done. So, what I found I was also in one of those glass buildings by the way. So, smart guy ABS gymnasium was open on the 8th floor the terrace floor of that. These guys know where to go they want to go where the money is and poor health is. So, 22,000 rupees fees for using gymnasium. They say what is money where to try all these 4 guys got registered there. And there is a interactive training session what they call just for 3 hours. After that 22,000 is gone. So, the training session was there they just show them what you to do and you know start with a 1 kg weight dumbbells and all that. And then slowly increase. So, after that these guys try very hard to you know put on half pants and togles and you know full journey to 8th floor do something and come back. And initial they say this is working out very well. But after 1 month the pressures come so much that they cannot do anything. Every day there is another excuse for you know missing it. After 3 months they meet and they say not working 66,000 chala gaya ok what to be done. Somebody says there is a personal trainer who come at home and every day they will take exercise from you. So, every day but you know home we have got none of these instruments you know weight training. So, no yoga teacher they are the best. So, they all hire some services of yoga personal teacher and they starts coming. And the wife and the father benefit from that yoga teacher more than this fellow. So, this fellow on some day is in a hurry. He says sir I am not having time. So, yoga fellow is showing them new asana. Some other day they will say I have time. So, yoga teacher does the exercise. And after 3 months they again meet and again the same story. So, fellow comes at home and everybody in the home is benefiting but not this fellow. But one fellow is bright and shiny you know fresh looking. Who is your trainer? My trainer is the way fellow. Oh we must take him you know you have improved you know that is all useless. First week I fired him. You know I had to do it myself for 3 months. That is the story of any teacher. You do whatever you want. Kitna bhi monkey, trigs, rose jump up and down. So, that student understand ultimately they have to do it for 3 months. That is the semester. At the end of semester they say teacher was bad you know finally I studied and I got marks. So, that is I think good enough. So, our job is to not allow them to forget. You show them from time to time some interesting problems and then their attention is taken. So, let us begin the journey at the end of the time. You have another one coming even more you can identify with it even more than this one. So, we begin with this basic gets. So, I belong to the previous generation right transparencies and overhead projection and all that because I made a professor Dattara in IID Delhi. I was so impressed with his presentation beautifully written. So, I only make a poor copy of his transparency making skills, but I try. So, binary system of numbers is used to denote only 01 what we call true false and I prefer to have this square looking rectangular 0 and this one sometimes I use with double line to differentiate between a normal 0 and 1 of the decimal system. So, the number system you know all began with everyday use and use of 10 fingers to count and then they derived that and then there is a place holder. So, place holder is this is the place holder for 1 then 10 and then the meaning of 234 therefore, is 2 into place holder 3 into place holder and all that and there you get 234, but now we already know this not that we need too much about the decimal system, but decimal system also I have got place holder is so negative and therefore, beyond decimal we can also show that this is fine. So, we use the same strategy because after all what is the difference. So, now we have we have two interesting properties that is the multiplication by the base 10 itself you multiply what happens is it shifts left you add the lowest denominator that is the 0 in that number system 0 is the smallest or it is called a null value. So, multiplication like that and division is by shifting it right. So, I think multiplication by 10 and division by 10 is the easiest only addition subtraction is more difficult. So, binary system we have a base of 2 we have got only two symbols 0 and 1. So, we have got this place holders 1 2 4 8 etcetera and the meaning is the same this is 8 plus 2 plus 1 11, but you have to write this 11 with number system 10. Same way 1 0 1 1 in bracket we have to write with number system 2. So, then there is another number system hex hexadecimal and octal and so on. Of course, we teach the student how to convert decimal to binary and binary to decimal. So, we go forward. So, by analogy multiplication by base 2 should be the same feature shift left divide by base 2 should be shift right. So, therefore, the toughest task is going to be the addition and subtraction because as you know in decimal you have to worry about the carry carry it forward. And therefore, some way down the line I will give that there are 3 4 versions of representation of the Boolean logic or the binary system. And we will see these 3 versions and they are all identical implication of that is identical. One is a truth table other one is a Boolean algebra and third one is a logic symbol. Everything denotes exactly the same thing one is graphical the symbol mathematics the symbol use will be false or true or in short a 40 is generally referred to as the Boolean logic. So, professor bull to give all this is honor Boolean logic. So, one of the easiest cases of Boolean logic is like that there is a word statement king ordered we had anyone who has counterfeit coin. So, now we have to invent a variable and assign some values and then show it like a Boolean equation. Another one is inspectors text statement from 3 witnesses a b c and then a says b is lying, but c is truth b says a is lying, but c is and if c is lying c says b is telling truth, but a is lying. Anyone to find out who is lying or who is true. So, actually I know for sure that all the c i d inspectors are supposed to take a course in logic this is not digital it is called logic. It is true that both a and b are lying. So, a denotes picking the truth and a bar. So, we will come to what this bar means bar is the opposite of this. So, in a binary system it is just there or not there. So, a is picking the truth then exactly opposite of that in English is lying. So, b denotes similarly speak the truth b bar denotes lying and let the conclusion be denoted by c. So, c denotes truth c bar denotes false and then we can write a Boolean equation. So, how do you read this equation? This statement is true if a is lying and b is lying that is the way you have to read it. You should not read c equal to a bar and b bar because it is not the 0 1 logic that we will do henceforth. This is a statement in English. So, you have to read like that and similarly this is another one if there is a or function we should not say a bar plus b bar you have to say a is lying or b is lying. Now, we come to the truth table. So, truth table is for that function. So, how do you consider the truth table? Since a is a Boolean or a binary variable it has got two values b is having two values. So, we have got all combinations of a and b as 4. So, we make before we do anything the left hand side can always be made you know do not worry about that. If I have got two variables I can construct this all four combinations true false false false false false four combination. If there were three variables I would construct eight combinations if there were four variables I will construct sixteen combinations. And then I apply this to this say a is true and this is true, but since a is true this would have become 0 because of that function. Therefore, we say false false only both are false this is true that is what that statement is. So, usually the function c gets this arrow here the arrow will be here this is this single line actually is good enough for denoting that function. We can also write now if a b are digital variables then we will say 1 1 1 0 0 1 0 0 and then we say 0 0 and this is 1 p is 1 if we apply that equation and we actually evaluate it four times. So, now I also know that now with the variables we can now have a function a certain statement is true only if or if and only if both a and b are true then this is called a and logic. The Boolean function is the conclusion c is both a and b are true c is also true short form is a dot b, but should be rare as a and b, but we take shortcut we say a dot b or simply a b because our convention is that a b is already indicative of product unless it is a plus a b is a product, but dot is a much better one and in logic it is better to always keep on saying a and b. Then we have got the same truth table obviously only when both are 1 output is 1 the symbol is like this is a half hemisphere or you can say half hemisphere with this side a and b and the c is on the output it is not bi direction it is a unidirectional. So, actually one should say arrow inside going that way. So, why do we have always write a b on the left hand side and c on the right hand side if the same is written in a book in Arabic languages the student will get confused that c is the input and it is splitting into a and b because they read from right to left. So, just because of that just because a student is like a baby the baby first very great difficulty in the ninth month or whatever barely able to stand and falls immediately. So, we wish that it will perfect that position for standing, but before it perfect that position it starts walking again falls. Then you say oh I wish you walk perfectly, but without your realization you now know that he is able to stand perfectly, but he is walking and by the time you think that he will walk perfectly he starts running oh I wish he will be able to run. So, my neighbors daughter is already running at the age of nine and a half month my son is not walking even at eleven months we get worried, but by then he is able to walk properly. So, I think this is the way it is they will not understand why it is written from left to right and so on, but while they learn at some future time when they make a microprocessor chart and all that then inputs will come from top and left and right and everything. At that time you would have already learned what is the meaning of a unidirectional logic the beginning we should not do that mistake draw this vertically and all that then they get confused or draw it see on the left hand side because they are still like learning. So, this symbol automatically says that this goes from A and B goes to C, but C cannot split into A and B this equation generally means the other way. So, in I think C language you know they had some other symbol for it not equating in computer language x is equal to x plus 5 what does it mean it means something different that x will now store a new value the original x plus 5. So, actually the arrow should be left word x plus 5 goes on to it, but we do not. So, we now like may be learn this idiosyncrasies with you know in the hours right left to right unidirectional or logic simply the statement that C is 2 if A is 2 or B is 2 or both are 2 does not matter. So, we find that it is 2 for 3 of the therefore, the symbol is like that this is a crescent like thing and A and B goes to C the symbol implies everything this is absolutely perfectly defining the truth table perfectly defining C is equal to A or B all those 3 mean exactly the same thing no difference at all then there is a thing of negation not do not do that children at the age of 12 13 do not like that do not do that like a child has climbed a tree and you feel the child is too young to go to 15 feet height and a false will break the lane you shout hey do not fall down hold that do not fall down is an instruction to him because that fellow has never thought that he is going to fall down now he starts thinking that he will fall down in panic he will fall down when something is important you do not begin with negation do not do that you should have you should say what they should do do not watch TV you should say you should study now or you should eat now or you should go out and play now do not do that then they will do that do not do that means they will do only that it is not a what is the inversion simply we just convert it from 1 to 0 or 0 to 1 truth table is this and symbol is this and the unfortunately this symbol will confuse a little bit later with the analog circuits because an amplifier also is shown like that without the input is 0 what is that 0 0 or this so called circular thing it shows a negation this is the convention still it is one way only my output if it become 1 the input does not become 0 only if input is 0 output become 1 or input is 1 output become 0 this is not bidirectional still any electronics you see if output can be changed by something else the input does not change. So, now we have got this NAND circuit not AND you should say that C is not A and B that whenever A and B is 1 it becomes 0 and whenever A and B is 0 it becomes 1 so we say bar so bar indicates the not function this dot on both sides indicate that it is not a English word it is a logic operation and with two dots on two sides also implies a logic operation the symbol for NAND and NOR are like that and we can also verify the truth table I think you should do a quick exercise with student to how to generate this but for that we will have to learn the theorems of logic XOR is a special thing exclusive or I would not spend too much time some people who are very fond of it some people like me are not very fond of it but if it can reduce the electronic circuitry I will use it then say full adder half adder it is useful it can reduce my circuitry that is fine why I do not like it because I am not worried about once I understand the basics whether you give me three inputs and two of these are AND and one of these is OR anything is ok as long as I know that I have got this function I got a truth table and I got a symbol all imply the same thing as long as I am sure of that then do not worry as I said I must know the Boolean algebra before I can actually substitute in that Boolean function to fill up the truth table otherwise I cannot logically fill up the truth table so basic theorem to define addition subtraction multiplication in the Boolean algebra is I would not do anything great here makes common sense once you know it first time it is magic this is the magic a baby is not going to understand why it should not put its hand on fire you keep on telling you know something will happen first time it has to happen otherwise it will not so why is equal to a plus one is equal to one now you cannot understand you have not learned any mathematics which says anything like that but this one is the confusing thing if you go back to the symbol true plus true true two statements are true some also remains true so true plus true is true is more understandable a plus one equal to one is not understandable because a can be either 0 or 1 when it is 0 it is ok but when it is 1 plus 1 should become 2 but 2 in binary becomes 0 with 1 carry so there is a lot of confusion so this is like a rule and it has to be followed hopefully students will understand by the time they go to third year first year follow the rule a plus 0 is 0 understandable a into one is a understandable a into 0 is 0 all these three understandable except this but this you have to push down their throat you know just take it the rule 2 this falls also you have to now go forward and similar four things a dot a bar is the most important thing this is 0 one of them has got to be 0 a plus a bar is always 1 because one of them has got to be 1 and anything added to 1 is 1 a a true true remains true a plus a 2 plus 2 remains true but I think the most interesting thing is this a plus a bar is 0 then there are distributive laws and all that you can actually create brackets take things out of it or if it is given like that you can go out this is both way this equation can be used both way this is not unidirectional this also can be done this also can be done so at absorption so you absorb a term so here it looks like a and b is same so a and b then c plus c bar I am allowed to do that bracketing but c plus a bar is always 1 one of them has to be 1 so I get a b which is called c is absorbed also a b plus a is equal to a so you can actually take a out then it becomes b plus 1 in the bracket which becomes 1 you can build anybody with the de Morgan's theorem till they say sorry sir I am not understood you explain 3 times but they will understand only when they have to work it out so simply if you just do this convert to this or this convert to that that does not tell what is the theorem just makes a statement that these 2 things are equal and then there is a algorithm for doing that what is the algorithm if I am given this a bar or b bar and totally not of that then the algorithm is simple if as soon as I have got this bar whatever is the function inside the bracket the algorithm is take a complement of a individual variable and also take a complement of the and or function that is the algorithm so here I have to do a I have to take b I have to take and this complemented it becomes dot so r becomes and so this is the way it goes a dot b if you have this then you have to take complement of this as a complement of this as b and dot function becomes r function this is the algorithm now nobody reads the books does any student read a book he will want to take a notes from you and in the notes I am not going to write this which professor is going to write all this one paragraph of text that this is the algorithm take every variable complement and convert every other operator by its complement so we neither put it in the notes nor student read the books they do it only mechanically without understanding so that is why the teacher is required all said and done the teacher is required for speaking this out so you have to speak that out because you do not have time to write it anyway so this is simple what is the implementation if I now take as an example sorry if it is too small for people to see a bar b bar and a b bar bar double bar and then you can now say I can implement it in this way this is a NAND function NAND gate is a NAND function NAND gate then it is ANDed and this is OR that means this becomes another NAND and I am able to now have this function written in this form implemented by logic but I can expand this also I can expand this out the expansion has to be done by that algorithm expansion needs the algorithm this is already a concise form which is suitable for logic implementation now I am going to work out two things how does anybody found the function from a truth table nothing else is given only truth table who fully filled up why truth table is given so we now know all these ones imply a term in the my function my function y has got these terms so this term is a bar b bar c this term is a bar b c bar etc. So, I have got exactly three terms and exactly three terms should appear in my function y that is the meaning this is the way a truth table fully given truth table can be converted to a Boolean function exactly other way if I have the courage to write this function the small part of it I will write this is y and then I can also create a y bar. So, let us take only the first two readings so same logic I can apply and I will say if I have got a fully filled up table for y bar also then I can say y bar is equal to the number of ones there. So, now which one should I choose for implementation y or y bar y has got three terms and five zeros. So, I will get a function of three entries but y bar will get a function of five entries and will require more hardware, but sometimes there are more ones and less zeros in which case we should do y bar. So, students should be taught to immediately convert this add another table mechanically just flipping this and see which one has got fewer terms therefore we get the implementation is what I have done actually write a bar b bar c bar etcetera all these terms are written. So, 0 means a bar 1 is b c like that you write and then you fill up this this is ultimately after such an exercise you can tell the student that this means the sum of products this look like sum of products these are products and a sum of that. So, sum of products y only pick up the entries which are one and a product of sums pick up all entries of y bar as a dual this is a dual means exactly opposite applies. So, we normally do not worry about the duals that much a logic problem can be worded like this as an example there is a Jones the farmer the problem is the Jones has got a dog a goat and a cabbage and there is a problem the dog will go after the goat chase it out the goat will eat the cabbage, but dog will not eat the cabbage and therefore this is the thing. So, in our home we are three people myself my mother and my wife just imagine the goat dog and. So, there is a problem there and that problem is very similar to this one. So, in this case we just stick to the dog and goat and cabbage. So, any one of them could be either on the north side or on the south side and if Joe Jones must always be with such a pair which is likely to fight if Jones is there when goat and cabbage is there he will prevent that goat from eating. If Jones is there when the dog and goat are together then he can prevent the fight, but if Jones is in the south and goat and dog are in the north then you had it or vice versa goat and cabbage in the other section then you got a problem. So, you say that preferred combinations are like that send the alarm if Jones is in the wrong side with dog and goat. So, Jones is in one section dog and goat are in the other section Jones is now in the other section, but the goat and cabbage are in the other in this section and so on. So, we can read it like this. So, there are four possible bad combinations and alarm bell has to ring. So, usually at home front the husband has very good health because he has to take long walks for long time many many times a week and his health becomes good. So, Jones also his health is very good he has to run from north part of the farm to the south farm should any trouble be there like this. Because he has to be on the same side where the this bad combination exist, but now having got this formulation done now we want to implement this in a logic alarm has to be a electrical electrically operated alarm and this dog being there and all that is because of something you have put on the dog and goat and Jones himself has got a identifier to locate where he is now we have to minimize that because we want what is the common factor. So, we need to minimize this function because the electrical circuit will require two many gates how many gate will it require four three input and gate and one four input or gate will require three input and gate four of them and one four input or gate and I think it is too many nobody makes four input or gate then it will require smaller pieces of two input or gates making up a four input or gate. So, the whole exercise is that having got the original such function either by arguing like this physical problem or getting such function from the truth table. The truth table can also give many terms in the earlier example we had three terms of three input where is the three input and gate or gate. So, that means, you have to make do with two input gates therefore, all this thing need to be now minimize, but this was a very old strategy and in the VLSI of today where billions and billions of things in FPGA this criteria is no more, but as a simple thing we should now do this. So, Carnot created a graphical tool which actually imbibe all those Boolean function rules and theorems without you knowing. So, this is like a graphical tool without you knowing the absorption principle it absorbs variables. I have got three input variable four input variable or four variable I must reduce it to two input that means I have to absorb some of this variable from those product terms. So, the whole idea is a table is created with say two variables we say b bar b a bar a like that and we can go all the way to four variables. So, let us take a arbitrary thing like this. So, I have got four terms coming out of that two table and now I want to minimize. So, you know what we have to do we have to find the one neighbor and put a circle put a circle and this poor fellow will not find anything. So, I will come back to this, but this is the Carnot map principle this and this when we combine this 0 and this 1 get absorbed that is the principle that is the fundamental rule. So, this is the absorption principle. So, this variable b disappears only c will remain and therefore, and of course a will remain a equal to 1. So, like that you have to get three terms, but this poor fellow this is a poor relation has got no friends and all three terms will remain. So, now, we have got hold of b bar c a c and a bar b bar c. We reduce some logic there were four three input gets required and one or get four inputs now reduce to two two input gets and gets one three input and get and one or get with three, but I am not happy can we reduce it further unfortunately no because this poor fellow decide that they will remain a logic is like that we cannot do anything. So, student we have to very clearly say that minimization does not mean that you will get what you want everything inputs minimization has got a limit depends on the function. If it cannot be minimized it cannot be minimized otherwise the student forcibly push it to two inputs and of course, get the wrong answer then they say that method is rights are give marks. So, now this is the other one without going to detail we can see the larger these groups we can make the larger absorb since you get a group of two absorbs one variable group of four absorb two variable group of eight will absorb three variables. So, you do that poor fellows are no more this can this like a you know close cylinder on itself the worst which I have not given is this four corners every student misses that out because this four corners are also like a closed path and therefore, also can absorb variable. So, well let us leave it at that. Carnot map is a very good technique interesting yes which one which which circle you are referring this one. Sir, you tell me which row you are talking about which row first row first row and the last row sir. First row in the last row. Last row. Form a quad sir. You should you take anybody we should take not we can take I was about to go there, but I wanted her to many times I ask a question feeling that I do not know. So, many a student have told me that you are not yet completed is wrongly done half done. So, this should be combined with this. So, we have to see as many combinations to be done what the student and I have done mistake is that once I see this is done it gets out of my mind and I do not reuse it I reuse this because of this poor relation I was forced to use it, but here I found a circle of two and I gave up. So, this is the fallacy of not reusing the one and therefore I prefer you must seriously make since is the variable four seriously see is there anything with eight then you should write the student should write not a single combination of eight is this Carnot map you have to write then you see I see one and I see two in the Carnot map with four entries like that you have to go down and finally, say which is the poor relation not finding any combination at all. Otherwise you have this mistake that once you have drawn the circle then we forget about it perfectly right madam. If this we are representing like A B C D A B C D if they are representing only a binary coded decimal then we know that they are numbers beyond 9, 10, 11, 12, 13, 14, 15 which will never occur because that is the display binary coded display and therefore these are these six entries which will never occur. So, we use them as optional and now use these all stars also as optional and make groups of eight as many groups of eight as possible and then you see here I have no combination on the four corners but I have now tried to make as many big ones then the next ones and the next one because a student is never sure has he got the final answer and I always tell the student that unless you get the final minimized answer you will not get full marks. So, this is the method they have to write I have found two of these which are eight then I found one only which is of four and then that is it. So, that is all I get two with the eight and one with four and this is absolutely minimum. I can check this for right on my answer book this statement then there is easy to check. So, I think this is a good habit as I said in the modern context these things are not required unfortunately. So, I think with your permission I will skip the half adder full adder.