W12-02 Go through the Gates #Logicgates #Electronics #SemiconductorPhysics

00:00

So, we once again started learning the basic addition and two numbers I gave an example

00:14

how to add two numbers. And essentially what we need in that exercise is the basic fundamental

00:21

thing I must know is the sum of two digits. So, here we have this sum that we did

00:30

last time and we saw that how I should know 1 plus 5 or 6 plus 3 or 0 plus 7 plus

00:39

8 and then there is a carry there is a sum carry and sum. So, essentially if you think

00:46

it is as a device what we are giving is we are giving two numbers a and b and we are

00:56

taking two outputs sum and carry. So, in all of these these kind of equations that

01:02

is written these are the two input numbers these are the two input numbers and these are

01:07

the two outputs one output you can call carry and another output you can call sum.

01:14

Same thing happens in the binary number edition also. The benefit is that we have only

01:20

two digits two symbols and therefore, the things are less in number simpler. So, let

01:26

me do a addition of two numbers written in binary system. So, let us take two numbers

01:38

in binary system. So, I have two numbers let us say 1 0 0 1 1 1 0 1 like that and then

01:50

the next number could be 1 here 0 here 0 here 1 here 0 here 1 here 1 here 1 here 1 here like

01:57

that and we have to add. So, what do I need 1 plus 0. So, I should know that 1 plus 0 is 1 and

02:09

if I write 1 I also write 0 here. So, this is carry digit and this is that sum digit. So, 1 plus

02:17

1 gives me sum that I write here and carry I write here. Then 0 plus 0. So, I should know that

02:26

0 plus 0 is 0. So, sum is 0 and carry is 0 and that sum is to be added in this. So, 0 plus 1. So,

02:36

0 plus 1 is also 0 1. So, sum is 1 and carry is 0. So, 0 plus 1 will be 1 and 1 plus 0 will be 1.

02:51

So, this will be 1 here. Then comes 1 plus 1. Now, what is 1 plus 1? So, 1 plus 1. So, the number

03:01

next to 1 in our counting we have one digit numbers exhausted then 2 digit number exhausted

03:11

then 3 digit number and so on. So, if I add 1 to this 1 I get the next number consecutive number

03:20

which is 1 and 0. So, that 0 is the sum and 1 is the carry. So, I put the sum here

03:28

and carry here and then 1 plus 1 is again 1 0 and 0 is the sum and 1 is the carry. So, this 1 plus

03:38

1 is 0. So, I have to remember that sum is 0 and that sum is to be added here 0 plus 0 and that is

03:47

0 and that carry still remains that carry goes here and then 1 plus 0 is 1 and that 1 plus 1 is

03:57

1 0. So, these 0 goes here 1 goes here 1 plus 0 is 1 1 plus 1 is 0 here and 1 here and now,

04:08

I have 1 plus 1 and plus 1. So, 1 plus 1 and plus 1. So, 1 plus 1 is 1 0.

04:17

This 1 and this 0. The sum is to be added here and carry I have to remember. So, that sum is added here

04:24

and then that gives me 1 here and that carry goes here there is nothing here 0 0. So, that is 1.

04:33

That is how we sum the numbers. Similar procedure as we did in decimals.

04:41

So, the basic things I must know for this addition is addition of these two digits. So,

04:49

if I write it as a device then my inputs are here A and B, let us call it A and B and I have

04:59

two outputs which I can call C and D, C and B and then this is this is some kind of a circuit

05:10

digital circuit and then the circuit should be such that if I write A here B here and S here

05:22

and or let me let me see here and S here. So, if this is 0 0, if this is 0 0 I should get

05:32

0 0 0 carry and 0 sum which should be 0 and 0. If it is 0 1 then I should get sum as 1 and carry

05:43

as 0. If this is 1 and this is 0 1 second I should get the same thing and if this is 1 and this is 1

05:51

and carry should be 1 and sum should be 0. This is the input output that is our requirement.

06:01

My circuits should do this, this circuit should do this. If I take this A as 1 and B as 1 I must

06:10

get the output C carry as 1 and output D as 0 and similarly for E all combinations. Since there

06:18

are only two inputs so I have four combinations. So, when you exhaust all the combinations of

06:25

input and tell what should be the output corresponding to these inputs that table is known as

06:33

truth table. This is known as truth table and our circuit will take these inputs that means

06:44

voltages will provide low and high. We have to pre-defined normally say 0 to 0.8 volt or 0

06:51

to 1 volt is low. So, anything if I apply 0 volt here 0.5 volt here that is low and that will

07:00

be treated as 0 and anything if I apply here which is pre-defined more than two volts that I can

07:09

define how much is that. So, if it is high if it is that high voltage more than two volts

07:15

then that is 1 and similarly for B. So, this is the kind of circuit which we call digital circuit

07:22

which takes only digital inputs it takes voltages it takes only voltages but those voltages I see

07:30

it as digital either low or high I do not distinguish between 1.7 and 1.8. So, for us it is

07:38

digital 0 or 1 this is the kind of circuit. Now, how to design such circuits how to design such

07:48

circuits in which the input is given as voltages and depending on what whether it is high or

07:56

it is low desired output is achieved. This is by the way this is the truth table this kind of

08:04

combination this is also known as half adder 1 half adder because here you had seen I had

08:16

this 1 plus 1 plus 1. So, I had to do some mental calculation 1 plus 1 will give me one

08:22

carry and then 0 sum and then I have to remember that the carry is still there and some is to

08:29

be added in the sum and so on. So, if we can put three numbers together as input and then

08:37

ask what is the final sum and what the final carry. So, that means I will have circuit in which

08:44

three inputs will go a b and c a b and say like here 1 1 1 here 1 0 1 1 0 1 1 1 0. So,

08:59

there are three inputs and then I need the final sum and final carry I do not want to remember

09:06

in between what happened and then carry in my mind also. So, if I have this kind of circuit

09:13

designed and then I say that I need the final carry and the final sum you can make your truth

09:21

table you can make this kind of table this time you have let me not call it c c is for carry

09:31

let me call it d or x y z let me call it x y z no confusion x y and z. So, you can make a table

09:46

x y and z and then carry and the sum and then you can put numbers here here here what should

09:53

be the carry what should be the sum how many rows will be there how many rows will be there

10:00

there are three inputs each input can be 0 or 1. So, there are those combinations are to be written

10:09

all those combinations are to be exhausted 0 0 1 0 0 0 every everywhere you have to

10:17

make so 8 8 rows and for each row you know how much is c and how much is s and that kind of

10:27

truth table that kind of circuit which can do this that is known as full adder.

10:40

So, any digital circuit which takes digital input and gives digital output that is digital

10:49

it takes digital input means it still it is an amplifier it is a transistor or it is some

10:56

some electronic circuit combination of diodes, transistors or resistances it is a circuit

11:03

electronic circuit and electronic circuit only takes voltages and currents and it gives

11:10

output as voltages or currents but then the design is such that if the voltage is in this range

11:18

any if I call it 0 and if the voltage is in that range I call it 1 and similarly for output

11:25

and for input then I should get this truth table implemented. So, that is the digital circuit it takes

11:33

digital inputs and it gives digital outputs could be one output could be more output could be one

11:40

input could be two input could be three input and so on. Now, to design such a circuit the basic

11:52

block basic blocks with which you design complicated circuits are called logic gates.

12:00

So, logic gates these are themselves digital circuits and there are several of them I will

12:20

describe and these are taken as the basic blocks. So, you have one single unit one integrated

12:29

circuit you go in market and say this logic gate and you get that. So, the whole circuit is inside

12:35

and then use those gates and combine them in appropriate fashion to design the circuit which

12:44

keeps you desired outputs at desired inputs right. So, some of them which are very basic and

12:54

which I will describe the first one is let us talk of this not gate this is called not gate

13:05

and what is this it is very simple it takes one input and it gives one output. So, this is not gate

13:15

and not gate takes one input just one input and then it gives one output.

13:20

A let us call it A and let us call it Y. So, if A is one truth table is very simple if A is one

13:32

then Y is 0 and if A is 0 then Y is 1 finish this is the truth table for not gate. So, if this is one

13:44

this should be 0 if this is 0 this should be 1 that kind of circuit is known as not gate and

13:53

you must remember we have already discussed this kind of circuit and it is nothing but a transistor

14:02

at transistor in switch mode okay a transistor in switch mode. So, if you have a transistor

14:22

if you take N P and transistor as we had been doing it you have that load resistance or collector

14:31

resistance and then you put your biasing here you put some resistances some capacitance is

14:39

all those things I am not showing and then here is that input right. So, you can put a resistance

14:48

here you can put a resistance here and then this is the input point. So, essentially this is it

14:55

is like this and that is this is that point A and you can take your output from here this is the point Y.

15:05

Okay. So, if you operate it as a switch that means this voltage is given high

15:14

suppose you give 5 volt here and then this base emitter junction is forward bias and it goes and this

15:21

is a sufficient to drive the transistor in saturation mode okay you have a cutoff mode you have

15:28

saturation mode in between you have that active mode linear region right. So, B in saturation mode

15:35

or in cutoff mode so if the voltage is given here if sufficient voltage is given here so that you

15:42

have driven the transistor in saturation mode then the maximum possible current can go in that

15:49

configuration and then you have a current from here and once you have current from here then you

15:55

have drop your potential drop here okay and therefore this potential is low right in collector

16:06

current goes like this this is NP and remember so it goes like this and so this is high voltage

16:13

but then you have drop here and this becomes low voltage. So, if you put high here if A is high

16:24

B Y is low okay you apply a voltage high voltage high voltage means not 1000 volt high voltage means

16:33

I in our case is just 3 volts 4 volts 5 volts which drives this into saturation mode.

16:39

So, that there is a current from here there is a potential drop and this becomes quite low

16:46

and if you give this low if you give this low you you do not put a battery you give 0 voltage here

16:55

then no current goes it in cutoff region and since no current goes anywhere no current goes here

17:03

so the potential here and potential here it is same and this potential is high so this potential

17:09

also becomes high so this transistor single transistor itself is is not gate so you give one

17:21

input you get one output if the input is one output is 0 and if input is 0 output is 1 and there is

17:29

symbol for it okay symbol for not gate and that symbol is you put a triangle and put a line here

17:47

put a small circle here and then a line here and this is the input this side is the input side

17:54

and this side is the output side so this circle actually denotes not operation so this is a symbol for

18:10

not gate so this one symbol is 1 then next is let us take and gate so next one let us take

18:26

and gate it is called and gate this and tells that if you are all inputs are high if you are

18:39

two inputs the first input should be high and second input should also be high say both the inputs are

18:47

high then the output is high and if any one of them goes to low or both of them go to low

18:55

then the output is low that is why the name and so that means if I draw the truth table

19:05

if it is two input and one output the basic and gate will have this you can have more inputs

19:13

but the basic and gate will have two inputs and one output so if this is 0 this is 0 this is also 0

19:21

right and then if this is 0 this is 1 still this is 0 because a and b both should be high to

19:31

give you this high value of y so 1 and 0 that should be 0 and 1 and 1 that is equal to 1 so if

19:45

you have a circuit of this kind that circuit will be called and circuit both of them should be

19:53

high then only the output is high otherwise it is not so it is not our binary addition one plus

20:01

one is one here so that and it should not be taken as a addition or this two and three makes

20:09

five it is not like that now this kind of thing you can think without any semiconductor or anything

20:17

like a switch so you can have a two switches it is just to conceive the idea what is add you can

20:28

have two switches and this can be treated as input and then you have a lamp out here

20:36

so this is your output this is a lamp and this is our output and then you have appropriate

20:48

battery or power source okay so you can treat this as a this as b and this is y lamp on

20:58

y is equal to 1 and lamp off y is equal to 0 that is the output and input switch S1 so any

21:13

switch any switch if it is closed closed means connected so if the switch is closed that we will

21:23

call 1 this is your input a or b and if the switch is open as it is shown in this figure

21:32

so it is open so that we will call 0 so if you take this as the meaning of

21:42

one and 0 then you can see that if a is 0 and b is 0 if a is 0 and b is 0 so it is open

21:51

both switches are open and then the lamp is not glowing and you say that y is equal to 0

21:59

and if one of the switches closed other switches open so a is 1 and b is 0 so a is 1 and b is 0

22:11

so that case also there is no current in the circuit the lamp is off and therefore y is equal to 0

22:17

if it this is open and that is closed then also the same story and if both the switches are closed

22:24

so that this a is 1 and b is 1 then it glows and if it glows if it is on then we say that y is

22:32

1 so 1 and 1 is 1 so this is the meaning of this add you can now make this add

22:44

digital circuit using p n junction diodes let us see how

22:53

so let me take two diodes one diode here p n junction this is p side this is inside

23:02

you remember that another diode here join this together and put a resistance

23:12

and then a battery cell here could be two volts three volts and this is our ground this is our

23:23

ground and let these two be the input points a and b and let this be the output point y

23:36

and see if this can do that and operation what is that and operation the and operation is

23:50

if a is 0 b is 0 y is 0 then if a is 0 b is 1 then y is 0 if this is 1 this is 0 then this is 0

24:02

and if this is 1 this is 1 then this is 1 that is the end operation so what happens if this a is 0

24:15

and this b is 0 that means this is given 0 volts this is given 0 volts I am connecting this to the ground

24:24

I am connecting this to the ground remember this kind of symbol it means that this is connected

24:31

to this line here and this is also connected to that same line here so in this case both the

24:41

diodes are forward biased you have a higher voltage here and a lower voltage here so it is

24:49

forward biased and therefore you have current through this diode the current goes like this and then

24:56

it comes back and goes into the battery the current goes like this and comes back and goes into

25:01

the battery and since the current is going it is forward biased the drop here on this p and junction

25:10

is very small 0.2 volts 0.3 volts 0.5 volts or more than that 0.6 volts maximum so if this is 0

25:20

this will only be a small voltage here and for digital operations that is same as 0 low so this is

25:29

low voltage and therefore y is 0 y is 0 and then what happens if a is 0 and b is 1 a is 0 means

25:39

a remains grounded but now b is at 5 volts this b is at 5 volts let us say 5 volts

25:47

so if we have put 5 volts here that means we have put a battery another battery here and that

25:53

battery is connected to this negative here and this is a plus 5 going that what happens this becomes

26:01

reverse bias you have put full 5 volts here no current through this no current through this

26:09

but does it matter this is still grounded a is 0 this is still grounded and therefore this

26:18

higher voltage this is lower voltage this is forward biased and therefore the current will still

26:23

be there and once the current is there once again the same story this is this is 0 and this only

26:29

a small voltage which is 0 and here it is 5 volt there need to be 5 volt this is the no current

26:37

is going so it is just possible this side is 5 and this point is very small volt so that is fine

26:43

so this is low so this is a low and similarly if a is 1 and b is 0 then this will be 0 you are

26:53

changing the these two swapping these two put 5 volt here put 0 volt here then this will

27:01

be reverse to bias no current from here and the current will be only from here what happens if

27:08

a is 1 and b is 1 this one a is 1 and b is 1 so I am giving 5 volt to a and 5 volt to b

27:17

now both the diodes are reversed bias no current going from here no current going from here

27:28

and therefore no current going from here gets off junction rule no current going from here so

27:33

whatever is this voltage that same will be this voltage and therefore this will be high and hence

27:41

you have 1 1 and 1 so this is how this and can be implemented using this diodes I can also do this using

27:53

transistors we had shown how that switches can be used to light that lamp and that equivalence

28:03

of that answer kit and transistor can be used as a switch so that same switch circuit I can

28:11

put 2 transistors and then make this and circuit using those so next time I will show that

28:19

and then we will talk about several other gates and their circuits.


Description

The subject matter covered includes binary addition, where two numbers are added using only two digits - 0 and 1. The video explains how this process can be thought of as a device that takes two input numbers (a and b) and produces two outputs: a sum and a carry digit. This concept is then applied to the world of electronics and semiconductor physics, where logic gates are used to perform logical operations on binary inputs. Logic gates are digital circuits that operate based on true or false conditions, producing an output based on these inputs. The video explains how these gates work by using AND, OR, and NOT gates as examples. It also covers the concept of sum and carry digits in binary addition, showing how to add two numbers represented in binary form. The content is presented in a way that's easy to follow for learners, making it suitable for those interested in electronics and semiconductor physics.