 Hi, I'm Zor. Welcome to user education. I would like to talk today about I think it's quite fascinating issue Well, eventually this is something which led people to creating computers Well, and some other electronic Toys like electronic watch and whatever Computers, that's the most important part of it. So computers do arithmetic and logic operations and Basically, I was personally was very much interested in how exactly it's done in Electronics because obviously this electronics is used to implement all this So all these miracles which we are see Implemented in contemporary computers. They have some base foundation How it's all done and it's all done based on some simple rules rules of mathematics and logic which are implemented in electronics so this and next few lectures will be Dedicated to implementation of basic logical operations using electronics primarily like diodes Now if these are done and implemented Then everything else all these complicated calculations, etc. They're all Done based on certain basic electronics, which I'm going to address very briefly very sketchy In this and subsequent lectures. So these Lectures will be dedicated to using electronics to implement logic Okay, this lecture is part of the course called physics routines. It's Presented on unizor.com website the lectures and Notes for each lecture. There is basically like a textbook Each lecture has a video part and the text part. There are some problems in certain cases. There are exams. I Do suggest you to use this website. It's completely free. There are no Financial strings attached. There are no advertisement and also there is a prerequisite course called mass routines on the same website and Basically, whatever what what I will be talking about today is related to mathematical logic so I will start with certain like repetition maybe of some mathematical logic and its operations and Gradually will lead to the next lectures, which will go to details of implementation of this logic in electronics so Okay, so let's do it first of all mathematical logic deals with basically two concepts true and false and And They are supposed to be somehow implemented in electronics now there is no like objective law which Tells us how to implement it people have decided basically It's a decision made by certain people who were in the first who were in the beginning of all this electronics revolution They have decided that if at certain point in electronic schema There is a positive potential then this represents true and If it's a zero potential relative to the ground of course and so it's basically the same as ground then it's Equivalent to false This is a just an agreement among people now usually they put even a concrete value for positive like five volts for instance, so so if it's a positive five volts then it represents True in logic in mathematical logic and if it's potentially zero Bolts, that's the that's the false again this is an agreement among people and everything is built on This particular agreement and then you can always think about like printer Which prints either zero or one? depending on whether on some input Contact of this printer is positive potential or zero well obviously we can do something Mechanical even so electronics which will go into mechanical parts when Something is moving and prints number one in case the positive potential is on some contact and if the positive if the Potentially zero it prints zero we can always think about this so This is an agreement now Let me just remind you very briefly about logical operations which mathematical logic and Obviously computers inherited it from mathematics What kind of operations exist? But before that, let me just tell you how it can be represented in real life in real skill just consider the following let's say you have at this point you have ground and On this point you have better okay now if you will Put some kind of a resistor in between This is positive. Let's say this is five volts This is connected to ground. So this is zero volts and There is a flow of electrons. Well, this is positive so flow of electrons from ground through this resistor to this positive contact on on the battery But these are permanent voltages Well, depending on obviously on the resisting resistance of this resistor You can definitely say that there is certain Current going electrons going this way the current by definition goes against the electrons that goes this way So in this represents true and this represents false at this particular Contact and this particular contact we have representation of true and false Okay, now let's talk about operations. Well, let me just remind you something which you Should know from any course which contains mathematical logic. What exactly we are doing with these two Concepts true and false. Well, there are operations So these are mathematical objects and operation on Mathematical objects leads to other mathematical objects. Now, there are Poonery and there are binary Operations now let's start with binary operations well disjunction which There are different symbols mathematical logic you Sometimes it's you letter In programming it's vertical bar Sometimes it's too vertical bar, but let's just not Confuse ourselves one vertical bar Sometimes it's even plus which I personally don't like because it kind of looks like Edition in mathematics, so we're not going to use this one. We'll probably use this as the most Frequently used in computer science Now what is this junction this junction is operation on two logical values true or false Delivering the output. So what do we have an input and? What do we have an output? Well, we can have true Or true. Oh, by the way, it's or Verbally, we're talking about disjunction, which is a very long word as for logical or So true or true the output is by definition true true or false by definition output is true and False or true gives us true and false or false gives us false It's actually reasonable considering this or Meaning of the disjunction is or so either or is true Yes, in this case both are true in this case one of them is true or one of them is true But if none of them is true then the result is full So if one of those is true the result is true and that makes sense So this is this junction now conjunction That's logical and and you will represent it as an ampersand Well in this case now, this is and which means the result will be true only if both are true and One true and another is true So this will be like true and true results true true and false results false Because again, this is and so only if both of them this and this is true the result result will be true and this is false in all other cases and the third logical operation which we will Talk about it's called exclusive or exclusive or or X or and the usual symbol is plus in a circle and the Operation X or sometimes it's also called addition by modular to so Because truth is really sometimes represented as one and false is represented as zero well again positive and zero and neutral so If you will use binary logic Which is good exclusive or it it looks exactly like addition by modular to so what we have here is True and Well, not X or true Gives us false. That's what's very important this one and one is true, but by modular to that's zero, right? Now true and false would be like one and zero that would be one which is true Falls and True Same thing true. It's zero plus one is one and false plus false Would be false zero plus zero is zero This is called X exclusive or or addition by modular to You see addition by modular to this is already some Reminds the arithmetic of the large if I will be able to implement These operations in electronics it means that I will be able to execute logical operations Arithmetic operations also will have will have it its own implementation But in many cases we do need logical or arithmetic operation and that's what computers do But every the sophistication we are seeing right now in computers. It's all based on elementary logic inside Okay, now these are binary operations now there is one Unary operation Unary means there is only one argument and it gives me the result. It's called negation not Negation and usually the symbol is something like this and If true not true that's false and not false is true This is kind of obvious. We're just reversing the signal If it was zero we're making it positive if it's positive. We're making it zero so all these is supposed to be implemented somehow in in in electronic schema and electronic scheme is supposed to deliver the result Electronic scheme which implements let's say this junction is supposed to give this result for corresponding Input signal so no matter what kind of four different variations exist on the input will have corresponding with these results on the output Basically, that's all I wanted to talk about today because the real implementation will be in the next lecture For instance, I will have a lecture about how to implement this junction and you will talk about the details Today I would like just to give you a taste of it I will draw a schema which on the peri-elementary level without any details gives you implementation of This junction I just want you to consider the following scheme so you have contact A which is connected to N odd of a diode this is diode at contact B which is also connected to This Then we will have some kind of resistor to the ground And this is the contact C My statement is that this very simple schema on a primitive level implements this junction Let's just think about it Remember what diode is This is an odd and this is cathode cathode is heated and If it has certain amount of electrons, there is an electronic cloud How's it called? Thermionic emission rate and these electrons on the cathode are attracted by positive an odd and Then basically there is a flow of electrons from cathode to an odd One way not another because only this part is heated Okay, so let's just consider different combination of signals A and B Which I claim to be like input signals and we'll and see what happens at point C. Well This is ground So if these are if one of these is positive One of these so one of them is positive and this is Zero as a ground or this is ground and this is positive or both are positive in any case the flow of electrons from the ground Will go either this way or that way So if this cathode is heated and this is positive now since we are connected to the ground and Basically, we have unlimited supply of electrons going through the resistor. We will have certain electrons here which will be In this electronic Electrons cloud and it will be attracted to positive signal and there will be a flow since there is a flow of Electrons here This is neutral always this is resistor and there is a flow. This will be positive See would be positive, right? so if this one is Positive then there is a flow here and see will be positive If this is ground and this is positive then the flow of electrons will be here this way electrons and Since electrons are moving here. There will be Deficiency of electrons so it's positive. So if either of these is positive then we will have C as a positive so if a B See if a is positive and B is 0 C will be positive if a is 0 Be positive If both of them will be positive C will be positive and only in case when both of them will be Under zero potential there is no attraction of the electrons There is no flow of electrons if there is no flow. This will be see will be zero as well Which corresponds exactly if true is plus and false is minus it corresponds exactly the picture of Disjunction so if this is disjunction That's exactly what's implemented we will talk about this again in the next lecture because I do Do want to dedicate one small lecture per operations and talk about the schema now? This is a very primitive schema The real ones are a little bit more complex, but in any case I just wanted to give you a taste how exactly Mathematical logic can be implemented in electronics in this case using diodes well, I Basically, that's it. I would like you to read the notes for this lecture on unisor.com. So you go to physics for teens course its electromagnetism and In the electronics part you will see this and all other lectures That's it for today. Thank you very much and good luck