Boolean Algebra 2 - Simplifying Complex Expressions
HTML-код
- Опубликовано: 9 сен 2024
- This video follows on from the one about the laws of Boolean algebra. It explains some useful interpretations of the laws of Boolean algebra, in particular, variations of the annulment and distributive laws. It goes on to demonstrate how Boolean algebra can be applied to simplify complex Boolean expressions, and therefore how to simplify the combinational logic circuits that they represent. This video works through a number of examples of simplifying Boolean expressions, step by step, including algebraic proof of the absorptive law, and some examples you can try yourself. The next video in this series revisits some of the techniques covered here, and describes how De Morgan’s theorem can be applied to simplify complex Boolean expressions.
In 19 minutes I have learned more about this topic than weeks in class. Absolutely phenomenal job teaching this subject. You make it clear, concise, and easy to follow and understand.
I feel like I've discovered a superpower lol
This series is absolutely gold. Thanks so much for putting your efforts in making these videos, Kevin!
You're most welcome :)KD
I wish I could afford to pay you bro, thanks for making this free
One of the few gems of computer science field on RUclips
I can't thank you enough.
You are most welcome. Thanks for commenting :)KD
Best video explaining this topic, I had struggles to understand this lesson but you simplified the 1 hour lesson to a brief and understandable video
You are most welcome. :)KD
This is the type of content we need in schools. Thank you so much
You are very welcome. :)KD
Kevin, I've watched at least 5 of your videos for my intro to logic class. There isn't anything better than this on the internet. I feel like you've provided me enough knowledge to test out of my class without even starting. Thanks a ton! Subscribed!
Any chance you could provide a printout of the different laws?
I can write them in my notes, but I really like your arrangement of them. Makes my boolean algebra quite simple.
(Class is still in the phase of covering the different types of logic gates, you've brought me way ahead in only a few hours.)
Hi Matt. Thanks for the great feedback.
There is a link to the presentation I used to make the video at the very bottom of this web page:
www.computersciencebytes.com/boolean-logic/simplification-rules/
BTW - the website is something of a work in progress.
Kevin :)
Kevin, you're awesome. Thank you!
What is the class for, part of what course? I'm wanting to design my own computer architecture from the ground up
@@davidprock904 Mine is Engineering at Birmingham. You do a bit of everything in the first year then you can specialise in Electronic engineering in 2nd year onwards. Pretty sure it is the same in most unis that do engineering. (in the UK anyway)
Your video is really helpful, I have an exam in a few days time and I finally am getting a feeling for how to use the different laws, thanks to your videos.
But I, too, find it pretty confusing that at min 14:45 the absorption law is used with the A that is bound by an AND after. I used first the commutative law and then the absorbtion law finishing the simplification similarly:
(A^B)vBvA^(BvC)
=BvA^(BvC)
=Bv(A^C)v(A^B)
=Bv(A^B)v(A^C)
=BvA^C
I am a bit disappointed though that not one of the comments pointing this out was answered. Making mistakes is only human and correcting it would give me a greater sense of security that I have understood the laws and can apply them correctly.
Watching from the University of Ghana(legon) and believe me ,when I say you are the best in the world.👌 God bless you
That's really kind. Thank you :)
2 years later a KNUST student is also benefiting from this video
I add my praises to the rest of the comments. You are excellent.
I wish you used plus/dot instead of the AND/OR symbols
amazing quality - so much better than anything I have seen anywhere. Thank you so very much!
Thanks for the kind feedback. K:D
I love you Marie Bure 😍😍😍😍
Watching these for my Computer Science A Level. They're so useful. Thank you so much for making them!
You're very welcome. :)KD
this video just saved my midterm! thank you!!!
You're very welcome :)KD
Fascinating, tysm! I'm trying to get a CS degree without going on debt, so I really can't afford anywhere great, and this type of content is immensely helpful.
wonderful ! the best Boolean video that I've ever seen ! thank you
@14:46 just wondering how this is possible to apply Absorptive law. Don't we have to follow order of precedence so in (A ^ B) V A ^ (B V C) V B
wouldn't the term A ^ (B V C) be evaluated first?
This guy sounds like Daniel from Amnesia, and I absolutely love it. Wonderful work, sir
You are most welcome, and thank you :)KD
Bro, thank you so much, your style is 100% so clear and engaging, I don't know how much time and effort you saved me, but it's certainly a very significant amount. Everything down to your inflection is on point. When you say "but be careful!" about possible mistakes its like watching David Attenborough describe a predator entering the scene on Planet Earth! Also your website looks great, and I hope your university makes you dean or whatever other promotion you'd most enjoy.
Thank you so much for your lovely comment. To be compared with David Attenborough is an honour :)KD
This video is awesome and really helped me to understand a lot. Great pacing and you laid everything out clearly, thank you so much for this series!
You are most welcome :)KD
Your pacing, descriptions and examples are fantastic. 4 of us showed up for a canceled class and tried to tackle one of our homework problems, but had failed after 2 hours.
Words cant express my gratitude.
That's really good to hear. Thanks for the comment.
actually the best video out there, with that nice kinda like david attenborough voice
You are very kind. Thank you :)KD
Excellent. The best I have seen!
Absorptive law shouldn't be used at 14:45?
AND has higher precedence than OR
So on line 3:
A AND (B OR C)
Should be bracketed to give:
(A AND (B OR C))
So now the whole expression reads:
(A AND B) OR (A AND (B OR C)) OR B
- When you used the absorptive law to get line 4, you prioritised OR over AND where you simplified:
(A AND B) OR A
to just: A
More brackets would have made this mistake clearer.
Sorry if I am incorrect, you probably still got the right answer, I am just trying to make sense of this myself...
You may well be correct (or maybe not, I will take another look). My approach is to use the Woolfram Alpha Boolean algebra calculator to get the simplest form, so I know the solution I'm aiming for, then I work towards this. In an exam room, you wouldn't have this luxury. As I mentioned in a video, you can solve one of these problems in lots of different ways. There is a possibility I took a wrong turn but then got lucky and still found the correct solution. It's good that you are scrutinising my suggestions - that's exactly what I want my own students to do. I tell them that this is 'chewing gum for the mind' :)KD
Fantastic lessons! Magnificent!
You're very kind. Thank you :)KD
Great Video! Your teaching style is so clear and it also provides all other possible scenarios/Possible mistakes. Great job keep it up!
Thank you very much :)KD
I too am going to risk stating the obvious, like many people in the comments, THESE SET OF VIDEOS ARE GREAT.
Thank you - much appreciated :)KD
At 17:16 (3rd example), we could factorise instead of making of distributive law.
That would be as follows:
Z = (A ^ B ^ -C) v (A ^ -C)
Z = (A ^ -C) ^ ( B v 1)
Z = (A ^ -C) ^ 1
Z = A ^ -C
All roads lead to Rome :)KD
@@ComputerScienceLessons My roads lead to Rome only thanks to you! I really do appreciate your educational efforts and support a lot, Sir! Thank you!
I'm really grateful to have been privileged to see this tutorial
Gracias
I'd like to thank you for this video and the lessons therein.
I just finished my first year at University studying Computer Networking. They decided to shoehorn boolean algebra in there.
This video helped me over several agonizing days before my final "Computer Architecture" exam which was mostly boolean algebra based.
I got 88%, and it's thanks, I suspect, mostly to this video. Thanks again Kevin.
Amazing video. Such a great instructor
You are very kind. Thanks for taking time to comment. :)KD
For solution 3, You could use the absorptive law after using the distributive law for factorising A out. Therefore, getting the answer in 3 steps.
Absolutely. More than one road leads to Rome :)KD
Thank you so much for these. They're clear and amazing!
You're welcome. And thank you :)KD
Amazing video! Coming in clutch for Nand2Tetris 👍
You are very welcome. Nand2Tetris looks interesting. You might like this guy ruclips.net/user/beneater
:)KD
Thanks, love the easy explanation and great examples!
15:05 I think there is a mistake in the application of operator precedence in line 3 ... although the final result/simplification is correct.
yep, you're right bro
I agree.
I think he should not simplify the (A and B) or A to A because the last A is follow up by and
Thank you so much!!! I was terrified looking at the examples from class. This is so much clearer and looks like a lot of fun; reminds me of chess. Best Christmas ever🎄
You're the first youtuber I'm commenting for him: You're simply great!
Outstanding quality. Thank you.
Wow thanks soo much I just watched once and it’s clear now wow soo impressed
Isn't there a mistake at 14:44 ? The AND priority was ignored?
I'm also super confused by this, anybody have an answer?
same here, I had A.(B+C) bracketed because of 'and' precedence
You are much better than our teacher
Thank you so much for this great series.
Very useful illustrations, thank you.
Thanks for the comment. Much appreciated.
Sir, watching the 1st 2 vids of the series has made me sub. Really great content! I was able to grasp the concepts of boolean algebra very deeply through your vids. But I have noticed that the solutions you provide are not very straightforward even when it seems like the steps to solve can be minimized. I am Wondering if I am doing it wrong or are you purposefully increasing the complexity for some reason or is boolean algebra meant to be like that.
Thank you. I must admit that some of my solutions do not follow the quickest route. My intention was to illustrate the rules in action rather than show the most efficient solution. I tell my students that they can take as many steps as they like, as long as they get there :)KD
@@ComputerScienceLessons after finishing the playlist I understood that myself 😄.
I just wish I saw this earlier. I have an exam tomorrow and I know it will be very helpful.
Glad to help. Best of luck with the exam. :)KD
I'm a slow learner, but my creativity is off the charts. I feel if I can master this then I could have fun building the idea I have for a computer architecture, like nothing ever before, the cores can reprogram themselves. I'm wanting to dive into building the design with a logic gate simulator (atauna). But I cant seam to dive in like I could with a programming language because I dont quite yet see how to do something like a complex if else then statement. And to make nested statements...WOW... I'm not there yet is why. But if anyone could give me a set of knowledge to jumpstart me into doing that, I would appreciate it. That also would help me to learn the basic knowledge cause I'll have to keep looking back to it.
Thanks for the great content, wouldn't it have been easier to apply the absortive law after placing the brackets @ 10:55 ? You would have immediately received A as an answer.
There may be better, more efficient, ways to get to the simplest form (all roads lead to Rome). What matters is that you understand the possibilities. :)KD
at 15:41 On the first challenge I went straight from (A^B) v (A^C) to A ^ (B v C) because I was thinking intuitively that you can just factor out A. Is this a mistake? Are the laws necessary here?
Thank you so much for your videos!!! I understood everything you taught us and even solve the example problems (with some help on the last one).
Good to hear. Make sure you practice with past exam questions :)KD
@@ComputerScienceLessons I will! I have the first exam in a couple of weeks, but the professor has not given us anything to practice for it so I'll have to find something before then
very helpful....thank you so much :)
Thank you !
You're welcome :)KD
Kaway-kaway sa mga gikan sa Moodle. ✋✋✋
good stuff brother.
Great videos.. only wish that the and or was expressed in A+B, AB instead to make it easier to follow.
Thanks for your slow and exact pronunciation even if it had to take much time for you to prepare! Nicely done!
You are welcome. I'm very happy to help :)KD
Very useful, thanks a lot!
You're very welcome :)KD
16:59 Solution 3:
You’ve got ABC’ + AC’
= AC’ + AC’B
Instead of doing all that, couldn’t you just use absorptive law (A + AB = A)
If we take AC’ as A corresponding to the A in the absorptive law, we get the final answer, which is AC’.
Is there something I’m doing wrong? This seems like a much simpler method.
There are probably dozens of ways you could arrive at a solution. In fact, I usually take the long way around to illustrate some of the possible 'moves'. I'm reasonably confident that I have the simplest solution for each of the problems I posed because I checked them all on the Woolfram Alpha Boolean algebra calculator. www.wolframalpha.com/widgets/view.jsp?id=a52797be9f91295a27b14cb751198ae3
Wonderful video! Thank you for taking the time to share your knowledge of how to simplify complex expressions. I am a novice. Your video really helped me “up my game”. I created two truth tables for the simplification of the two equivalent circuits at 10:25 but the tables were not the same. Perhaps I made a mistake.
There's plenty of scope to make mistakes. The two expressions are: (A or C) and B; A and B or B and C and (B or C).
If you enter each (in this format) into the Woolfram Alpha Boolean Algebra Calculator, you will get the same truth table. www.wolframalpha.com/widgets/view.jsp?id=a52797be9f91295a27b14cb751198ae3
This is how I check my results. :)KD
Appreciated the Wolfram link. I entered A AND B OR B AND C AND (B OR C) to get the truth table. Wolfram added parentheses as follows: (A AND B) OR (B AND C AND (B OR C)) after submit. Next, I entered B AND (A OR C). I still get different truth tables. Did I enter the values incorrectly? Thank you for helping me.
The better mic is definitely noticable
I have another one now with software that de-esses the audio while it's recording - so much less work. :)KD
Thank you so much this helps me a lot
You are very welcome :)KD
I've watched almost all your videos about Boolean algebra, I couldn't understand them until I watched you. I have a Boolean problem I can't simplify, I would appreciate it a lot if you helped me to solve it. It looks like this: (~a*~b*~c + ~a*b*c + a*~b*c + a*b*~c).
Hey not sure if there is an error 16:45.
Truth table for B.(~C+B)
B C -C -C+B
0 0 1 1
0 1 0 0
1 0 1 1
1 1 0 1
I was having trouble conceptualising the Absorptive Law so I wrote the truth table out, did I make a mistake here?
I'm still learning this confusing stuff.
Thank you
You're welcome :)KD
fantastic
Thank you :)KD
Kevin rocks ! Thanks
:)KD
@16:07: why not do it in one step with distributive law directly? A * ( B + C ) = (A*B)+(A*C) ...
The truth is that you can solve some of these problems in a hundred different ways. Perhaps fewer steps is best. :)KD
16:18 Wouldn't it be a great idea to factorise instead of using distributive law? At the 2nd example.
More than likely. The more of these you do, the better you get at spotting the quickest route.
Best lessons. thank you
Tnx :)
Thank you! The way you presented this makes it seem every so slightly fun. I know deep inside me there's a math geek that enjoys all this nonsense ;)
You're most welcome. I must admit, I appreciate mathematics a lot more as I get older :)KD.
12.14..the B must go through the and gate, or no result...that diag should have the or gate in that case.
8 mins in and im feeling better about my digital logic exam😁
Good to hear. Do lots of examples and remember, there's more than one way to peel an orange. Good luck :)KD
I'm confused and my feelings are hurt. Does anyone have any additional supplementary materials. Please, don't get me wrong, this series is great and I genuinely appreciate it. I'm getting caught up in the abstraction and bridging the logic between the algebra and the gate. #sendhelp😭
This video makes a connection between Boolean algebra and logic gates which may help a bit :)KD
Thank you so much, sir !!
on example questions 3 (the ones where pause and work out) could have used abstraction law on step 3. u went the long way around
You are correct of course - However, all roads lead to Rome. :)KD
sooo useful! at 15:06 I nearly did it but got stuck on the commutative law part
Take your time. Thanks for the comment. :)
The problem at 16:51 I managed to get the same answer by using the distributive law in reverse instead of expanding further it went like this:
(a'b)+(bc')+(bc)
(a'b)+b(c'+c) - Using distributive law
(a'b)+b(1) - completment law
(a'b)+b - identity law
B - absorbative law
Is this an accurate way to get this answer or did I just get lucky?
There's more than one way to skin a cat! :)
I feel like I've discovered dark secrets. Thanks so much
You are very welcome 🧛♂️ :)KD
i liked your English accent, good work, how do i ask my question??
I thank you so much. thanks
i have an exam
thanks
How did you decide where to put parantheses at 17:00 ? Can't it be like (A and B) and (not C or (A and not C)) since we read it from left to right?
thanks
Thank you sir but for the last exercise for what reason you have pulled A out?
Your videos have helped me tremendously but I'm still stuck with this one particular question I got for my EE class:
(A + B’D + BC’D’)'
I'm completely clueless when it comes to that kind of NOT equations.
The problem you have written here can't be simplified much further (I presume you are looking for the simplest form?). There are a number of online solvers you can try.
@@ComputerScienceLessons Thank you so much for the helpful tip!
So I don't know if I'm doing something right or wrong, but all of the exercises in this video I end up doing in one or two steps and somehow still getting to the same answer. Am I just getting lucky or is it normal to take fewer steps? I don't know enough about the subject itself to know if I should keep doing what I'm doing or try and do it the long way.
There are lots of ways you can arrive at the same solution. I tend to go about things the long way around to illustrate the techniques. If you are applying the rules, and you consistently get the simplest expression, you are probably doing fine. :)KD
How much time do you spend working on the script of these? Why can't my college proffesors do the same?
if 9:04 line2 is correct, so 15:00 line 3 is confused me so mush. Is this a lucky wrony way to get the right end?
Isn't it possible to use the Absorptive law for the final step in solution 3 to get the same answer?
The absorptive law always involves two variables in the format X v (X^Y) = X alternatively X ^ (X v Y) = X
@@ComputerScienceLessons Does this change if one of the odd variable such as Y in this case is a NOT
Xv(X^~y)
I don't know, V and /\ are kind of less easier to read than * (or omission) and +. That is, AB+C seems easier for me than A /\ B V C. Is there any reason to use /\ and V?
This is the convention a lot of A level textbooks and exam boards use. I guess it's because you can find v ^ and ¬ on a regular keyboard. Other conventions use an overscore to denote NOT which you can't type easily. :)KD
How do we know when to expand?
When I made these videos, I made extensive use of an online Boolean algebra calculator to check my solutions:
www.wolframalpha.com/widgets/view.jsp?id=a52797be9f91295a27b14cb751198ae3
I was therefore able to see how simple an expression could become. This gave me clues about when to expand. When you've done a few examples, you start to get a feel for how simple an expression can become for a given number of variables. Not a scientific answer I know, but for me this is something of an art. The online calculator must be enumerating the possibilities. :)KD
Just sayin thank you by subscribing your channel
:)
at 9:10 is it possible to do it like this:
Z = (a ∧ b) ∨ (b ∧ c ∧ (b ∨ c)) - apply absorption law c ∧ (b ∨ c) = c
Z = (a ∧ b) ∨ (b ∧ c) - apply distributive law (a ∧ b) ∨ (b ∧ c) = b ∧ (a ∨ c)
Z = b ∧ (a ∨ c)
Looks good to me :)KD
Can someone explain (12:18) to me? The way I tried to simplify it was "A or A and B" = "A and B". However, he gets just A, even though when you input A = 1 and B = 0, you get "1 or 1 and 0" = "1 and 0" = "0", but 0 != A, and so his method was incorrect or I'm incorrect.
Try drawing out the logic gate circuit and making a truth table. Be careful to take account of the order of precedence of the logical operators. A+(AB) You will see that the output is always the same as A, regardless of B. This should help too www.wolframalpha.com/input?i=A+OR+A+AND+B :)KD
@@ComputerScienceLessons Ohhh I see my mistake. I wasnt aware that there was an order of operations in boolean algebra, so i assumed it was just "first parentheses then left to right". Thank you for clarifying
Kevin thanks .bro I am from India Darendra Singh
British people use different symbols that confuses me a lot. If not for this anomaly- I would probably follow what you say ! Not otherwise though !
Fair enough. I have used the symbols most used by UK examination boards. I prefer . (AND), + (OR) and horizontal overscore (NOT). I think it has to do with what they can print most easily.
I've used all of these symbols in discrete math and logic classes in the US......nothing new here. Think it might be an institution specific thing ;)
In my textbook and online it says: Identity laws: x + 0 = x | x • 1 = x and Domination laws: x • 0 = 0 | x + 1 = 1 but at 18:00 it is backwards for Identity and Annulment???????
I think the video says the same thing but with different symbols.
Hi Kevin, thanks for the lesson, really helpful to understand Boolean algebra for logic simplification. However I do not understand steep 4 @14:48. you are applying the Absorptive law to line 3. but isn’t the AND between A AND (B OR C)of higher precedence and this is actually not allowed? Instead I used the commutative law and got to (A*B)+B+A*(B+C) = B+A*(B+C) = B+(A*B)+(B*C)=B+(B*C)=B ... so I do not understand where I did a mistake. It must be a fundamental one that I d not undersstand. Can you please help?
LOL right after posting it I found out that I messed up the distributive law. So it should read B+A*(B+C)=B+(A*B)+(A*C)... so I did. it a different way and luckily now ended up the same result. Thanks again, very helpful :)
@@SerErris if you do as line 3 did, 9:04 line 2 can go the same way, that will lead to the wrong answer.
u just saved a student from wasting his life on 3h lecture for half the info
You are most welcome :)KD
At 16:00 can you not further simplify A . (B + C) to just A; via the absorption law?
To absorb, there should only be two variables. That is: A OR (A AND B) = A alternatively A AND (A OR B) = A
I loved your video. Your presentation is crisp and crystal clear. well done. I had attempted 3 questions. And I have a question to ask regarding question 2.
The question is given to be: ( ¬ A ^ B) ∨ (B^ ¬ C) ∨ ( B ^ C)
My working is as follow:
( ¬ A ^ B) ∨ (B^ ¬ C) ∨ ( B ^ C)=
(B^ (¬ A ∨ ¬ C)) ∨ ( B ^ C) =
B ^( (¬ A ∨ ¬ C) ∨ C) =
B ^ ¬ A
I'm obviously wrong. Would appreciate it if someone can help me to point out my mistake.