 Dear learners, welcome to the session. In this session, we will discuss about one of the most important circuit of computer called combinational circuits. If you look into computers, one of the key requirement is that it, for example, it adds two numbers. How that addition takes place or how a subtraction, if it is to be done, how that particular thing takes place? Well, it is with the help of these circuits called combinational circuit. What do we mean by combinational circuit? How do we create combinational circuit? This is what we are going to discuss in this particular session. Circuits does not mean a combination. What it means that you have a given set of inputs, you have some circuit in between and you have certain outputs coming out of the circuit based on those internal processes or based on those internal circuitry which we place. Now, what are the basic circuitry which is going to be there? Well, since you are dealing with computers, they are either going to be AND gates or gates or NOT gates, right? So this is what a combinational circuit will do. It will take some input, there will be then a circuit which will process the data and there will be an output. And that circuit formation will be based on our logic. So if we want to do addition, the logic will be accordingly adjusted. If you want to do subtraction, logic will be accordingly adjusted. So let us look some details about combinational circuit. So before we go to the slide, let us have the slide show on, right? So combinational circuits are interconnected circuits of gates according to certain rules to produce an output depending on its input value. This is precisely what I said. A well-formed combinational circuit should not have feedback loops. Now, this is very, very important for you to understand. Many a times, I do not know whether you are familiar with distillation processing or not. You must be because you have a refinery in Guwahati. Now within the distillation processing, what happens whenever there are columns, the bottom most column, there is a purge, right? There is a purge, there is some kind of purge means when you are distilling petroleum, from the top you get natural gases and from the bottom you get lube oil and those kinds of heavy products, right? But all the time we recycle some of this, the purge which we call, we recycle it. And why we do it? So that in all the columns, a minimum level of liquid is maintained. If we do not do that, then the built up is not going to take place because whatever is coming in is going to go out. But with the help of this recycle or purge, the built up is somewhat bigger rather than the input and output. Now that is a theory behind flip-flop and the circuits which we call sequential circuits, right? So wherever there is a feedback, the circuits are sequential circuits. Wherever there is no feedback, the circuits are combinational circuits. So a well formed combinational circuit should not have a feedback loop. That is one of the reasons. Can be represented as a network of gates, obviously that is what we are talking about. Since we are talking about computer, we are talking about and or not gates or a combination of functionally complete set of gates. Now what are these functionally complete set of gates? You must read from your books or for the studies, you will find this particular term. Can be represented as a network of gates, can be expressed by truth table or a Boolean expression. Whatever you want to define a combinational circuit, you need to design it with the help of a truth table or a Boolean expression and using those Boolean expression, you can do the drawing or whatever you want to do with the combinational circuits. The output of the combinational circuit is related to its input by a combinational function, which is independent of time. Therefore, for an ideal combinational circuit, the output should change instantaneously according to changes in input, but in actual case, there is slight delay. The delay is normally proportional to the depth or number of levels that is maximum number of gates on any path from input to output. Now this is typical property of any flow circuit. Suppose you have a canal in Brahmaputra, a canal coming out of Brahmaputra and there is a barrage, obviously when you will open the gate from the barrage, the water will take some time to reach a particular point down the line 1 kilometer or 2 kilometer down the line. So is the case with the combinational circuits, the gates, there are number of gates available in between. So it is going to take some time, the current or the logic nature, the current or the voltage is going to pass through these circuits and only then it will be reaching out of it. Therefore, you will have to have a slight delay, ideally no delay, just like your switch. As soon as you switch on, electricity is on, but then technically there is a mild delay which is not measurable by us. The basic design issues relate to combinational circuits are, so now what we are now, so this is what combinational circuit is all about, there is an input, process and output. So what are the basic issues with this particular combinational circuit? After all what we want to do, obviously what we want to do, we want to do the minimization of number of gates. Why we want to do minimization of number of gates, lesser are the number of gates, lesser is the delay, as well as lesser is the circuit requirement. If you are talking about circuit design, then the more number of gates will form a bigger circuit, is it not? And more expensive circuit too. So this is what is required and the depth of the circuit should not exceed a specific level. Otherwise the gated delay will be too much and probably computer is not going to accept that kind of a situation. Number of input lines to a gate which is called fan in and to how many gates its output can be fed which is called fan out are constrained by the circuit power constraints. So this is another constraint which exists in any combinational circuit and which has to exist in any combinational circuit. For example you are using, let us say you are using electricity at home. Suppose you are installed an air conditioner in your house and you have a power consumption limit of let us say 3 kilowatts or so, then if you install another it won't be possible. So people who deal with this kind of a situation, no or maybe inverters you might be dealing with at house. So inverter the limit is let us say 625 kVA, then hardly 3 lights or 4 fans can work with it. You try to put another it will be off. That is what fan in and fan out as far as combinational circuit is all about. Now how do we represent the canonical or the standard form as far as logical expressions are concerned and how are they related to the kind of this combinational circuit. Let us have a look at it. The first form is called sum of product form of standard representation of Boolean algebraic expression. This is also called SOP, short for SOP. For example is A and B dash that is negation of B plus that is R, A and B. So this represents a sum of product form, a term of sum of product expression that contains every variable of that function either in the true or complement form is called a min term. So this is the definition which most of the time you encounter the min term and for example what we have given A that A and B and C plus A and B then only ABC is min term why because A, B and C are appearing either in the normal form which is ABC or in the complement form. They can also appear as A dash, B dash, C dash any one of them in any kind of format. Probably A can be A dash and BC that will be an acceptable term. Similarly A, B dash, C dash will be an acceptable min term but A dot B, A and B which is not a min term because it does not contain C. So this is the definition for min term and this has its connotation with Carnot's map in the sense that in Carnot's map you represent a truth table and that is actually represented by a min term. The term A dash, A and B and C will be only one, only if A equals one, B equals one and C equals one. This is the only possibility when this particular min term will be having a value one otherwise it would not be having a value one. And that is why we will be representing one in the Carnot's map against them. For any other combination of the values of ABC, the min term A and B and C will have a value zero. This is simple logic, A and B has to be one only if A equals to one and B equals to one otherwise it will have a false value which is untrue. The opposite of it is called product of some form which basically represents plus within the bracket and and plus happens to be R and and as the conjunction of the two. Max term is the term of POS that is product of some expression which contains all the variables of the function in true or complimented form. For example, in F equals to ABC equals A plus B plus C. So A or B or C and A plus B dash max term is only AB A plus B plus C. Now the advantage, the basic feature of max term is that A plus B plus C will have zero value only for one particular case. For all other cases it will have one value and what is that case A equals zero, B equals zero and C equals zero. For all other combinations of values of ABC, it will have a value one. This is the significance of max term. Many a times solving problems for combinational circuits using Carnot's map, you will use this particular term in a different connotation where you will be drawing a different kind of Carnot's map. For the time being, we will not be using the max term, we will be using the min term based Carnot's map. So once we are familiar with the basic combinational circuit issues, let us move on to one of the core important issue for the design of combinational circuits and that is minimization of gates. What we want to do is that we want to minimize the circuit or the number of gates utilized in a particular circuit. To do so, what we can do is either algebraic simplification which somewhat, I mean there are Boolean functions and all that, which are somewhat difficult, there are Carnot's map, which we are going to discuss and there is a Quinn-Maxikovsky method which is beyond the scope of this particular course itself. Let's discuss about the Carnot's map to demonstrate how this algebra, the process of minimization of the gates can be carried out. But let me warn you here, then when you are going to industry for this particular thing, people are not using these methods anymore. These are for your own intellectual development. Now these things has been taken over by programming languages and many, many, many more different concept. But to begin with, you must always know this particular concept so that you can move on to the greater concept. So let us discuss it with the help of a problem, an example. Let's look into the problem. Assume that you are asked to design a circuit that accepts three bits as input and generates an output zero if the input bit represents a non-prime number, else produces an output one. Now this is the given problem that we have three-bit input and one will be generated as an output if the given combination of or equivalent digital number is prime. Now what are those different prime numbers? We have two, right? Okay, prime numbers. So we have two, we have three, then we have five and then we have seven. So we have four prime numbers. So what we need to do, the very first thing which we need to do, represent the given problem in the form of a truth table. We got to do that. Why? Because our logic should get reflected into the truth table. Remember, truth table is what? Truth table is a form of minterm. So let's look into the decimal equivalent, decimal zero. We have all three zero, output should be zero because that's not a prime number. One, right? One is represented as zero, zero, one. One is also not a prime number. Remember that. Two is a prime, so output you can see is one, three is also a prime, four is not a prime, five is a prime, six is not a prime and seven is a prime. So we are able to represent the whole logic of the problem into the form of a truth table. Now what? Now we have six, in fact, five more steps to do. And I would like to draw, in fact, demonstrate each one of those. But let me first read those steps for you and then I would like to demonstrate each one of them for you. The first one is draw a Carnaut's map. So how do we draw that? Step three is map the truth table onto the Carnaut's map. So we would like to do the mapping of truth table into the Carnaut's map. Then identify and mark the adjacent terms. So this is still this point we will have be using with minterm. But from this point onwards, we will convert minterm, we will try to combine minterms for optimization of k. So we will try to find adjacent. I'll talk about what is adjacent a little bit when I'm discussing, then find the minimal expression that is what we are going to do and finally draw the resultant logic diagram. So this is exactly what we are going to do with the help of, let's say this time with the help of a pen and paper. So as step two, what we are going to do, we have drawn a K map. This particular K map, as you can see, have eight boxes. Each of this box is represented for one minterm. What we are going to do? We are going to represent a on this side and bc on this side of this particular K map. When we are representing a, what are the possible values of a, 0 or 1? So this is what we have represented. What are the possible values of bc? Bc can be 0, 0 or the next can be 0, 1. Now the third in this particular series should be 1, 0 but in Karnaugh's map, there is a typical condition that the next bit or next sequence, whatever we represent, should change only in one bit and the one bit which is going to change in this particular case is moving this particular 0 to 1. So it is going to be 1, 1 and the last in this particular case will be 1, 0. So 0, 0, 0, 1, 1, 0, 1, 1. Why we are representing like that? Because in each of these, there is only change in one bit only that you can notice. Here the changes between c. Here the changes once again between c and what is in this particular case, what is changing? b is changing over here, 0 to 1 and b is not changing over here. So you can see the way the changes are being made into the Karnaugh's map. So this is the Karnaugh's map. As we said, we have drawn the Karnaugh's map as step 2. Now from this step, let's move on to step 3 that is the truth table. Now the truth table, 0, 0, 0, we won't draw 0, 0, 0, any case. We will be drawing only for where the value is 1 and the first case in that particular case is for the case of 2 and that case of 2 is 0, 1, 0. So this is a is 0, b is 1, b is 1, a is 0, b is 1 and c is 0 which happens to be 2. So this is where the 1 appears. This is a min term. And the value of a is 0, the value of b is 1 and the value of c is 0, which happens to be 2, the value is 1. The next case is 3 which is 0, 1, 1. So 1 appears here. What is the next case? Next case is we have 5, 5 is 1, 0, 1, 5 is, so this is 5. Then 6 is not prime, 7 which is 1, 1, 1. So 7 is the last case. So now what we have done? We have converted the min terms into the Carnhouse map. We have translated the min terms into the Carnhouse map now. From here onwards, we move on to step 4. And what was the step 4? Step 4 was to find the adjacent cell. Let's try to find the adjacent cell. Now what are adjacent cell? Here what we said, they change only in one bit. So these two are the adjacent cell. And these two are the adjacent cells. We are slightly unlucky because in case of this one, had we had this one over here, then these four cells would have made an adjacent cell pair. If four cell make an adjacent cell pair, then you will find two variables will be eliminated. When only two cells are making adjacent cell pair, then only one of the cell will be, or one of the variable will be eliminated. What is changing? Let's identify how it is. What is the value of A for this particular row? The value of A is 0. So A prime is 1. And B in this particular case is 1 in both the cases. So B equals to 1. And C, 1 or 0, it does not matter. So what is the expression for this particular case? A dash and B. The value of C does not matter because the value of C is either 0 or 1. For both the cases, it has to be 1. Therefore, A dash dot B is going to be the optimized expression for this. Similarly, for this particular case, please note, what is the value of A? In this particular case, A is 1. So we don't have to create A dash. The value of B is changing from 0 to 1 in this particular case, isn't it? So B gets eliminated and the value of C is 1. Therefore, the B changes. So B is not needed. Similarly, in this particular case, C is not needed and the expression becomes EC. So the overall expression becomes A dash B plus AC. So this term plus this term. So this is actually the step number 5. This is the optimized expression which I get. Now I want to draw the equivalent diagram, circuit diagram for it. So let me draw the equivalent circuit diagram. Now what we have? An input A here. So A can be negated. So the A becomes A dash, A can be straight. This is A. Now if we once again, so A dash and A, with A dash we have B. So we draw a B here. And there is an end gate. It goes through the end gate. What is the equivalent expression? A dash B. In this particular case, we have A and we have another input C. So both of them goes to an end gate. And what is the output of this end gate, AC? And these two in outputs then go through a R gate because our expression was plus in between. So plus is an R gate. So what we get is A dash B plus AC. So that is our output. Now what you basically have? You have three inputs, A, B, C. And what you will be producing? You will be producing any of the output. Let's try to test this particular thing. For example, if A is equal to 1, B is equal to 1, C is equal to 1. What is the total? These are 7. So it should show us an output 1. Let's try it. A and C brings us A dash B becomes 0 and AC becomes 1. So A dash B plus AC equals to 0 plus 1 equals to 1. So output is 1. So that's correct for the case. Let's try another. When we have A equals to 0, B is equal to let's say 0 and C equals to 1, which is the case of when we are talking about 1, we are expecting a false result. So A is 0, therefore A dash is 1. So A dash is 1, B in this case is 0. So 1 and 0 becomes 0. In the A is 0, so AC becomes 0. So both the terms are 0, therefore output is equals to 0. So what you get for the case when input is 1, you get a 0 means it is not a prime. This is prime. So you can try for any combination. What you have done, instead of 4 gates, in fact, there were 4 places where 1 was appearing. You could have done 3 gates for this. In fact, one gate for this, one for this, one for this and one for this. You could have 4 gates and then all of them should have been odd together to make it 5. We have reduced the number of gates to 1, 2 and 3 overall. So this is the way we have done the minimization of gate. What next? From here, where will we move on? You should practice this kind of a thing. You should try drawing K maps for 4 variables A, B, C, D and likewise. Remember one thing, whenever there is a problem, the first thing you must do is to draw the truth table. If you are able to draw the truth table for Carnaut's map, half of the battle is 1. So concentrate on drawing the truth table. Then after it is plain mathematics. But before drawing the truth table, you have got to understand the logic, what you want as an output. Remember these combinational circuits are designed on the basis of given problem. So you define the problem domain. Once you have defined the problem domain, input gets fixed and the output gets fixed. That is what is your truth table. If you know your input, you know your output, draw the truth table in the form of minterms and then simplify. Unfortunately, Carnaut's map are not useful when the number of variables go beyond 6. Then we are not using these Carnaut's map. But this is a very good logical start to know about your computer and its logic circuit. First, try solving such problems and discuss it with your counselors from time to time. For the time being, thank you for being with me.