0:05 so chapter two Boolean operations simple
0:09 logic gates yes from this I'll give you
0:11 this book but we're going to be looking
0:13 at not just logic gates I think further
0:15 on in the book I'm not sure which page
0:17 but we're going to be looking at
0:19 at logic
0:26 gates and
0:33 okay give you
0:36 that don't get mixed up with Trace tables
0:38 tables
0:41 okay Trace tables are what we put
0:43 through if we've got some pseudo code or
0:46 or or a flow diagram something like that
0:49 then we get our our sort of test data
0:51 and we would put it through and record
0:53 that on a trace table this is not a
0:56 trace table this is a truth table
0:59 students get it mixed up don't get mixed
1:03 up so logic gates we've got to learn six
1:06 different logic gates okay first one
1:08 nice and
1:12 easy is one that looks like the letter
1:16 D okay uhhuh the next one is one that looks
1:17 looks
1:21 like looks like a triangle with a little
1:24 circle on the front like so and the last
1:26 one for these first three it's going to
1:28 be something that looks like a sting raid
1:30 raid
1:37 that okay Gates we're going to be
1:40 passing through in terms of the gate two
1:43 inputs on this one A and B and an output
1:46 is going to be X this one has only got
1:50 one input yeah one outut and one output
1:55 this one has got two inputs A and B and
1:57 one output I'm just going to make the
2:00 pen a bit smaller because that's a bit
2:01 but what is the difference between the
2:03 first one and this third one good
2:07 question this is an and
2:11 gate so if both of these are turned on
2:14 uhuh that's going to be turned on uhuh
2:16 this is a not
2:21 gate another name for not gate is an
2:24 invert inverter inverter we'll call it
2:27 an inverter could be an inverter and
2:28 this is an all
2:30 gate okay
2:35 if A's turned on c will be turned on or
2:38 if B's turned on c will be turned on or
2:40 and this is the nice thing about the or
2:42 gate if like the and gate if both of
2:48 them are turned on then X not c x will
2:53 on okay
2:58 so these are what they call logic gates
3:00 but each logic gate as it own what they
3:03 call a truth table
3:05 table
3:08 okay I'll do the first
3:14 one so if we've got a and b we've got four
3:15 four
3:19 possible scenarios uhuh we've got and
3:23 both been turned off okay we've got
3:25 eight been turned on and B been turned
3:30 off or a off B on or both of them turned
3:38 said that if both are turned off or for
3:42 gate that's going to be off yeah one's
3:45 turned on one's turned off so the the I
3:47 or the one and the zero are basically
3:50 the on and off it's on and off
3:52 because binary in terms of the computer
3:55 language of binary binary is just little
3:58 transistors little switches the computer
4:00 works inside the C you a billions of
4:03 these little transistors with zeros and
4:05 ones it's a bit like a record play with
4:07 the it's either a pit or a trough you on
4:12 a record so it's either one on generally
4:15 on or zero off okay that's how binary
4:17 works so that basically they say
4:19 computer is fulfilled of zeros and ones
4:22 is basically ons and offs in reality
4:25 yeah oh so zeros and ones yes it's on
4:33 now this one has only got one input M
4:36 how many possible options would there be
4:41 here um just one possible option that it
4:45 work one possible option option like
4:47 infinite we've got four options here
4:50 uhuh in that sense so it can be false or
4:54 true Okay so we've got
5:00 two two beautiful a x so if we if this
5:04 is off off then that's going to be on if
5:08 this is on that is going to be off uh
5:09 can it be determined like can be say
5:15 that if a was on then X be off or then a
5:18 is off X be1 is it determined or it's
5:22 not possible could say if x if aals 0 x
5:27 = 1 can you say that if if a is because
5:30 when a is off then it sense that the X
5:32 also be
5:36 up no Inver it Inver it it inverts
5:38 whatever's coming into here so it's the opposite
5:39 opposite
5:42 of it inverts whatever's coming in so
5:44 Zero's gone in it inverts it to one
5:48 one's gone in it inv to zero so if true
5:51 then false if false then true yeah okay
5:54 I got okay like the exclamation mark in Java
5:55 Java
5:59 basic there's exclamation mark true
6:02 okay so this one has got two inputs so
6:05 how many possible
6:09 scenarios well it has to it has two
6:11 hello every possible scenarios thank you
6:14 there's two inputs is going to have four
6:16 different potential
6:19 outputs okay A
6:31 B yeah 0 0 0 1 1 0 one one okay and this yeah
6:33 yeah
6:37 X this is an all gate so we said if a or
6:41 b are on or both then it will be on so
6:45 obviously the first one no but this B's
6:49 on true so that's true a is on Mr true
6:51 and one and one X that one is going to
6:54 be true as well but didn't we say first
6:56 of all it's C and then if both of them
6:59 are true then it's going to be X say
7:00 again like at the beginning we said that
7:04 the output is C and when the output is C
7:08 if one of them is true yeah if one of
7:11 them is true but with the all gate it
7:13 also works if both of them are true like
7:16 the am gate so it's all it's basically
7:21 there's three different um conditions
7:22 where it's where we're going to get a
7:25 one we're going to get a a positive
7:27 output yeah it's only when they both
7:30 turned off that that becomes off as well
7:33 but why did we say C is going to be the
7:35 answer if why are you talking about C
7:38 pret these are all the outputs X I made
7:43 a mistake that oh okay ab ab output x a
7:47 x AB output X okay okay so don't worry
7:50 about C okay okay yeah so they're the first
7:51 first
7:54 three yeah they're the easy ones okay
8:07 yes okay so we've done the first
8:10 three we've got another three to do but
8:13 I'm going to draw your attention to this gate
8:15 gate
8:20 here what gate was that uh the or the uh
8:23 the inverter or not gate beautiful
8:27 invert not gate now it's called not gate
8:28 generally all the KN Gates we've got all
8:30 the gates that
8:32 like know or
8:34 invert I've got a little circle here
8:36 yeah yeah yeah at the front so there are
8:38 three gates we're going to look at now
8:42 we've got a gate that looks like an an
8:45 gate but it's got a circle on the front
8:49 means
8:51 nor what's the
8:54 D what's this
8:57 shape it's it's like an and it's an and
8:58 yeah okay but it's got a circle on the front
9:00 front
9:04 and not what can that mean and not good
9:09 flip that round not and beautiful not
9:21 n nand n nand not and oh good so the not and
9:23 and
9:26 gate again we've got our
9:30 um impulse A and B as before
9:32 and we've got
9:45 here A to B so again exactly the same
9:47 there's two inputs so there must be four
9:51 different scenarios four different
9:55 um things what's what I'm looking for 0
10:00 0 0 1 1 0 can it predict the answer the
10:02 only thing that is going to be zero is
10:06 the last one beautiful is that correct
10:09 perfect because why because it's not n
10:14 anything except n so one one one one z z
10:16 okay which will if you look at the other
10:18 tr truth tables from the other three
10:22 this out these outcomes will not be part
10:25 of that yeah okay it's different so if
10:27 we've got not and the next one is going
10:32 to be draw this little sta shape here
10:40 Stingray what's that it was or so what
10:43 is it not or not or so basically
10:45 anything but or if that's called a n
10:48 what this what's this one going to be
10:54 uh uh noran no just no oh nor yeah no
11:05 okay so let's put these back
11:11 gate X the
11:15 output so Norgate if you remember from
11:18 before the or MH which was everything
11:21 apart from or the two
11:23 zeros so let's have a look at the
11:30 possible outcomes again 0 0 0 1 1 0 1
11:34 1 so if it's not all the the second and
11:37 the third one are zero what about this
11:41 one uh as well okay so these should be
11:43 all three should be zeros yes which
11:46 means the two
11:50 offs would be a one what does that
11:55 remind you of um not exactly if it's a
11:57 zero here it's going to be one there
11:59 it's almost inverted just that and it's
12:02 inverted everything else MH it's not
12:04 inverted because it's two different
12:07 inputs it gives four possible alol
12:10 that's similar to no but similar yeah
12:12 the last
12:14 one which you need to know doesn't look
12:18 like any of these sort of looks like
12:21 this the orgate but it's got this
12:26 special sort of another defense Shield here
12:27 here
12:30 yeah like a Stingray with a defense
12:34 Shield or an additional tail M A and B
12:36 again two
12:39 inputs and of course we've got our output
12:41 output
12:44 here this one is called it does look
12:48 like an or to a degree this one must be
12:52 called an or where at the front of it we
13:00 put an x s s gate or EXO or S yeah yeah
13:08 good now what the X means what the x is
13:12 is absolute all nothing else it's only
13:14 all only
13:19 all with that in mind the only or or is
13:22 only the answer or is only the answer
13:24 which is two probably the the middle ones
13:26 ones
13:29 beautiful beautiful
13:42 one so yes it can only be or so this and
13:45 this are ORS therefore this one it's an
13:48 and it worked okay for the or gate but
13:53 it's not in terms of this so this is our
13:56 s th
14:00 th s on
14:02 so there we go so here we've
14:05 got possibly three
14:08 outcomes with a nand little thing on the
14:10 front yeah little thing on the front for
14:15 the no gate not all only one outcome the
14:21 but opposite and we've got here only
14:23 only if you want to make a note of that
14:31 [Music]
14:34 good so part three I'm just going to
14:36 introduce you to this bit which is
14:38 basically we can join them both together
14:41 or can join Gates together to give us
14:44 different outcomes so for example if I
14:53 have here so I've got input a and input
14:55 B and I've got an output which is going
14:59 to be X again M but here what I'm going
15:02 to do is I'm going to put an and
15:06 gate yeah like so but here I can stick a
15:09 not gate into the
15:13 diagram okay yeah so that's going into
15:18 there into b and a is going to spread
15:19 into the am
15:23 gate okay now the way this would work if
15:26 I have a truth
15:30 table it wouldn't work why wouldn't work
15:33 because it's an end and
15:38 because only if B is zero it works and a
15:40 is one okay
15:42 so a and b
15:44 b
15:52 before so let's have a look at it this
15:56 way we could if I remove this just for
15:59 the time being and put C
16:03 yeah and put another column in here for
16:07 X so this time if I put C here which is
16:12 basically the opposite of B so now A and
16:15 C need to be both on in order for X to
16:18 be on yeah so I've added another column
16:23 in here so basically C is the opposite
16:32 of B I can put this in so one Z 1 Z
16:35 but now we've got a going into the
16:38 amgate and we've got C going into the
16:41 gate okay so we need to be looking here
16:45 and saying okay so both need to be on a
16:49 and C yes so that's not going to work
16:52 yeah that's not going to work but
16:55 here these are both on therefore it's
16:59 going to be that scenario there okay
17:02 okay A and C so we've change we've now
17:05 got another truth table which looks
17:08 different to the other six that we had
17:11 before but we can go a step
17:14 further okay I'll r that out for now we
17:16 can go a step
17:19 further or several steps
17:22 further now I'm going to
17:28 have a b and c as my inputs and I'm
17:29 going to have X
17:30 as an
17:34 output okay so we're going to start off
17:37 we'll have an hand gate
17:41 again but this time I can have let's put
17:51 in but I'm going to have a not gate
17:53 gate
17:56 here B is going to go into that b is
17:59 also going to go into that a is going to
18:07 that okay so we can expand it we can
18:09 have a vast
18:13 vast um logic circuit yeah based on
18:15 binary and based on the binary number
18:18 system how many possible scenarios do
18:19 you think we're going to get based on
18:23 the B three inputs so there four for two and
18:25 and uh
18:27 uh
18:31 six think about the B number system or
18:34 eight beautiful we go one two and it
18:37 doubles every 10 yeah 8
18:40 16 32 and if we do an an8 bit number
18:44 system yeah 641
18:47 128 so with these doubling in time if
18:49 we've got three inputs we should in
18:53 theory get eight okay so that should be
18:56 for three that should be for two which
18:59 we've just done that is for the invert
19:03 the or gate yeah sorry not the or gate
19:06 not gate yeah which would just invert it
19:08 with two possible scenarios four
19:11 possible scenarios here we should get
19:13 eight different scenarios so let's have
19:35 okay
19:43 so 0 0 0 happy with that yeah 0 0
19:45 1 0
19:53 one0 one0 0 and that's our s of IND ones
19:56 then we can have 01
20:00 one 1 0
20:08 1 1 1 0 and one one and one one one 1 2
20:12 3 4 5 6 7even eight can't of anymore
20:16 okay beautiful so let's have a little
20:25 this eight and B and C we need to get
20:29 work out what x is
20:30 done this a bit wrong what I would what
20:33 I would rather do add
20:38 some so I would put D here and I would
20:45 possibly put an M here and an F
20:48 here okay all right how we're going to
20:52 do this so B some additional ones yes
20:55 those on the camera I have changed this
20:57 so I've added some extra ones so we can
21:01 see some extra bits so we know looking
21:04 at this that D and F are what we need to
21:06 consider in terms of what's going into
21:09 the an gate to get the output so this is
21:11 my little if you do a truth table my
21:13 little bit of working
21:15 working
21:17 space always useful and then I can put
21:21 in my D my e and my
21:29 f okay so really quickly if we've got A
21:33 or B going into this this is my orgate A
21:38 or B so either of these are on D should
21:41 be on happy with that yeah so looking
21:43 down here
21:53 no no yes yes yes no yeah yes yes uh and
21:59 it can be both yeah still Yes okay good
22:05 take e is basically the inverse of C
22:22 c 1 0 1 1 0 0 1 0 good f is going to
22:30 be b or or okay b o e so let's have look
22:32 yes uh no
22:34 no
22:36 yes uh yes
22:38 yes
22:44 yes uh yes yes yes yes yes okay so
22:46 what's F and
22:50 D so they have to be both they have to
22:53 be both so we're going to be focusing on this
22:53 this
22:56 column and this
22:59 column so
23:08 no no no yes yes yes uh yes yes yes yes
23:11 yes there's only in this case there's
23:13 only two possible scenarios where the
23:15 would would be
23:18 off so there we go mixing Toth tables
23:23 yeah sorry mixing expanding our circuit
23:24 diagram so we got more than one are you
23:26 photographing that beautiful okay so
23:28 that's how we would do that
23:31 now just I know it's we've run out of
23:34 time but what we could say we've got an
23:35 and gate
23:38 here we could write what we call a logic
23:40 statement so I'm going to write the word
23:42 and in the middle because that's the one
23:45 nearest to the X so it's going to be A or
23:47 or
23:50 B A
23:59 and what do you think and
24:01 and
24:05 and b b or c or
24:10 system or e or E Yeah well put e but
24:13 we're pretending these are our these are
24:16 the major yeah or inverse of
24:21 C which would be b or
24:23 or not
24:25 not
24:28 CC okay so that would be our statement
24:30 and I can go into more detail about put
24:32 little tags on top and everything we'll
24:35 save that for another day okay so that's
24:43 basics okay thank you very much please
24:44 continue to ask questions leave your
24:46 comments hit notifications and please
24:48 subscribe and finally if you wish to buy
24:51 me a coffee i' be truly grateful please
24:52 visit buy meac
24:55 coffee.com SL Learning Zone thank you
24:58 very much indeed see you next time bye