In: Computer Science
prove A(A+B) = A using truth table
Solution
| A | B | (A+B) | A(A+B) |
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 |
Since taking a look at all combination of A and B bits the A(A+B) produces same result as A, so A(A+B) = A
Explanation
In order to explain above truth table we need to understand the the concept of logic or boolean operations.
Logic operations
Logic operations include any operations that manipulate Boolean values. Boolean values are either true or false. The true value can be represented as 1 and false can be represented as 0.
Basic boolean operations
AND
| A | B | A ^ B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
The AND operations produce 0 if one of the operand is 0 and it produces 1 if all operands are 1.
The AND operations can represented with out an symbol like AB or using . (dot) or using & or ^.
OR
| A | B | A v B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
The OR operations produce 1 if one of the operand is 1 and it produces 0 if all operands are 1.
The OR operations can be represented with | or + or v.
NOT
Though not required to understand this question, this operation is must to know operation among basic boolean operations.
| A | A' |
|---|---|
| 0 | 1 |
| 1 | 0 |
NOT operation toggles the bit or boolean value , that's if the operand is 0 then it will produce 1 and if the operand is 1 it will produce 0.
Our question
Our question simply is A(A+B) that A ^ (A v B).
When writing the truth table we take each term' value.Here the terms are A,B, AvB, A^(AvB).
| A | B | (A+B) | A(A+B) |
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 |
Using the above knowledge we write our truth table. Since only two major terms A and B variables are used we only need to bother two bit data. That our truth table columns will contain all the two combinations of 0 and 1.
So when we write them all we can clearly see that (look at bold part) A and A(A+B) has same result on each row.
So we can conclude A (A+B) = A.
Hope this cleared your doubts and Have a nice day :)