# Fundamental Hardware Elements of Computers: Boolean identities

 ← Simplifying boolean equations Boolean identities De Morgan's Laws →

Sometimes a very complex set of gates can be simplified to save on cost and make faster circuits. A quick way to do that is through boolean identities. Boolean identities are quick rules that allow you to simplify boolean expressions. For all situations described below:

A = It is raining upon the British Museum right now (or any other statement that can be true or false)
B = I have a cold (or any other statement that can be true or false)

Identity Explanation Truth Table
${\displaystyle A.A=A}$ It is raining AND It is raining is the same as saying It is raining
${\displaystyle A}$ ${\displaystyle A}$ ${\displaystyle A.A}$
0 0 0
1 1 1
${\displaystyle A.{\overline {A}}=0}$ It is raining AND It isn't raining is impossible at the same time so the statement is always false
${\displaystyle A}$ ${\displaystyle {\overline {A}}}$ ${\displaystyle A.{\overline {A}}}$
0 1 0
1 0 0
${\displaystyle 1+A=1}$ 2+2=4 OR It is raining. So it doesn't matter whether it's raining or not as 2+2=4 and it is impossible to make the equation false
1 ${\displaystyle A}$ ${\displaystyle 1+A}$
1 0 1
1 1 1
${\displaystyle 0+A=A}$ 1+2=4 OR It is raining. So it doesn't matter about the 1+2=4 statement, the only thing that will make the statement true or not is whether it's raining
${\displaystyle 0}$ ${\displaystyle A}$ ${\displaystyle 0+A}$
0 0 0
0 1 1
${\displaystyle A+A=A}$ It is raining OR It is raining is the equivalent of saying It is raining
${\displaystyle A}$ ${\displaystyle A}$ ${\displaystyle A+A}$
0 0 0
1 1 1
${\displaystyle A+{\overline {A}}=1}$ It is raining OR It isn't raining is always true
${\displaystyle A}$ ${\displaystyle {\overline {A}}}$ ${\displaystyle A+{\overline {A}}}$
0 1 1
1 0 1
${\displaystyle 0.A=0}$ 1+2=4 AND It is raining. It is impossible to make 1+2=4 so this equation so this equation is always false
${\displaystyle 0}$ ${\displaystyle A}$ ${\displaystyle 0.A}$
0 0 0
0 1 0
${\displaystyle 1.A=A}$ 2+2=4 AND It is raining. This statement relies totally on whether it is raining or not, so we can ignore the 2+2=4 part
${\displaystyle 1}$ ${\displaystyle A}$ ${\displaystyle 1.A}$
1 0 0
1 1 1
${\displaystyle A+B=B+A}$ It is raining OR I have a cold, is the same as saying: I have a cold OR It is raining
${\displaystyle A}$ ${\displaystyle B}$ ${\displaystyle A+B}$ ${\displaystyle B+A}$
0 0 0 0
0 1 1 1
1 0 1 1
1 1 1 1
${\displaystyle A.B=B.A}$ It is raining AND I have a cold, is the same as saying: I have a cold AND It is raining
${\displaystyle A}$ ${\displaystyle B}$ ${\displaystyle A.B}$ ${\displaystyle B.A}$
0 0 0 0
0 1 0 0
1 0 0 0
1 1 1 1
${\displaystyle A+(A.B)=A}$ It is raining OR (It is raining AND I have a cold). If It is raining then both sides of the equation are true. Or if It is not raining then both sides are false. Therefore everything relies on A and we can replace the whole thing with A. Alternatively we could play with the boolean algebra equation:

${\displaystyle A+(A.B)=(1.A)+(A.B)}$ Using the identity rule ${\displaystyle 1.A=A}$
${\displaystyle (1.A)+(A.B)=A.(1+B)}$ Take out the A, common to both sides of the equation
${\displaystyle A.(1+B)=A.1}$ Using the identity rule ${\displaystyle 1+B=1}$
${\displaystyle A.1=A}$ Using the identity rule ${\displaystyle 1.A=A}$

${\displaystyle A}$ ${\displaystyle B}$ ${\displaystyle A.B}$ ${\displaystyle A+(A.B)}$
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
${\displaystyle A.(A+B)=A}$ It is raining AND (It is raining OR I have a cold). If It is raining then both sides of the equation are true. Or if It is not raining then both sides are false. Therefore everything relies on A and we can replace the whole thing with A. Alternatively we could play with the boolean algebra equation:

${\displaystyle A.(A+B)=(0+A).(A+B)}$ Using the identity rule ${\displaystyle 0+A=A}$
${\displaystyle (0+A).(A+B)=A+(0.B)}$ Take out the A, common to both sides of the equation
${\displaystyle A+(0.B)=A+0}$ Using the identity rule ${\displaystyle 0.B=0}$
${\displaystyle A+0=A}$ Using the identity rule ${\displaystyle 0+A=A}$

${\displaystyle A}$ ${\displaystyle B}$ ${\displaystyle {A+B}}$ ${\displaystyle A.(A+B)}$
0 0 0 0
0 1 1 0
1 0 1 1
1 1 1 1

Examples of manipulating and simplifying simple Boolean expressions.

 Example: Simplifying boolean expressions Let's try to simplify the following: ${\displaystyle A+B+B}$  Using the rule ${\displaystyle B+B=B}$ ${\displaystyle A+B+B=A+B}$  Trying a slightly more complicated example: ${\displaystyle (A.0)+B}$  dealing with the bracket first ${\displaystyle (0)+B}$ as ${\displaystyle 0.A=0}$ ${\displaystyle B}$ as ${\displaystyle 0+B=B}$ ${\displaystyle (A.0)+B=B}$ 
 Exercise: Simplifying boolean expressions ${\displaystyle A+0}$ Answer : ${\displaystyle A}$ ${\displaystyle A.0}$ Answer : ${\displaystyle 0}$ ${\displaystyle E+1}$ Answer : ${\displaystyle 1}$ ${\displaystyle A+A+B+B+C}$ Answer : ${\displaystyle A+B+C}$ ${\displaystyle (A.B)+(A.B)}$ Answer : ${\displaystyle A.B}$ ${\displaystyle A.A.B.B.C}$ Answer : ${\displaystyle A.B.C}$ ${\displaystyle (A+{\overline {A}}).B}$ Answer : ${\displaystyle (A+{\overline {A}}).B}$ applying the identity ${\displaystyle A+{\overline {A}}=1}$ ${\displaystyle (1).B}$ applying the identity ${\displaystyle 1.B=B}$ ${\displaystyle B}$

Sometimes we'll have to use a combination of boolean identities and 'multiplying' out the equations. This isn't always simple, so be prepared to write truth tables to check your answers:

 Example: Simplifying boolean expressions ${\displaystyle (A.B)+A}$  Where can we go from here, let's take a look at some identities ${\displaystyle (A.B)+(A.1)}$ using the identity A = A.1 ${\displaystyle A.(B+1)}$ taking the common denominator from both sides ${\displaystyle A.1}$ as B+1 = 1 ${\displaystyle A}$ Now for something that requires some 'multiplication' ${\displaystyle ({\overline {A}}.B)+A}$ ${\displaystyle ({\overline {A}}+A).(B+A)}$multiply it out ${\displaystyle 1.(B+A)}$cancel out the left hand side as ${\displaystyle ({\overline {A}}+A)=1}$ ${\displaystyle B+A}$using the identity ${\displaystyle 1.Q=Q}$
 Exercise: Simplifying boolean expressions ${\displaystyle (A.{\overline {B}})+B}$ Answer : ${\displaystyle (A.{\overline {B}})+B}$ ${\displaystyle (A+B).({\overline {B}}+B)}$ multiplying out ${\displaystyle (A+B).(1)}$ ${\displaystyle (A+B)}$  ${\displaystyle (A+B).{\overline {A}}}$ Answer : This takes some 'multiplying' out: ${\displaystyle (A+B).{\overline {A}}}$ ${\displaystyle (A.{\overline {A}})+({\overline {A}}.B)}$ ${\displaystyle 0+({\overline {A}}.B)}$ ${\displaystyle B.{\overline {A}}}$  ${\displaystyle B.(A+A.B)}$ Answer : This takes some 'multiplying' out: ${\displaystyle B.(A+(A.B))}$ treat the brackets first and the AND inside the brackets first ${\displaystyle (B.A)+(B.A.B)}$ multiply it out ${\displaystyle (B.A)+(A.B)}$ as ${\displaystyle B.A.B=A.B}$ ${\displaystyle A.B}$ as ${\displaystyle (B.A)=(A.B)}$  ${\displaystyle (A+B).(A+A)}$ Answer : ${\displaystyle (A+B).(A+A)}$ ${\displaystyle (A+B).A}$ as ${\displaystyle A=A+A}$ ${\displaystyle (A+B).(A+0)}$ as ${\displaystyle A=A+0}$ ${\displaystyle A+(B.0)}$ take A out as the common denominator ${\displaystyle A}$ as ${\displaystyle (B.0)=0}$  ${\displaystyle (A.{\overline {B}})+{\overline {A}}}$ Answer : This takes some 'multiplying' out: ${\displaystyle (A.{\overline {B}})+{\overline {A}}}$ ${\displaystyle (A+{\overline {A}}).({\overline {B}}+{\overline {A}})}$ ${\displaystyle 1.({\overline {B}}+{\overline {A}})}$ ${\displaystyle {\overline {B}}+{\overline {A}}}$  ${\displaystyle (A.B)+{\overline {A}}}$ Answer : This takes some 'multiplying' out: ${\displaystyle (A.B)+{\overline {A}}}$ ${\displaystyle (A+{\overline {A}}).(B+{\overline {A}})}$ multiplied out ${\displaystyle (1).(B+{\overline {A}})}$ as ${\displaystyle (A+{\overline {A}})=1}$ ${\displaystyle B+{\overline {A}}}$ as ${\displaystyle 1.Q=Q}$  ${\displaystyle (A.{\overline {B}})+(A.B)}$ Answer : Take the common factor, ${\displaystyle A}$ from both sides: ${\displaystyle A.({\overline {B}}+B)}$ As ${\displaystyle {\overline {B}}+B=1}$ Then ${\displaystyle A.({\overline {B}}+B)=A.1}$ As ${\displaystyle A.1=A}$ Then ${\displaystyle (A.{\overline {B}})+(A.B)=A}$