Table of contents
Boolean Algebra
Parent: Digital Circuits
Subject: Computer Science
Type: Semester
SL#: 2402181637
Status: Current

Binary logic deals with vairables that take two discrete values — 1 for TRUE and 0 for FALSE. A simple switching circuit containing active elements such as diode and the transistor can demonstrate the binary logic, which can either be ON (switch closed) or OFF (switch open). Electrical signals such as voltage or current exist throughout the digital system in either one of the two recognizable voltages, except during the transition.

Representations

  • Aˉ=NOT\bar{A}=\textnormal{NOT}
  • A+B=ORA+B=\textnormal{OR}
  • A.B=ANDA.B=\textnormal{AND}

Formulae

  1. A+A=AA+A=A
    A.A=AA.A=A
  2. A+Aˉ=1A+\bar{A}=1
    A.Aˉ=0A.\bar{A}=0
  3. A+0=AA+0=A
    A.0=0A.0=0
  4. A+1=1A+1=1
    A.1=AA.1=A
  5. Aˉˉ=A\bar{\bar{A}}=A
  6. A+AB=AA+AB=A
  7. (A+B)(A+C)=A+BC(A+B)(A+C)=A+BC
  8. A+AˉB=A+BA+\bar{A}B=A+B

Example 1: Prove AB+AˉC+BC=AB+AˉCAB+\bar{A}C+BC=AB+\bar{A}C

Solution:

LHS=AB+AˉC+BC=AB+AˉC+BC(A+Aˉ)[X+Xˉ=1]=AB+AˉC+ABC+AˉBC=AB(1+C)+AˉC(1+B)=AB+AˉC[1+X=1]=RHS\begin{align*} \textnormal{LHS}&=AB+\bar{A}C+BC\\ &=AB+\bar{A}C+BC(A+\bar{A}) && [\because X+\bar{X}=1]\\ &=AB+\bar{A}C+ABC+\bar{A}BC\\ &=AB(1+C)+\bar{A}C(1+B)\\ &=AB+\bar{A}C && [\because 1+X=1]\\ &=\textnormal{RHS} \end{align*}

Therefore, proved.

Example 2: Prove A+AˉB=A+BA+\bar{A}B=A+B using truth table.

Solution:

AABBAˉB\bar{A}BA+AˉBA+\bar{A}BA+BA+B
00000
01111
10011
11011

Since the columns A+AˉBA+\bar AB is equal to A+BA+B, therefore, the truth table holds.

Example 3: Prove AˉBˉCˉ+AˉBCˉ+ABˉCˉ+ABCˉ=Cˉ\bar{A}\bar{B}\bar{C}+\bar{A}B\bar{C}+A\bar{B}\bar{C}+AB\bar{C}=\bar{C}

Solution:

LHS=AˉBˉCˉ+AˉBCˉ+ABˉCˉ+ABCˉ=AˉCˉ(Bˉ+B)+ACˉ(Bˉ+B)=AˉCˉ+ACˉ[Xˉ+X=1]=Cˉ(Aˉ+A)=Cˉ[Xˉ+X=1]=RHS\begin{align*} \text{LHS}&=\bar{A}\bar{B}\bar{C}+\bar{A}B\bar{C}+A\bar{B}\bar{C}+AB\bar{C}\\ &=\bar{A}\bar{C}(\bar{B}+B)+A\bar{C}(\bar{B}+B)\\ &=\bar{A}\bar{C}+A\bar{C} && [\because \bar{X}+X=1]\\ &=\bar{C}(\bar{A}+A)\\ &=\bar{C} && [\because \bar{X} + X=1]\\ &=\text{RHS} \end{align*}

Example 4: Prove AB+Aˉ+Cˉ+ABˉC(AB+C)=1AB+\bar{A}+\bar{C}+A\bar{B}C(AB+C)=1

Solution:

LHS=AB+Aˉ+Cˉ+ABˉC(AB+C)=B+Aˉ+Cˉ+ABˉ(AB+C)[X+XˉY=X+Y]=B+A(AB+C)+Aˉ+Cˉ[X+XˉY=X+Y]=B+AB+C+Aˉ+Cˉ[X+XˉY=X+Y]=B+AB+Aˉ+1[X+Xˉ=1]=1[X+1=1]=RHS\begin{align*} \text{LHS}&=AB+\bar{A}+\bar{C}+A\bar{B}C(AB+C)\\ &=B+\bar{A}+\bar{C}+A\bar{B}(AB+C)&&[\because X+\bar{X}Y=X+Y]\\ &=B+A(AB+C)+\bar{A}+\bar{C}&&[\because X+\bar{X}Y=X+Y]\\ &=B+AB+C+\bar{A}+\bar{C}&&[\because X+\bar{X}Y=X+Y]\\ &=B+AB+\bar{A}+1&&[\because X+\bar{X}=1]\\ &=1&&[\because X+1=1]\\ &=\text{RHS} \end{align*}

Example 5: Prove AˉB(Dˉ+CˉD)+B(A+AˉCD)=B\bar{A}B(\bar{D}+\bar{C}D)+B(A+\bar{A}CD)=B

Solution:

LHS=AˉB(Dˉ+CˉD)+B(A+AˉCD)=AˉBDˉ+AˉBCˉD+AB+AˉBCD=AˉBDˉ+AB+AˉBD(Cˉ+C)=AˉBDˉ+AB+AˉBD[X+Xˉ=1]=AˉB(Dˉ+D)+AB=AˉB+AB[X+Xˉ=1]=B(Aˉ+A)=B[Xˉ+X=1]=RHS\begin{align*} \text{LHS}&=\bar{A}B(\bar{D}+\bar{C}D)+B(A+\bar{A}CD)\\ &=\bar{A}B\bar{D}+\bar{A}B\bar{C}D+AB+\bar{A}BCD\\ &=\bar{A}B\bar{D}+AB+\bar{A}BD(\bar{C}+C)\\ &=\bar{A}B\bar{D}+AB+\bar{A}BD && [\because X+\bar{X}=1]\\ &=\bar{A}B(\bar{D}+D)+AB\\ &=\bar{A}B+AB && [\because X+\bar{X}=1]\\ &=B(\bar{A}+A)\\ &=B&&[\because \bar{X}+X=1]\\ &=\text{RHS} \end{align*}

Karnaugh Map

Karnaugh Map, in short K-map is used to minify boolean expressions. K-maps are made using 2n2^n square patterns. It can be used in two formats:

  • SOP: Sum of products (AˉBˉ,AˉB,AB,ABˉ\bar{A}\bar{B}, \bar{A}B, AB, A\bar{B})
  • POS: Product of sums (A+B,A+Bˉ,Aˉ+Bˉ,Aˉ+BA+B, A+\bar{B}, \bar{A}+\bar{B}, \bar{A}+B)

Sum of products

For example, K-map for two entries is, (A,B)=22=4(A,B)=2^2=4:

2 entry K-map

K-map for three entries is, (A,B,C)=23=8(A,B,C)=2^3=8:

3 entry K-map

K-map for four entries is, (A,B,C,D)=24=16(A,B,C,D)=2^4=16:

4 entry K-map

For each entry data is mapped, in the power of 22 itself. Maximum number of entries are grouped, in the powers of base 2 in decending order, i.e., 16,8,4,2\ldots 16,8,4,2. A single entry can never be considered.

Example 6: Considering entries, f=8,10,11,12,13,14,15f=\sum{8,10,11,12,13,14,15}, find the minimized expression using K-map.

K-map for the above entries is:

4 entry K-map

From the yellow region, the common variables are ABAB, the pink region has ADˉA\bar{D} in common, and the green region has ACAC in common. Therefore, the minimized result for the K-map is:

Result=AB+AC+ADˉ\text{Result}=AB+AC+A\bar{D}

Example 7: Considering entries, f=7,9,10,11,12,13,14,15f=\sum{7,9,10,11,12,13,14,15}, find the minimized expression using K-map.

4 entry K-map

From, the pink region, we have ABAB, the green region has ADAD in common, the blue region has BCDBCD in common, and the wellow region has ACAC in common.

Result=AB+AD+AC+BCD\therefore \text{Result}=AB+AD+AC+BCD

Don't care condition, is when entries have no effect on the minimization but can be used to help pair other entries are called don't care entries.

Example 8: Considering entries, f(A,B,C,D)=m(1,3,7,11,15)+d(0,2,5)f(A,B,C,D)=\displaystyle\sum_m{(1,3,7,11,15)}+\displaystyle\sum_d{(0,2,5)}, find the minimized expression using K-map.

4 entry K-map

From the red region, we have CDCD as common, and from the yellow region, we have AˉBˉ\bar{A}\bar{B} as common.

Result=AˉBˉ+CD\therefore \text{Result}=\bar{A}\bar{B}+CD

Example 9: Considering entries, f(A,B,C,D)=m(0,2,3,6,7)+d(8,10,11,15)f(A,B,C,D)=\displaystyle\sum_m{(0,2,3,6,7)}+\displaystyle\sum_d{(8,10,11,15)}, find the minimized expression using K-map.

4 entry K-map

From the pink region, we have AˉC\bar{A}C common, and from blue regions in the corners, we have BˉDˉ\bar{B}\bar{D} as common.

Result=AˉC+BˉDˉ\therefore\text{Result}=\bar{A}C+\bar{B}\bar{D}

Product of sums

In sum of products, we consider the entries as 1 to perform operations, but in case of product of sums, we consider the entries as 0 to perform operations.

K-map for four entries in products of sum i.e, f(A,B,C,D)f(A,B,C,D) is:

4 entry K-map

Example 10: Considering entries, f(A,B,C,D)=π(1,3,5,7,9,10,12,13)f(A,B,C,D)=\pi(1,3,5,7,9,10,12,13), find the minimized expression using K-map.

4 entry K-map

From the blue region, we can get the sum as C+DˉC+\bar{D}. From the red region we get the sum as, A+DˉA+\bar{D}, from the green region, we get, Aˉ+Bˉ+C\bar{A}+\bar{B}+C, and from the yellow region, we have Aˉ+B+Cˉ+D\bar{A}+B+\bar{C}+D.

Result=(Aˉ+Bˉ+C).(C+Dˉ).(A+Dˉ).(Aˉ+B+Cˉ+D)\therefore\text{Result}=(\bar{A}+\bar{B}+C).(C+\bar{D}).(A+\bar{D}).(\bar{A}+B+\bar{C}+D)

Example 11: Considering entries, f(A,B,C,D)=πm(0,2,3,5,7,8,13)+πd(1,6,12)f(A,B,C,D)=\pi_m(0,2,3,5,7,8,13)+\pi_d(1,6,12), find the minimized expression using K-map.

4 entry K-map

From the yellow region, we have A+BA+B, the red region gives, A+DˉA+\bar{D}, the blue region gives, Aˉ+C+D\bar{A}+C+D, and the green region gives, Aˉ+Bˉ+C\bar{A}+\bar{B}+C.

Result=(A+B)(A+Dˉ)(Aˉ+C+D)(Aˉ+Bˉ+C)\therefore\text{Result}=(A+B)(A+\bar{D})(\bar{A}+C+D)(\bar{A}+\bar{B}+C)

Example 12: A company has 100100 shares. There are four shareholders written as f(x)=Sf(x)=S, where xx is the shareholder and SS is the number of shares. The four shareholders and their shares are: f(A)=40f(A)=40, f(B)=30f(B)=30, f(C)=20f(C)=20, f(D)=10f(D)=10. Make a digital circuit such that the resolution will be passed if 2/32/3-rd of the vote is for it.

Solution:

Equivalent votes required to pass a resolution:

ve=23×100=66.6767v_e=\frac{2}{3}\times100=66.67\approx67

Truth table for votes and resolution passing:

ABCDPE
000000
000101
001002
001103
010004
010105
011006
011107
100008
100109
1010010
1011111
1100112
1101113
1110114
1111115

where, P is the passing of resolution, and E is the equivalent digit

K-map for the circuit:

4 entry K-map

From the blue region, we have ABAB has common, and in the green region, we have ACDACD as common.

Therefore, the circuit result is:

Result=AB+ACD\text{Result}=AB+ACD

De-Morgan's theorem

De-Morgan's theorem, has the following operations:

  • A+B=Aˉ.Bˉ\overline{A+B}=\bar{A}.\bar{B}

  • A.B=Aˉ+Bˉ\overline{A.B}=\bar{A}+\bar{B}

Example 13: Evaluate (Aˉ+BˉC).(AB+C)\overline{(\bar{A}+\bar{B}C).(\overline{AB}+C)}

Expression=(Aˉ+BˉC).(AB+C)=(Aˉ+BˉC)+(AB+C)=Aˉ.BˉC+AB.Cˉ=A.(B+Cˉ)+ABCˉ\begin{align*} \text{Expression}&=\overline{(\bar{A}+\bar{B}C).(\overline{AB}+C)}\\ &=\overline{(\bar{A}+\bar{B}C)}+\overline{(\overline{AB}+C)}\\ &=\overline{\bar{A}}.\overline{\bar{B}C}+\overline{\overline{AB}}.\bar{C}\\ &=A.(B+\bar{C})+AB\bar{C} \end{align*}

Example 14: Evaluate (AB+Cˉ).(A+B+C)+AˉB\overline{(AB+\bar{C}).(\overline{A+B}+C)+\bar{A}B}

Expression=(AB+Cˉ).(A+B+C)+AˉB={(AB+Cˉ).(A+B+C)}.(AˉB)={(AB+Cˉ)+(A+B+C)}.(Aˉˉ+Bˉ)={(AB.Cˉˉ)+(A+B).Cˉ}.(A+Bˉ)={(Aˉ+Bˉ).C+(A+B).Cˉ}.(A+Bˉ)\begin{align*} \text{Expression}&=\overline{(AB+\bar{C}).(\overline{A+B}+C)+\bar{A}B}\\ &=\{\overline{(AB+\bar{C}).(\overline{A+B}+C)}\}.(\overline{\bar{A}B})\\ &=\{\overline{(AB+\bar{C})}+\overline{(\overline{A+B}+C)}\}.(\bar{\bar{A}}+\bar{B})\\ &=\{(\overline{AB}.\bar{\bar{C}})+(\overline{\overline{A+B}}).\bar{C}\}.(A+\bar{B})\\ &=\{(\bar{A}+\bar{B}).C+(A+B).\bar{C}\}.(A+\bar{B}) \end{align*}

Prove that: (A+B)(AˉCˉ+C)(Bˉ+AC)=AˉB(A+B)(\bar{A}\bar{C}+C)(\overline{\bar{B}+AC})=\bar{A}B

LHS=(A+B)(AˉCˉ+C)(Bˉ+AC)=(A+B)(Aˉ+C)(Bˉˉ.AC)[XˉY+X=Y+X]=(A+B)(Aˉ+C){B(Aˉ+Cˉ)}=(AAˉ+AC+AˉB+BC)(Aˉ+Cˉ)B=(AC+AˉB+BC)(AˉB+BCˉ)[Xˉ.X=0]=AˉABC+AˉB+AˉBC+ABCCˉ+AˉBCˉ+BCCˉ=AˉB+AˉB(C+Cˉ)=AˉB+AˉB[X+Xˉ=1]=AˉB=RHS\begin{align*} \text{LHS}&=(A+B)(\bar{A}\bar{C}+C)(\overline{\bar{B}+AC})\\ &=(A+B)(\bar{A}+C)(\bar{\bar{B}}.\overline{AC})&[\because \bar{X}Y+X=Y+X]\\ &=(A+B)(\bar{A}+C)\{B(\bar{A}+\bar{C})\}\\ &=(A\bar{A}+AC+\bar{A}B+BC)(\bar{A}+\bar{C})B\\ &=(AC+\bar{A}B+BC)(\bar{A}B+B\bar{C})&[\because \bar{X}.X=0]\\ &=\bar{A}ABC+\bar{A}B+\bar{A}BC+ABC\bar{C}+\bar{A}B\bar{C}+BC\bar{C}\\ &=\bar{A}B+\bar{A}B(C+\bar{C})\\ &=\bar{A}B+\bar{A}B&[\because X+\bar{X}=1]\\ &=\bar{A}B\\ &=\text{RHS} \end{align*}
Docs
AnanyaGB
About
© MIT - 2024