so the following boolean algebra equation (A + B)(!B + C), well short story even shorter I got A*!B + A*C + B*C
how I did it?
obviously I just multiplied the first bracket by the second using the distributive property but boolean algebra calculators online beg to differ I tried two and both tell me the answer is (a * ! b) + (b * c)
Yes, 13 and 14 are the OR-distributive and AND-distributive laws, respectively. These two are the key to rearranging things in order to reduce stuff.
You have gotten as far as (A!B + AC + BC). Try moving things around with those laws and see if you can work your way to eliminate anything using laws 1–8. (It’ll get bigger before it gets smaller, as usual.)
(Hint: un-distribute those Cs first.)
(Hint2: remember, you can say something like Q=AB and treat Q as a boolean value when doing your manipulations. So AB + CD can be treated as Q + CD → (Q + C)(Q + D) → (AB + C)(AB + D).)
[edit]
Er, I looked over my own work and realized I made a dumb mistake... LOL. So, keep reading below...
Given AC + BC, do you see anything you can pull out?
Once you do, look at your entire equation and see if you can do some Q kind of replacements to find a distributive law to apply.
Sorry, gotta work your brain hard on this stuff for it to ever get easier...
[edit]
If you ever find that you went in a circle, one of the following has happened:
• you made a mistake
• you missed a possibility
• the branch you are messing with leads nowhere and you should back up
[edit2]
Remember the laws stating things like AA = A work both ways. You can take any A and turn it into an AA. (You don’t need to do that for this particular problem; just remember that the transformation is valid from either side of the equal sign.)
> I tried adding (B + !B) to AC, again why is this allowed?
x + !x = 1 (rule 7)
x * 1 = x (rule 4)
so AC === AC (B+!B)
> why do we have to pick AC
00 01 11 10 - AB
0 0 0 0 1
1 0 1 1 1
C
the right column gives you A!B
the bottom mid gives you BC
the bottom right would give you AC, but it's already contained in the other two, so you don't need it
so A!B + BC
¿how to figure out just with algebra operations? no idea
yes, you can reduce it differently. The choice is arbitrary.
boolean math is aggravating (on par with trig substitutions, a lot to remember as you work through them). I can't stress enough how using truth tables and a kmap will get you there faster and easier with less frustrations. Won't help if its a class on boolean algebra, but if you just want the answer, that is how to do it.
What you usually find out is that a lot of if/then logic is excessive, and 10 statements are really saying 2-3 statements worth of logic (from a coder's standpoint).
take your alternate reduced equation. If you substitute values, you will get the other one back if you did it right (I didnt double check you).
think about algebra.
if a = b+c
and you have something like
a*a + b -bc = 0
you know b = a-c
changing it to
a*a +(a-c) -((a-c)c)
or change it to
(b+c)(b+c)+b-bc
does not matter which way you go, does it?
Same idea. Just pick one.
Something to take away from this:
software may not give you the exact same form as you got by hand. Both can still be correct. It can sometimes take a while to validate that the two results are the same thing in different forms.
if a = b+c
and you have something like
a*a + b -bc = 0
you know b = a-c
changing it to
a*a +(a-c) -((a-c)c)
or change it to
(b+c)(b+c)+b-bc
does not matter which way you go, does it?
Same idea. Just pick one.
ah ok I get the gist of what you're saying, so A!B + AC is the same as A!B + BC?
take your alternate reduced equation. If you substitute values, you will get the other one back if you did it right (I didnt double check you).
> why did we add the (B + !B) and why couldn't we use(A + A!)
because you wanted to end with A!BC and ABC so they get absorbed
it's «easier» when you know what's your target
¿how could you figure out that AC will die without using the truth table or Karnaugh map? I have no idea.
ah ok I get the gist of what you're saying, so A!B + AC is the same as A!B + BC?
damifino. I assume you did it right, and if you did, then yes, its the same.
why not get some more practice in by proving it :)
if that is true, then A == B? My Boolean algebra is extremely rusty. I can't recall the last time I needed it after school, and school was long ago. Sub in inequalities is a little weirder than equality. I know you can do it, but you have to be more careful.
No, it is part of recognizing patterns. Remember, boolean algebra is a tool for helping you to reason about boolean expressions, but it is not true algebra.
Here is something to think about:
A!B + AC + BC
A!B + AC + AC + BC
A!B + AC + BC + AC
A(!B + C) + C(B + A)
Both terms are of the form Q(something + R), except that Q and R swap! This is a strong clue that that lone term AC may be unnecessary.
Remembering that 1+A = 1, the only time that AC makes a difference in the expression result is if both A and C are true. (Otherwise it is zero and does not affect anything, right?) So, back to our two term expression:
A(!B + C) + C(B + A)
If both A and C are true
1(!B + 1) + 1(B + 1)
...then the value of B is irrelevant; the expression evaluates as true. Does the same hold if we remove the AC term?
A!B + AC + BC
A!B + BC
1!B + B1
Behold, it does hold true! Likewise, if either A or C are false, then the expression relies on the remaining terms.
Here is your answer. You cannot remove it algebraicly, because we aren't dealing with normal numbers. This isn't real algebra, we aren't actually adding or multiplying the values. We're just pretending to to make life a little easier.
Oh, and the three term solution is a valid and correct answer. The point is just that once you get there, the expression should be much simpler than what you started with, which makes it a whole lot easier to play with truth tables and k-maps and the like.