I already know all this stuff, but I watched the whole video simply because Professor Brailsford is such a wonderful lecturer. This is one of my all-time favorite channels, thanks for keeping with it! I would love to see a video going further into binary logic, for instance how NAND/NOR are used in flash memory, or how XOR is more generally used.
Christopher Pilcher Same. It’s like getting a masterclass in how to teach this stuff. I’ve been telling my son about propositional logic/Boolean algebra because it seems so useful in so many areas, most obviously computer science
Computerphile, you might consider doing an episode on the implementation of logic gates in RTL / CMOS so viewers can learn how all this actually works in silicon. I think Professor Derek McAuley has some knowledge on this from his discussion on Moore's Law. Great and interesting topics! Great work.
@KamaCoding It's simply a way of denoting things more precisely. Heisenberg's uncertainty principle, Euler's Number, Karnaugh Map, Pythagorean Theorem would be Principle, Number, Map and Theorem without the descriptive name of the practitioner who is most closely associated with it. Yes, owing to the time most of these discoveries were made, that being a time in which the preeminent science and math cultures of the world were western ones, many of these concepts have an Anglo name attached. I suspect in the future, we will see many more non-western names associated with discoveries to come.
@KamaCoding No, it's a Karnaugh map. Everyone studying computer architechture/organization knows this. To bring up culture here is not very elegant or clever.
18vallancel if the 2 is interpreted as a symbol and the ~ applied on (2B) as a whole on the RHS "technically speaking" thats a tautology => true. Did i break Shakespeare yet?
I absolutely hated Truth Tables in high school math. I think they got introduced 1st in Like algebra II OR III & got ever more complicated in Geometry & I think also Trig?? I took as many honors classes as I could & I think We even saw them pop up in my Physics class. I wish I hadn’t of hated them so much as this is one of those moments of- ‘If only I knew then what I know now…’ I would’ve appreciated them, tried a bit harder, & understood a helluva lot more about why they exist & their function to everyday life.
You can actually create any gate using only nor gates or only nand gates. I'm pretty sure actual computers use nands (transistors) whereas Minecraft logic uses nors (redstone torches).
actually you can frequently interchange where nands and nors are used. You can build a transistor based nor gate in the same amount of material as it does to build a nand gate. really its all dependant on the type of logic you are building. for instance building a S/R latch with nor gates is cheaper than building it with NAND gates because with NAND, bot S/R have to be inverted before feeding into the latch itself.
The nand gates in real computers are only a few micrometers across (I don't known the actual distance) and can transfer a signal extremely fast. A single not gate in Minecraft can take up to 2m^3 in volume and passes signals in just 1/10 of a second.
I know that I'm quite late with my comment (3 years it seems), but I really wanted to say how much I like how Professor Brailsford cares about the electronics engineers. Much appreciated!
Noob question: At 1:20 when he says 0 and 0 is false, why is that? Could it be argued that because both are in a "false state" so to speak it is actually true? True that both are false?
To our european viewers: The way Professor Brailsford draws his logic gates is not what you'll usually see around here, as he uses a US standard. We simply draw squares with a symbol in it (& for and, ≥1 for or, etc). We also use the little circles denoting not operations for brevity, and all in all I think it's nicer and more intuitive than the random shapes which you have to memorize. Seeing how americans like random standards (three feetsies in a yard!) it doesn't surprise me that they still use it though :P The US-standard is called US ANSI 91-1984, the european one IEC 60617-12.
The logical addition actually represents the exclusive or and it perfectly makes sense when you realise that the mathematical structure ({0;1};+;⋅) in which you perform your calculations is identical to ℤ/2ℤ, hence 1 + 1 = 0.
+ is merely a symbol and you can define it any way you want really. It's also gotta be said that not only ℤ/2ℤ can form a boolean algebra, any lattice with a couple of additional properties does. + for regular old or starts to make a lot more sense when you look at how you'd build it with transistors, which is more or less just "connecting wires" - so HIGH signal + HIGH signal still equals HIGH signal, not LOW.
Very interesting to a layman like me to see how abstract logic takes on a physical form through electronics! I imagine that's how computer circuits work at a very fundamental level? Computer science must be an interesting subject.
Hello, At the top of the page it is written AND OR NOT XOR Then in the video we are explained the AND, the OR, the NOT and the NOR So is an XOR same as a NOR ?
Amelia explained it precisely in truth table form but it's the eXclusive or. In the exclusive case if A or B are true, then the output is true, BUT if A AND B are both true, then the output is false. To compare it to real life an exclusive or is similar to where you order a meal at a restaurant, and you have a choice between soup OR salad as the side dish. This is an example of an exclusive or as we can have one or the other, but not both. When dealing with or's we assume them to be inclusive, and because of this fact we have the always funny (but extremely corny) joke: "A logician goes out to dinner and orders the steak, the server asks if they would like the soup or salad, the logician responds yes." //_^
More specifically: we do indeed have three basic logic gates. But to create the others, two, for example NOT and AND, are enough. NOT ( (NOT X) AND (NOT Y) ) X OR Y
wow... I somehow can believe that you've decided to throw away Computer related operational characters in favor of all the non-ascii depictions.. I'm sure it's been posted already that the characters commonly associated with these opperations are & (and), | (or), ! (not) I'd expect this treatment out of numberphile, but common guys...
NOT is also written a lot of times with a bar over the input designator. For example, if the input is designated as A, NOT A will be written as an A with a line or bar over it.
You can actually do anything you need with a nor or a nand, since (A'+B')'=A*B & (A'*B')'=A+B. This is because and & or each act for 0 like the other acts for 1.
I think IEC symbols are easier to read wgere you don't have to remember a symbol for each logic function instead the IEC symbols pretty much explain themselves.
easter egg - fun fact (at least in the versions I've found) there is no easter egg in the "easter egg" entry of the jargon file. Which seems a wasted shame.
It almost feels criminal to not talk about NAND gates. There should be a following video about it. You also need a video about how once you have established a NAND gate your binary logic is completed.
The and gate isn't even needed to make it logically sufficien is it? And can be expressed by just or and not gates: ~(~a v ~b)Also or can be expressed by and gates and not gates: ~(~a and ~b)
***** do any of the guys involved with this (or any of Brady's other channels) actually play minecraft, it would make a great way to demonstrate these concepts
I prefer to think that NOT symbol is just that little circle. That way we already know that the triangle is just a simple buffer, so the circle with a triangle is actually a negating buffer.
This is a strange video for this gentleman. He never mentioned why any of these operators are important. Granted if you watch previous videos you can work it out, but I thought this channel assumed every video you started with zero knowledge on the topic.
You forgot the And + Not for a Nand, as you did the Nor, but yeah I learned 3 notations today, all I knew before was the pictures of them but never the notation so it was neat.
Time for logic! There are three AND gates, one OR gate, and one NOR gate. One signal is connected to the A on the first AND gate, and one signal is connected to the B on the first AND gate. Signal A is off. This AND gate is also connected to the OR gate. A signal is connected to the A signal on the second AND gate. There is another signal on the second AND gate. Signal A and Signal B are on. The NOR gate has a signal that is on. The NOR and OR gate are connected to the A and B signals of the last AND gate. Is the last AND gate on or off?
Not is often also represented by the 'bang' symbol "!" And fun math logic, if you 'not' a logic pair, like a+b, and factorally apply the 'not' to the formula like a multiplier you also flip the operator symbol. Ex: ! = not !(a+b) ==> !a.!b Not(a and b) ==> not a or not b
That’s much simpler than the traditional way it is taught. Why don’t we come up with world standards for electronic symbols? Would make things much simpler. Thank you.
For people who are wondering how Not Gates really work. Not Gates technically doesn't turn convert the input into it's inverted state. Your input will just be read not modified. Instead. Gives you an output based on what your input is. Look it up and you'll know what I mean.
I like a line over the notted symbols, because then you get this little mnemonic: Break the line, change the sign. I can't write it with the line over here, but it's a handy shortcut: !(A + B) = !A . !B It's also a little easier to read when you've got a complex equation. Fewer parentheses all over the place.
Here in Spain the a.b(Many-times even a dot-less ab) is more commonly used, at least in college, than the a and b. Same thing for the or, but with the NOT we use it like !a, the ¬ is only used in maths. Also, with CMOS gates, the NOR and NAND are not a gate with a NOT behind, but the other way around, the OR is a NOR with a NOT "glued" behind.
Nicely explained. Still, I have a query, what is the need of NOT gate, why was it introduced? I want to explain same to a non-IT professional, can you give me a real world example where such implementation exists?
I imagine it is used when flipping bits, before using the Adders to add one, in calculating two's complement, which allows you to sign numbers, therefore representing the negative ones. That's a guess. Also, to do this would require combining a couple of Nots into a device called a 'Noter', which would be able to invert several bits. This would all be present in the arithmetic and logic unit of the CPU.
I already know all this stuff, but I watched the whole video simply because Professor Brailsford is such a wonderful lecturer. This is one of my all-time favorite channels, thanks for keeping with it!
I would love to see a video going further into binary logic, for instance how NAND/NOR are used in flash memory, or how XOR is more generally used.
Christopher Pilcher Same. It’s like getting a masterclass in how to teach this stuff. I’ve been telling my son about propositional logic/Boolean algebra because it seems so useful in so many areas, most obviously computer science
@@SuperBartles what other areas?
Had to learn this if you wanted to use redstone in Minecraft
True
Had to learn this (and beyond) to operate real life.
Similar to real life, only NAND and inverters are efficient in Minecraft, everything else needs extra pieces
But I leaned logic gate through redstone
@@Henrix1998 isn't or the simplest
Computerphile,
you might consider doing an episode on the implementation of logic gates in RTL / CMOS so viewers can learn how all this actually works in silicon.
I think Professor Derek McAuley has some knowledge on this from his discussion on Moore's Law.
Great and interesting topics! Great work.
That "square matrix" is called a Karnaugh map
@KamaCoding Interesting. What culture does not?
@KamaCoding It's simply a way of denoting things more precisely. Heisenberg's uncertainty principle, Euler's Number, Karnaugh Map, Pythagorean Theorem would be Principle, Number, Map and Theorem without the descriptive name of the practitioner who is most closely associated with it. Yes, owing to the time most of these discoveries were made, that being a time in which the preeminent science and math cultures of the world were western ones, many of these concepts have an Anglo name attached. I suspect in the future, we will see many more non-western names associated with discoveries to come.
@KamaCoding No, it's a Karnaugh map. Everyone studying computer architechture/organization knows this.
To bring up culture here is not very elegant or clever.
2B + ~ 2B
That is the question
You are mixing up the symbols.
2B || ~2B
18vallancel if the 2 is interpreted as a symbol and the ~ applied on (2B) as a whole on the RHS "technically speaking" thats a tautology => true. Did i break Shakespeare yet?
iamterence77 I know :)
True.
I like the way this guy explains things..are there more? Can I watch him exclusively?
I am 15 y/o and i learn this in school so this subject is amazing
You teach this better than my computing teacher 😂💛
in binary, 1+1=10 and the last digit is 0, so why isn't xor called logical sum instead of or gates?
Professor Brailsford seemed quite happy about explaining this ^^
Probably the only Computerphile video in which I understood everything that was said.
Thanks to Little Big Planet 2 I already knew that :)
disappointed that you didn't show the actual mechanics of how these work, personally I think that the logic behind it is pretty simple and intuitive
That "easter egg" at 2:00 would've been fun if it lead me somewhere but this was a lot of ones and zeros to begin with. whatever I still had some fun.
Great video, thank you!
One way of representing an OR gate mathematically is *a + b - (ab)*
How did you come up with that formula?
I absolutely hated Truth Tables in high school math. I think they got introduced 1st in Like algebra II OR III & got ever more complicated in Geometry & I think also Trig?? I took as many honors classes as I could & I think We even saw them pop up in my Physics class. I wish I hadn’t of hated them so much as this is one of those moments of- ‘If only I knew then what I know now…’ I would’ve appreciated them, tried a bit harder, & understood a helluva lot more about why they exist & their function to everyday life.
reminds me of dem meincraft!!
not = redstone torce + dirt
and = dirt 1x3 + 3 torches + dust
or = 2 blocks + 2 repeaters + dust
the and gate of minecraft is actually a NAND gate
This guy could sell ice to a penguin
Wonderful explanation, so calm and clear! Thanks
Omg I knew AND was A multiplied by B but I didn’t know why until just now and it’s so simple and I feel so dumb for not putting that together myself
David Attenborough for logic.
That 'different way' is called Karnaugh map ;) .
As soon as you mentioned multiplication, it hit me that or is just + and xor is -. I’m working on some assembly stuff, so that might come in handy.
Xor is equivalent to minus! I never thought of that
@@tanveerhasan2382 how is it? 0-1 is not 1
@@m_t_t_ it's minus 1
xor is exactly + mod 2, isn't it ?
Reminds me of a punet square from early biology class. I know I spelled that wrong so don't crucify me.
COMPUTERphile, but the only notation they don't mention is the programming one, funny.
and - &&
or - ||
not - !
and (computer science) ∧ (n-ary) ⋀
or (computer science) ∨ (n-ary) ⋁
not (programming) ~ (sign) ¬
i've never seen the ~ notation for not. the other one we used in Discrete was to put a bar over the item.
You can actually create any gate using only nor gates or only nand gates. I'm pretty sure actual computers use nands (transistors) whereas Minecraft logic uses nors (redstone torches).
actually you can frequently interchange where nands and nors are used. You can build a transistor based nor gate in the same amount of material as it does to build a nand gate. really its all dependant on the type of logic you are building.
for instance building a S/R latch with nor gates is cheaper than building it with NAND gates because with NAND, bot S/R have to be inverted before feeding into the latch itself.
All gates can be made with Or And Not Nor and Nand
The nand gates in real computers are only a few micrometers across (I don't known the actual distance) and can transfer a signal extremely fast. A single not gate in Minecraft can take up to 2m^3 in volume and passes signals in just 1/10 of a second.
Final Spartan
what about if you not use and and or or and nand or and nor?
angeldude101
Modern cpu gate size is on the order of 20 nanometers.
Easter egg.
Easter egg.
I wasted all that time
For Easter egg
Just
Just great
I know that I'm quite late with my comment (3 years it seems), but I really wanted to say how much I like how Professor Brailsford cares about the electronics engineers. Much appreciated!
Anyone else knew this because of minecraft?
I got the “easter egg” message without an ASCII table.
This is so clearly explained and so simply put. Honestly, fantastic tutorial
Good video, prof. I am learning logic gates right now. Quite an interesting topic.
The current memory circuits in todays electronics are made of NAND gates (an AND gate combined with a NOT gate ). :-)
Noob question:
At 1:20 when he says 0 and 0 is false, why is that?
Could it be argued that because both are in a "false state" so to speak it is actually true?
True that both are false?
That's because on AND gate, you multiply the two inputs to get the output and 0 in binary is considered false and 1 true, then:
0*0 = 0 > false
Thank you for this! Great help in only a few minutes! You guys rock!
To our european viewers: The way Professor Brailsford draws his logic gates is not what you'll usually see around here, as he uses a US standard. We simply draw squares with a symbol in it (& for and, ≥1 for or, etc). We also use the little circles denoting not operations for brevity, and all in all I think it's nicer and more intuitive than the random shapes which you have to memorize. Seeing how americans like random standards (three feetsies in a yard!) it doesn't surprise me that they still use it though :P
The US-standard is called US ANSI 91-1984,
the european one IEC 60617-12.
The logical addition actually represents the exclusive or and it perfectly makes sense when you realise that the mathematical structure ({0;1};+;⋅) in which you perform your calculations is identical to ℤ/2ℤ, hence 1 + 1 = 0.
+ is merely a symbol and you can define it any way you want really. It's also gotta be said that not only ℤ/2ℤ can form a boolean algebra, any lattice with a couple of additional properties does.
+ for regular old or starts to make a lot more sense when you look at how you'd build it with transistors, which is more or less just "connecting wires" - so HIGH signal + HIGH signal still equals HIGH signal, not LOW.
Very interesting to a layman like me to see how abstract logic takes on a physical form through electronics! I imagine that's how computer circuits work at a very fundamental level? Computer science must be an interesting subject.
Hello,
At the top of the page it is written AND OR NOT XOR
Then in the video we are explained the AND, the OR, the NOT and the NOR
So is an XOR same as a NOR ?
辛格文 XOR is a separate video, sorry for the confusion - XOR coming very soon!
Amelia explained it precisely in truth table form but it's the eXclusive or.
In the exclusive case if A or B are true, then the output is true, BUT if A AND B are both true, then the output is false. To compare it to real life an exclusive or is similar to where you order a meal at a restaurant, and you have a choice between soup OR salad as the side dish. This is an example of an exclusive or as we can have one or the other, but not both.
When dealing with or's we assume them to be inclusive, and because of this fact we have the always funny (but extremely corny) joke:
"A logician goes out to dinner and orders the steak, the server asks if they would like the soup or salad, the logician responds yes."
//_^
Why does RUclips offer better lectures than my university?
Great video! :)
2:00 Nice Easter Egg.
What did it mean in text
Akari Insko "easter egg"
More specifically: we do indeed have three basic logic gates. But to create the others, two, for example NOT and AND, are enough.
NOT ( (NOT X) AND (NOT Y) ) X OR Y
Would XOR emulate addition with AND representing the carry bit?
Having problems with circuits? Try circuit solver Stumble Upon: 'Circuit Solver' by Phasor Systems on Google Play.
wow...
I somehow can believe that you've decided to throw away Computer related operational characters in favor of all the non-ascii depictions.. I'm sure it's been posted already that the characters commonly associated with these opperations are & (and), | (or), ! (not)
I'd expect this treatment out of numberphile, but common guys...
NOT is also written a lot of times with a bar over the input designator. For example, if the input is designated as A, NOT A will be written as an A with a line or bar over it.
and still others use a / to denote the negative state, eg "/A", typically when you're using plain text.
You can actually do anything you need with a nor or a nand, since (A'+B')'=A*B & (A'*B')'=A+B. This is because and & or each act for 0 like the other acts for 1.
I think IEC symbols are easier to read wgere you don't have to remember a symbol for each logic function instead the IEC symbols pretty much explain themselves.
Got here a bit late. But now I have to go see if Karnaugh (sp?) map is covered as the natural extension of this series.
My question after watching the whole thing??....Who is Docter Baggleea?
Fun tidbit: the "or" symbol ∨ comes from the Latin word "vel," which translates to "or."
easter egg - fun fact (at least in the versions I've found) there is no easter egg in the "easter egg" entry of the jargon file. Which seems a wasted shame.
It almost feels criminal to not talk about NAND gates. There should be a following video about it. You also need a video about how once you have established a NAND gate your binary logic is completed.
I can't find any video about 'boolean satisfiability problem' on the computerphile channel :(Are you going to make one?
The and gate isn't even needed to make it logically sufficien is it? And can be expressed by just or and not gates: ~(~a v ~b)Also or can be expressed by and gates and not gates: ~(~a and ~b)
***** do any of the guys involved with this (or any of Brady's other channels) actually play minecraft, it would make a great way to demonstrate these concepts
I prefer to think that NOT symbol is just that little circle. That way we already know that the triangle is just a simple buffer, so the circle with a triangle is actually a negating buffer.
This is a strange video for this gentleman. He never mentioned why any of these operators are important. Granted if you watch previous videos you can work it out, but I thought this channel assumed every video you started with zero knowledge on the topic.
*What about XOR?*
Actual to jus describing AND and NOT are suficient, isnt it? Since AND is the invertion or OR
You forgot the And + Not for a Nand, as you did the Nor, but yeah I learned 3 notations today, all I knew before was the pictures of them but never the notation so it was neat.
Helpful knowledge when building a recycling facility in Fallout 4.
Time for logic!
There are three AND gates, one OR gate, and one NOR gate.
One signal is connected to the A on the first AND gate, and one signal is connected to the B on the first AND gate. Signal A is off. This AND gate is also connected to the OR gate. A signal is connected to the A signal on the second AND gate. There is another signal on the second AND gate. Signal A and Signal B are on. The NOR gate has a signal that is on. The NOR and OR gate are connected to the A and B signals of the last AND gate. Is the last AND gate on or off?
This video helped me understand the circuit system in Factorio... :)
Ain't no problem. Someday I'll understand this.
Every way to denote logic functions that doesn't need Unicode is boring and therefore Wrong™.
"Bless his cotton socks" did he really say that? 7:06
are you offended
Any reason why you didn't state C type bitwise operators? & |
I hoped for an explanation how the NOT gate is actually build.
All of a sudden, Minecraft Redstone makes a lot more sense...
Not is often also represented by the 'bang' symbol "!"
And fun math logic, if you 'not' a logic pair, like a+b, and factorally apply the 'not' to the formula like a multiplier you also flip the operator symbol.
Ex: ! = not
!(a+b) ==> !a.!b
Not(a and b) ==> not a or not b
Is XOR similar to OR except there can only be one 1 (one true and one false)?
There is another easter egg nobody but me might have found yet... White and Gold
For the and gate, output is false if the result shares a row with a false input. Same for any column that contains a false.
what about !a in most languages it is the 'NOT' operator, not factorial.
Found the Easter egg. Worth writing it out and adding the slots. Back to the video I go!
there also other schemes, e.g: ~, &, |, ^
subscribed
I have a different way of creating logic operations. Any one to help me create a prototype
Anybody else here from frums - XNOR XNOR XNOR ?
Oneplus One was really the 2014 flagship killer
There are "and gates" and "or gates" then there is " bill gates" 0010110010100
He should have done XOR (exclusive or).
That’s much simpler than the traditional way it is taught.
Why don’t we come up with world standards for electronic symbols? Would make things much simpler.
Thank you.
And Or Not Nand Nor Xand Xnand Xor Xnor for a total of 8 logical gates. N stands for not and X stands for eXclusive.
Why do you use 3 different kinds of notation? that's silly!
inputs A and B
not ((not A) or (not B)) = A and B
also
not ((not A) and (not B)) = A or B
He has an Apple - I did NOT see that coming.
woah great it's so wonderful learning like that
This helps me remember that AND starts before OR. multiplication before division. Could be a bad way to think about it.
Why logic gate invented or created or discovered ?
For people who are wondering how Not Gates really work. Not Gates technically doesn't turn convert the input into it's inverted state. Your input will just be read not modified. Instead. Gives you an output based on what your input is. Look it up and you'll know what I mean.
Another common notation for NOT is the overbar.
I like a line over the notted symbols, because then you get this little mnemonic:
Break the line, change the sign.
I can't write it with the line over here, but it's a handy shortcut:
!(A + B) = !A . !B
It's also a little easier to read when you've got a complex equation. Fewer parentheses all over the place.
Yeah! My t-shirt design has a large 2B on the back, then a OR NOT gate symbol on the front. Rather Shakespeare like.
Here in Spain the a.b(Many-times even a dot-less ab) is more commonly used, at least in college, than the a and b. Same thing for the or, but with the NOT we use it like !a, the ¬ is only used in maths.
Also, with CMOS gates, the NOR and NAND are not a gate with a NOT behind, but the other way around, the OR is a NOR with a NOT "glued" behind.
Nicely explained. Still, I have a query, what is the need of NOT gate, why was it introduced? I want to explain same to a non-IT professional, can you give me a real world example where such implementation exists?
I imagine it is used when flipping bits, before using the Adders to add one, in calculating two's complement, which allows you to sign numbers, therefore representing the negative ones. That's a guess.
Also, to do this would require combining a couple of Nots into a device called a 'Noter', which would be able to invert several bits. This would all be present in the arithmetic and logic unit of the CPU.