r/computerscience • u/lilflo13 • Feb 17 '26
Help Boolean Algebra
Can someone please explain boolean algebra and the laws like im 5. I’m so lost. I understand the logic gates but now seeing equations like (A.B).C = A.(B.C) I’m struggling
1
Upvotes
View all comments
3
u/clickyclicky456 Feb 17 '26
Logical AND is like an AND gate, the "result" (output of the gate) is 1 if and only if both arguments (inputs to the gate) are 1. Similarly with logical OR, the result is 1 if either or both of the arguments are 1.
So you can draw out a truth table like this:
This is just telling you what the result is of A AND B for all possible combinations of the values of A and B.
Now if you look at something like (A AND B) AND C you can draw out a similar truth table with all 8 possible combinations of values of A, B and C. You will see that the results column is the same regardless of whether you do A AND B first and then AND the result of that with C, or whether you do B AND C first and then AND the result of that with A.