YouTube Transcript:
Logic Gates and Truth Tables - Step-by-Step Lesson from the Classroom
Skip watching entire videos - get the full transcript, search for keywords, and copy with one click.
Share:
Video Transcript
so chapter two Boolean operations simple
logic gates yes from this I'll give you
this book but we're going to be looking
at not just logic gates I think further
on in the book I'm not sure which page
but we're going to be looking at
at logic
gates and
okay give you
that don't get mixed up with Trace tables
tables
okay Trace tables are what we put
through if we've got some pseudo code or
or or a flow diagram something like that
then we get our our sort of test data
and we would put it through and record
that on a trace table this is not a
trace table this is a truth table
students get it mixed up don't get mixed
up so logic gates we've got to learn six
different logic gates okay first one
nice and
easy is one that looks like the letter
D okay uhhuh the next one is one that looks
looks
like looks like a triangle with a little
circle on the front like so and the last
one for these first three it's going to
be something that looks like a sting raid
raid
that okay Gates we're going to be
passing through in terms of the gate two
inputs on this one A and B and an output
is going to be X this one has only got
one input yeah one outut and one output
this one has got two inputs A and B and
one output I'm just going to make the
pen a bit smaller because that's a bit
but what is the difference between the
first one and this third one good
question this is an and
gate so if both of these are turned on
uhuh that's going to be turned on uhuh
this is a not
gate another name for not gate is an
invert inverter inverter we'll call it
an inverter could be an inverter and
this is an all
gate okay
if A's turned on c will be turned on or
if B's turned on c will be turned on or
and this is the nice thing about the or
gate if like the and gate if both of
them are turned on then X not c x will
on okay
so these are what they call logic gates
but each logic gate as it own what they
call a truth table
table
okay I'll do the first
one so if we've got a and b we've got four
four
possible scenarios uhuh we've got and
both been turned off okay we've got
eight been turned on and B been turned
off or a off B on or both of them turned
said that if both are turned off or for
gate that's going to be off yeah one's
turned on one's turned off so the the I
or the one and the zero are basically
the on and off it's on and off
because binary in terms of the computer
language of binary binary is just little
transistors little switches the computer
works inside the C you a billions of
these little transistors with zeros and
ones it's a bit like a record play with
the it's either a pit or a trough you on
a record so it's either one on generally
on or zero off okay that's how binary
works so that basically they say
computer is fulfilled of zeros and ones
is basically ons and offs in reality
yeah oh so zeros and ones yes it's on
now this one has only got one input M
how many possible options would there be
here um just one possible option that it
work one possible option option like
infinite we've got four options here
uhuh in that sense so it can be false or
true Okay so we've got
two two beautiful a x so if we if this
is off off then that's going to be on if
this is on that is going to be off uh
can it be determined like can be say
that if a was on then X be off or then a
is off X be1 is it determined or it's
not possible could say if x if aals 0 x
= 1 can you say that if if a is because
when a is off then it sense that the X
also be
up no Inver it Inver it it inverts
whatever's coming into here so it's the opposite
opposite
of it inverts whatever's coming in so
Zero's gone in it inverts it to one
one's gone in it inv to zero so if true
then false if false then true yeah okay
I got okay like the exclamation mark in Java
Java
basic there's exclamation mark true
okay so this one has got two inputs so
how many possible
scenarios well it has to it has two
hello every possible scenarios thank you
there's two inputs is going to have four
different potential
outputs okay A
B yeah 0 0 0 1 1 0 one one okay and this yeah
yeah
X this is an all gate so we said if a or
b are on or both then it will be on so
obviously the first one no but this B's
on true so that's true a is on Mr true
and one and one X that one is going to
be true as well but didn't we say first
of all it's C and then if both of them
are true then it's going to be X say
again like at the beginning we said that
the output is C and when the output is C
if one of them is true yeah if one of
them is true but with the all gate it
also works if both of them are true like
the am gate so it's all it's basically
there's three different um conditions
where it's where we're going to get a
one we're going to get a a positive
output yeah it's only when they both
turned off that that becomes off as well
but why did we say C is going to be the
answer if why are you talking about C
pret these are all the outputs X I made
a mistake that oh okay ab ab output x a
x AB output X okay okay so don't worry
about C okay okay yeah so they're the first
first
three yeah they're the easy ones okay
yes okay so we've done the first
three we've got another three to do but
I'm going to draw your attention to this gate
gate
here what gate was that uh the or the uh
the inverter or not gate beautiful
invert not gate now it's called not gate
generally all the KN Gates we've got all
the gates that
like know or
invert I've got a little circle here
yeah yeah yeah at the front so there are
three gates we're going to look at now
we've got a gate that looks like an an
gate but it's got a circle on the front
means
nor what's the
D what's this
shape it's it's like an and it's an and
yeah okay but it's got a circle on the front
front
and not what can that mean and not good
flip that round not and beautiful not
n nand n nand not and oh good so the not and
and
gate again we've got our
um impulse A and B as before
and we've got
here A to B so again exactly the same
there's two inputs so there must be four
different scenarios four different
um things what's what I'm looking for 0
0 0 1 1 0 can it predict the answer the
only thing that is going to be zero is
the last one beautiful is that correct
perfect because why because it's not n
anything except n so one one one one z z
okay which will if you look at the other
tr truth tables from the other three
this out these outcomes will not be part
of that yeah okay it's different so if
we've got not and the next one is going
to be draw this little sta shape here
Stingray what's that it was or so what
is it not or not or so basically
anything but or if that's called a n
what this what's this one going to be
uh uh noran no just no oh nor yeah no
okay so let's put these back
gate X the
output so Norgate if you remember from
before the or MH which was everything
apart from or the two
zeros so let's have a look at the
possible outcomes again 0 0 0 1 1 0 1
1 so if it's not all the the second and
the third one are zero what about this
one uh as well okay so these should be
all three should be zeros yes which
means the two
offs would be a one what does that
remind you of um not exactly if it's a
zero here it's going to be one there
it's almost inverted just that and it's
inverted everything else MH it's not
inverted because it's two different
inputs it gives four possible alol
that's similar to no but similar yeah
the last
one which you need to know doesn't look
like any of these sort of looks like
this the orgate but it's got this
special sort of another defense Shield here
here
yeah like a Stingray with a defense
Shield or an additional tail M A and B
again two
inputs and of course we've got our output
output
here this one is called it does look
like an or to a degree this one must be
called an or where at the front of it we
put an x s s gate or EXO or S yeah yeah
good now what the X means what the x is
is absolute all nothing else it's only
all only
all with that in mind the only or or is
only the answer or is only the answer
which is two probably the the middle ones
ones
beautiful beautiful
one so yes it can only be or so this and
this are ORS therefore this one it's an
and it worked okay for the or gate but
it's not in terms of this so this is our
s th
th s on
so there we go so here we've
got possibly three
outcomes with a nand little thing on the
front yeah little thing on the front for
the no gate not all only one outcome the
but opposite and we've got here only
only if you want to make a note of that
[Music]
good so part three I'm just going to
introduce you to this bit which is
basically we can join them both together
or can join Gates together to give us
different outcomes so for example if I
have here so I've got input a and input
B and I've got an output which is going
to be X again M but here what I'm going
to do is I'm going to put an and
gate yeah like so but here I can stick a
not gate into the
diagram okay yeah so that's going into
there into b and a is going to spread
into the am
gate okay now the way this would work if
I have a truth
table it wouldn't work why wouldn't work
because it's an end and
because only if B is zero it works and a
is one okay
so a and b
b
before so let's have a look at it this
way we could if I remove this just for
the time being and put C
yeah and put another column in here for
X so this time if I put C here which is
basically the opposite of B so now A and
C need to be both on in order for X to
be on yeah so I've added another column
in here so basically C is the opposite
of B I can put this in so one Z 1 Z
but now we've got a going into the
amgate and we've got C going into the
gate okay so we need to be looking here
and saying okay so both need to be on a
and C yes so that's not going to work
yeah that's not going to work but
here these are both on therefore it's
going to be that scenario there okay
okay A and C so we've change we've now
got another truth table which looks
different to the other six that we had
before but we can go a step
further okay I'll r that out for now we
can go a step
further or several steps
further now I'm going to
have a b and c as my inputs and I'm
going to have X
as an
output okay so we're going to start off
we'll have an hand gate
again but this time I can have let's put
in but I'm going to have a not gate
gate
here B is going to go into that b is
also going to go into that a is going to
that okay so we can expand it we can
have a vast
vast um logic circuit yeah based on
binary and based on the binary number
system how many possible scenarios do
you think we're going to get based on
the B three inputs so there four for two and
and uh
uh
six think about the B number system or
eight beautiful we go one two and it
doubles every 10 yeah 8
16 32 and if we do an an8 bit number
system yeah 641
128 so with these doubling in time if
we've got three inputs we should in
theory get eight okay so that should be
for three that should be for two which
we've just done that is for the invert
the or gate yeah sorry not the or gate
not gate yeah which would just invert it
with two possible scenarios four
possible scenarios here we should get
eight different scenarios so let's have
okay
so 0 0 0 happy with that yeah 0 0
1 0
one0 one0 0 and that's our s of IND ones
then we can have 01
one 1 0
1 1 1 0 and one one and one one one 1 2
3 4 5 6 7even eight can't of anymore
okay beautiful so let's have a little
this eight and B and C we need to get
work out what x is
done this a bit wrong what I would what
I would rather do add
some so I would put D here and I would
possibly put an M here and an F
here okay all right how we're going to
do this so B some additional ones yes
those on the camera I have changed this
so I've added some extra ones so we can
see some extra bits so we know looking
at this that D and F are what we need to
consider in terms of what's going into
the an gate to get the output so this is
my little if you do a truth table my
little bit of working
working
space always useful and then I can put
in my D my e and my
f okay so really quickly if we've got A
or B going into this this is my orgate A
or B so either of these are on D should
be on happy with that yeah so looking
down here
no no yes yes yes no yeah yes yes uh and
it can be both yeah still Yes okay good
take e is basically the inverse of C
c 1 0 1 1 0 0 1 0 good f is going to
be b or or okay b o e so let's have look
yes uh no
no
yes uh yes
yes
yes uh yes yes yes yes yes okay so
what's F and
D so they have to be both they have to
be both so we're going to be focusing on this
this
column and this
column so
no no no yes yes yes uh yes yes yes yes
yes there's only in this case there's
only two possible scenarios where the
would would be
off so there we go mixing Toth tables
yeah sorry mixing expanding our circuit
diagram so we got more than one are you
photographing that beautiful okay so
that's how we would do that
now just I know it's we've run out of
time but what we could say we've got an
and gate
here we could write what we call a logic
statement so I'm going to write the word
and in the middle because that's the one
nearest to the X so it's going to be A or
or
B A
and what do you think and
and
and b b or c or
system or e or E Yeah well put e but
we're pretending these are our these are
the major yeah or inverse of
C which would be b or
or not
not
CC okay so that would be our statement
and I can go into more detail about put
little tags on top and everything we'll
save that for another day okay so that's
basics okay thank you very much please
continue to ask questions leave your
comments hit notifications and please
subscribe and finally if you wish to buy
me a coffee i' be truly grateful please
visit buy meac
coffee.com SL Learning Zone thank you
very much indeed see you next time bye
Click on any text or timestamp to jump to that moment in the video
Share:
Most transcripts ready in under 5 seconds
One-Click Copy125+ LanguagesSearch ContentJump to Timestamps
Paste YouTube URL
Enter any YouTube video link to get the full transcript
Transcript Extraction Form
Most transcripts ready in under 5 seconds
Get Our Chrome Extension
Get transcripts instantly without leaving YouTube. Install our Chrome extension for one-click access to any video's transcript directly on the watch page.
Works with YouTube, Coursera, Udemy and more educational platforms
Get Instant Transcripts: Just Edit the Domain in Your Address Bar!
YouTube
←
→
↻
https://www.youtube.com/watch?v=UF8uR6Z6KLc
YoutubeToText
←
→
↻
https://youtubetotext.net/watch?v=UF8uR6Z6KLc