so I'm almost finished my computer science degree and I'm going back to some basics,in order to become a better programmer I would like to understand how digital circuits work so right now I am doing some revision on boolean algebra
I have been doing ok on them but now hit a road block,my answer is not totally wrong because if I moved some brackets it would be correct but would of could of should of,it still isn't technically correct,
so here is the question I am attempting
(A + B)*(A + BC + CB)
this is the correct answer( from a boolean algebra calculator) (A + B * BC + B * CB)
my answer is similar but a little wrong I got (A + BBC + BCB)
I am guessing it is a small mistake I am making somewhere
I first multiply whats in brackets so A * A + A * BC + A * CB + B * A + B * BC + B * CB
and I get
AA + ABC + ACB + BA + BBC + BCB( I must have made the mistake here for example maybe it should be A(BC) instead of ACB? but if so how come ?? I thought A * BC would = ABC)
I then do some problem solving
A(BC +1) = A
A + ACB + BA + BBC + BCB
A(CB + 1) = A
A + BA + BBC + BCB
A(B + 1) = A
A + BBC + BCB
the final line is my answer so what mistake I am doing?
(also I know there is far simpler rules to simplify boolean algebra but I learning(or relearning =) so I am doing it the long way for now,
any feedback will be more than appreciated :) thanks
On your first expression, (A + B)*(A + BC + CB), are BC and CB two different variables, or the conjunction of B and C?
In the latter case, it seems like the correct simplification would be
(A + B)(A + BC + CB)
(A + B)(A + BC + BC)
(A + B)(A + (BC + BC))
(A + B)(A + BC)
(A + B)A + (A + B)BC
AA + BA + ABC + BBC
A + BA + ABC + BC
(if x implies y then x | y is equivalent to x)
A + BC
I have no clue how this is the answer but by looking at other youtube comments(source from where I got the question from) the above answer seems to be correct
but the answer I get is (B + ~A * C)
I got this by the following steps
first I rearranged the order
AB + BC + ~AC
AB + BC have a common element B so I did
B(A + C + 1) = B
B + ~AC
I wonder what I did wrong as this has worked for other problems I have done.
ab + 'ac + bc
a b c | ab 'ac bc f
0 0 0 | 0 0 0 0
0 0 1 | 0 1 0 1
0 1 0 | 0 0 0 0
0 1 1 | 0 1 1 1
1 0 0 | 0 0 0 0
1 0 1 | 0 0 0 0
1 1 0 | 1 0 0 1
1 1 1 | 1 0 1 1
Here you have two groups
1 2 3
a b c | ab 'ac bc f
1 1 0 | 1 0 0 1
1 1 1 | 1 0 1 1
a and b are true, and c is irrelevant, so ab produces this part.
1 2 3
a b c | ab 'ac bc f
0 0 1 | 0 1 0 1
0 1 1 | 0 1 1 1
Here a is false and c is true, while b is irrelevant, so 'ac produces this part.
Put the two together and you get
ab + 'ac
EDIT: Note that there's other ways to process the truth table. If you don't group at all, for example, you would get 'a'bc + 'abc + ab'c + abc. The grouping I used produces the simplest expression. As for how to know how to group values, it's just practice.
(x + !x) is equivalent to 1, so any time you have a 1 value, you can replace it with (x + !x), where x is any variable conceivable.
Additionally, x*1 is equivalent to x, so you can always AND any expression with 1 and get an equivalent expression.
AB and BC both share B so wouldn't it make sense to have B(A + C + 1) = B ??
No. x + 1 is not an equivalent expression to x. But you could say B((A + C)1), or B(A + C + 0).
(x + !x) is equivalent to 1, so any time you have a 1 value, you can replace it with (x + !x), where x is any variable conceivable.
Additionally, x*1 is equivalent to x, so you can always AND any expression with 1 and get an equivalent expression.
thanks Helios,but still kind of fail to see where A+A' came from, There was an AB + A'C + BC but no (A + A')?
It doesn't come from anywhere. You can always AND a truth value by a tautology to get an equivalent truth value.
For example, "right now it's raining" is a statement that can be true or false, correct? So I should be able to conjunct it with any random tautology I can think of without altering its truth value. Are "right now it's raining" and "right now it's raining, and bears are either unicorns or nor unicorns" equivalent statements?
Or if it helps to put these terms, you can always multiply a real value by 1 without changing it, right? Furthermore, you can multiply it by any random expression, as long as the expression is equal to 1, correct?
So we can say that x = x*cos(1-sqrt(1)), regardless of the value of x, right? Where did cos(1-sqrt(1)) come from? I made it up. Perhaps that particular expression serves a purpose in simplifying larger expression, or perhaps I was just feeling creative.
It's okay to feel a little frustrated. This manner of simplification is usually the least intuitive for most people.
AB and BC both share B so wouldn't it make sense to have B(A + C + 1) = B ??
No. x + 1 is not an equivalent expression to x. But you could say B((A + C)1), or B(A + C + 0).
but still wouldn't that give you B ? instead of AB ?
Why not (Q + Q'), where Q is the truth value for the existence of cauldrons of gold at the end of rainbows?
The answer to all these questions is that one form helps you simplify the expression further, while the others don't.
but still wouldn't that give you B ? instead of AB ?
No.
AB + BC = B(A + C) = B(A + C + 0)
AB + BC = B(A + C) = B((A + C)1)
How do you simplify either B(A + C + 0) or B((A + C)1) down to B?