Thursday, March 31, 2011

Booth's Multiplication Algorithm


Booth's multiplication algorithm is a multiplication algorithm that multiplies two signed binary numbers in two's complement notation. Booth's algorithm involves repeatedly adding one of two predetermined values A and S to a product P, then performing a rightward arithmetic shift on P. Let X and Y be the multiplicand and multiplier, respectively; and let X and Y represent the number of bits in X and Y.
  1. Determine the values of A and S, and the initial value of P. All of these numbers should have a length equal to (x + y + 1).
  2. A: Fill the most significant (leftmost) bits with the value of x. Fill the remaining (y + 1) bits with zeros.
  3. S: Fill the most significant bits with the value of (-x) in two's complement notation.
  4. Fill the remaining (y + 1) bits with zeros.
  5.  P: Fill the most significant x bits with zeros. To the right of this, append the value of y. Fill the least significant (rightmost) bit with a zero.
  6. Determine the two least significant (rightmost) bits of P.
  7. If they are 01, find the value of P + A. Ignore any overflow. Perform right shift
  8. If they are 10, find the value of P + S. Ignore any overflow. Perform right shift
  9. If they are 00 or 11, Only perform right shift. Use P directly in the next step.
  10. Arithmetically shift the value obtained in the previous step by a single place to the right. Let P now equal this new value.
  11. Repeat steps 2 and 3 until they have been done y times.
  12. Drop the least significant (rightmost) bit from P. This is the product of x and y.
Example :Find the product of -9 * -12

A (-9)10 9=1001 and 1's Complement  = 0110 2's Complement 0110 +1 = 0111 10111 (1 is sign bit)
S  (A * -1) (9)10 (1001)2
P (-12)10 12=1100 and 1's Complement  = 0011 2's Complement 0011 +1 = 0100 10100 (1 is  sign bit)

Y = 00000 = 5 bits, so repeat the process five times.

X Y +1 New Value
A 10111 00000 0
S 01001 00000 0
101 P 00000 10100 0 Last two bits is 00 Right Shift >>1 00000  01010  0
100 P 00000 01010 0 Last two bits is 00 Right Shift >>1 00000  00101  0
011 P 00000  00101 0 Last two bits is 10 P + S 00000  00101  + 01001 00000 = 01001 00101 0 Right Shift >>1 00100 10010 1
010 P 00100 10010 1 Last two bits is 01 P + A 00100 10010 + 10111 00000 =11011 10010 1 Right Shift >>1 11101 11001 0
001 P 11101 11001 0 Last two bits is 10 P + S 11101 11001 +01001 0000 0 = 00110 11001 0 Right Shift >>1 00011 01100 1
-9 * -12 = 108 After dropping the LSB (Least Significant
Bit)  we get = 00011 01100
= 1101100 =108

Example :Find the product of 15 * -8

A (15)10 (15)10=(1111)2
S  (A * -1) (-15)10 15=1111 and 1's Complement  = 0000 2's Complement 0000 +1 = 0001 10001(1 is  sign bit)
P (-8)10 8=1000 and 1's Complement  = 0111 2's Complement 0111 +1 = 1000 11000(1 is  sign bit)


X Y +1 New Value
A 01111 00000 0
S 10001 00000 0
101 P 00000 11000 0 Last two bits is 00 Right Shift >>1 00000  01100  0
100 P 00000 01100 0 Last two bits is 00 Right Shift >>1 00000  00110
011 P 00000  00110 0 Last two bits is 00 Right Shift >>1 00000  00110
010 P 00000 00011 0 Last two bits is 10 P + S 00000 00011 + 10001 00000 = 10001 00011 Right Shift >>1 11000 10001 1
001 P 11101 11001 0 Last two bits is 11 Right Shift >>1 11100 01000 1
15 * -8 = -120 After dropping the LSB (Least Significant
Bit)  we get = 11100 01000
10001000 = -120

Example :Find the product of 9 * -12

A (9)10 (9)10=(1001)2
S  (A * -1) (-9)10 9=1001 and 1's Complement  = 0110 2's Complement 0110 +1 = 0111 10111(1 is  sign bit)
P (-12)10 12=1100 and 1's Complement  = 0011 2's Complement 0011 +1 = 0100 10100(1 is  sign bit)

X Y +1 New Value
A 01001 00000 0
S 10111 00000 0
101 P 00000 10100 0 Last two bits is 00 Right Shift >>1 00000  01010
100 P 00000 01010 0 Last two bits is 00 Right Shift >>1 00000  00101
011 P 00000  00101 0 Last two bits is 10 P + S 00000 00101 + 10111 00000 = 10111 00101 Right Shift >>1 11011 10010 1
010 P 11011 10010 1 Last two bits is 01 P + A 11011 + 10010 + 01001 00000 = 00100 10010 Right Shift >>1 00010 01001 0
001 P 00010 01001 0 Last two bits is 10 P + S 00010 01001 + 10111 000 = 11001 01001 Right Shift >>1 11100 10100 1
9 * -12 = -108 After dropping the LSB (Least Significant
Bit)  we get = 11100 10100
10010100 = -108

Example : Find the product of 3 x 4


A (3)10 (3)10=(0011)2
S  (A * -1) (-3)10 -3=011 and 1's Complement  = 100 2's Complement 100 +1 = 101 1101(1 is  sign bit)
P (4)10 4=100
4 bits Repeat it for four times

X Y +1 New Value
A 0011 00000 0
S 1101 00000 0
100 P 00000 0100 0 Last two bits is 00 Right Shift >>1 0000  0010
011 P 00000 0010 0 Last two bits is 00 Right Shift >>1 0000  0001
010 P 00000  0001 0 Last two bits is 10 P + S 0000 0001 + 1101 0000 = 1101 0001 Right Shift >>1 1110 1000 1
001 P 1110 1000 1 Last two bits is 01 P + A 1110 1000 + 0011 0000 = 0001 10001 Right Shift >>1 0000 1100 1
3 * 4 = 12 After dropping the LSB (Least Significant
Bit)  we get = 0000 1100
1100= 12

!!!Once again sorry for delay but I wanted it more descript so student can understand it. Next it will be Digital Electronics. Bye!!!

Thursday, February 17, 2011

Quine-McCluskey Method orTabulation Method


In my last blog I have given you some examples, solving Sum of Product (SOP) and Product of Sum (POS) using Karnaugh Map. Today we will solving the same using Quine-McCluskey Method (Tabulation Method)


Example 1:
Simplify the following using Quine-McCluskey Method (Tabulation Method)


f(A,B,C) = Σm(0,1,4,5,6) + Σd(7)

Example 1: f(A,B,C) = Σm(0,1,4,5,6) + Σd(7)

Terms given that includes the don't care option

0

000

1

001

4

100

5

101

6

110

7

111


Repetition of 1's is the basis of grouping.

Group 1


0

000

 Weight = 0
[Group with zero : 1's]

Group2


1

001

 Weight = 1[Group with one : 1's]



4

100


Group 3



5

101

Weight = 2 [Group with two : 1's]



6

110


Group 4



7

111

Weight = 3 [Group with three  : 1's]



Combine a suitable pair to form Column 2, pair can be formed between adjacent group basis of difference. Put a hyphen(-) to indicate difference between the terms. Forming column three will be on the basis of   adjacent pairs that having a hyphen (-) in the identical place. Those terms is used should be marked, here to mark, I used √.



Column I (Number of 1' Implicants)

Column II (Size 2)

Column III (Size 4)

Group1

0

000 √

(0,1) √

00-

(0,1,4,5)

-0-




(0,4) √

-00

(0,4,1,5)

-0-

Group 2


1

001 √

(1,5)  √

-01




4

100 √

(4,5) √

10-

(4,5,6,7)

1--




(4,6) (not used)

1-0



Group 3

5

6
101√

110 √
(5,7)

(6,7)
1-1

11-



Group 4


7

111 √







Rows = prime implicants and columns = ON-set elements place an "X",  if  ON-set element is covered by the prime implicant.Make the following chart using the given terms but do not use the don't care options (cell 7). Also omit the if any duplicate entries like  (0,1,4,5) (0,4,1,5).




0

1

4

5

6

-0- 

 B'

(0,1,4,5)
X
X

X

X


-0-

B'

(0,4,1,5)

X

X

X

X


1--

A

(4,5,6,7)



X

X

X

1- 0

AC'

(4,6)




X


X

After removing duplicate entries we get the following. Now columns 0 and 1  also to be removed as these column has a single X, it has the implicant associated with the row (+) is essential. It must appear in minimum cover.

(**) columns has only one X and row  to be covered is (0,1,4,5) = B'
(*) omit 0,1,4,5 as it is already covered.



0 (**)

1 (**)

4

5

6

-0- 

 B'

(0,1,4,5) +

X (*)

X (*)

X (*)

X (*)


1--

A

(4,5,6,7)



X

X

X

1- 0

AC'

(4,6)



X


X


Eliminate all columns covered by essential primes  (4,5). Find minimum set of rows that cover the remaining columns (4,5,6,7) = A.
f(A,B,C) = Σm(0,1,4,5,6) + Σd(6) = A + B'.

Example 2:
 

Simplify the following using Quine-McCluskey Method (Tabulation Method)

 f(A,B,C,D) = Σm(0,2,8,10,12,13,14,15) + Σd(5,7)

Terms given :
0
0000

2

0010

5

0101

7

0111

8

1000

10

1010

12

1100

13

1101

14

1110


Rewriting in the List basis of weight of 1's

0

0000

2

0010

8

1000

5

0101

10

1010

12

1100

7

0111

13

1101

14

1110

15

1111


Group it basis of repetition of 1's
Group 1

0

0000

 Weight = 0[Group with zero : 1's]

Group2


2

0010

Weight = 1[Group with one : 1's]


8

1000



Group 3

5

0101

Weight = 2 [Group with two : 1's]


10

1010



12

1100

Group 4


7

0111

Weight = 3[Group with three : 1's]


13

1101


14

1110

Group 5


15

1111

Weight = 4[Group with three : 1's]


Combine a suitable pair to form Column 2, pair can be formed between adjacent group basis of difference. Put a hyphen(-) that indicate difference between the terms. Column three only can be formed on the basis of  the pairs having a hyphen (-) in the identical place. Those terms already combined should be marked, here to mark, I used √.



Column I (Number of 1' Implicants)

Column II (Size 2)

Column III (Size 4)

Group1



0

0000 √

(0,2) √

00-0

(0,2,8,10)

-0-0






(0,8) √

-000

(0,8,2,10)

-0-0

Group 2

2
0010

(2,10) √

-010

(8,10,12,14)

1--0

8
1000 √

(8,10) √

10-0

(8,12,10,14)

1--0



(8,12) √

1-00



Group 3

5
0101 √

(5,7) √

01-1

(5,7,13,15)

-1-1

0
1010 √

(5,13) √

-101

(5,13,7,15)

-1-1

12
1100 √

(10,14) √

1-10

(12,13,14,15)

11--




(12,13) √

110-

(12,14,13,15)

11--




(12,14) √

11-0



Group 4


7

0111 √

(7,15) √

-111




13

1101 √

(13,15) √

11-1



14
1110 √

(14,15) √

111-



Group 5








15

1111 √






Rows = prime implicants and columns = ON-set elements, place an "X", if  ON-set element is covered by the prime implicant. Make the following chart using the given terms but do not use the don't care options. Also omit the duplicate entries such like (0,2,8,10) and (0,8,2,10), (8,10,12,14) and .(8,12,10,14), (5,7,13,15) and  (5,13,7,15), (12,13,14,15) and (12,14,13,15).


0

2

8

10

12

13

14

15

B'D'

-0-0

(0,2,8,10)

X

X

X

X





B'D'

-0-0

(0,8,2,10)

X

X

X

X





AD'

1--0

(8,10,12,14)



X

X

X

X

AD'

1--0

(8,12,10,14)



X

X

X


X

BD

-1-1

(5,7,13,15)






X



X

BD

-1-1

(5,13,7,15)






X



X

A

11--

(12,13,14,15)





X

X

X

X

AB

11--

(12,14,13,15)





X

X

X

X


After removing duplicate entries we get the following. Now columns 0 and 2 column has a single X, the implicant associated with the row (+) is essential. It must appear in minimum cover. (**) columns has only one X and row to be covered is (0,2,8,10) = B'.D'.

* omit 0,2,8,10 as it has already covered.


0 **

2 **

8

10

12

13

14

15

B'D'

-0-0

(0,2,8,10) +

X *

X *

X *

X *





AD'

1--0

(8,10,12,14)



X

X

X


X


BD

-1-1

(5,7,13,15)






X


X

AB

11--

(12,13,14,15)





X

X

X

X


Eliminate all columns covered by essential primes  (8,10). Find minimum set of rows that cover the remaining columns
(5,7,13,15) and (12,13,14,15) =BD and AB.

Therefore, from given minterms
f(A,B,C,D) = Σm(0,2,8,10,12,13,14,15) + Σd(5,7) = AB + B'D' + BD

To give you these two examples I have to spent a couple of hours when easily could have solve it within couple of minutes using Karnaugh Map. Often students ask me why to learn this when it is taken more time than the other easier process, frankly I have no idea.

My next target will be booth algorithm and hope will post in time.

!!!For those students who are going to  appear in I.C.S.E. and I.Sc., best wishes for your exam.!!!

Thursday, February 3, 2011

Boolean algebra Canonical Forms and Solution, Karnaugh Map



Hi, this is the first one in this year and once again failed to post on time but not going to tender apology for it, among you, who knows me will understand that it is examination time and I am little more pre-occupied.

Today we will solve a few minterm and maxterm using Karnaugh map as well as other aspect of Canonical form

Solution for Sum of Product (SOP)

Examples 1:  Using three literals.

Reduce this term using K-Map : f(x,y,z) = Σm(0,2,3,4,6,7)


The sigma sign and as well as 'm' written in lowercase indicate that it is SOP (sum of Product), so we have to find the minterm.

First mark the given cell with 1's and rest with 0's. We have two Quad here, first one using 0,2,4,6 (Map rolling) and second 2,3,6,7.

Quad(0,2,4,6) having m0+m2+m4+m6, we get :  x'y'z' +x'y'z+xy'z'+xyz', common factor is : z'.
Quad(2,3,6,7) having m2+m3+m6+m7, we get : x'yz' + x'yz+xyz'+xyz, common factor is : y
Quad(0,2,4,6) = z'
Quad(2,3,6,7) = y

f(x,y,z)=Σm(0,2,3,4,6,7) = y + z'
Examples 2: Using four literals.
Reduce this term using K-Map : f(a,b,c,d)=Σm(0,1,3,5,7,10,11,12,13,14,15)



Pair(0,1) = m0+m1 = a'b'c'd' + a'b'c'd = a'b'c'
Quad(1,3,5,7)=m1+m3+m5+m7 = a'b'c'd + a'b'cd + a'bc'd + a'bcd = a'd
Quad(12,13,14,15) = m12+m13+m14+m15 =abc'd' + abc'd + abcd' + abcd = ab
Quad(10,11,14,15) = m10+m11+m14+m15 =ab'cd' + ab'cd' + abcd' + abcd = ac

f(a,b,c,d)=Σm(0,1,3,5,7,10,11,12,13,14,15)  = a'b'c' + a'd + ab  + ac
Example 3: Using don't care
f(a,b,c,d)=Σm(0,1,3,8,9,12,13) + Σd(2,6)

Quad(0,1,2,3) = m0 + m1 + m2 + m3 = a'b'c'd' + a'b'c'd + a'b'cd' + a'b'cd   = a'b'         
Quad(8,9,12,13) = m8 + m9 + m12 + m13 = ab'c'd' + ab'c'd + abc'd' + abc'd =  ac'
 [We are using cell 2 to create a quad as it is given as don't care but we cannot use only don't care so left the cell No. 6 as it is failed make any pair or quad with other given cell.]  


f(a,b,c,d)=Σm(0,1,3,8,9,12,13)+Σd(2,6)  =a'b' + ac'


Solution for Product of Sum (POS)

Example 1: Using four literals.
f(a,b,c,d) = p(0,1,6,7,8,9,12,13)


Quad(0,1,8,9) = M0 . M1 . M8 . M9 = (a+b+c+d) . (a+b+c+d') . (a'+b+c+d) . (a'+b+c+d') = b+c
Pair(6,7) = M6 . M7 = (a+b'+c'+d) . (a+b'+c'+d') = a+b'+c'
Quad(8,9,12,13) = M8 . M9 . M12 . M13 = (a'+b+c+d) . (a'+b+c+d') + (a'+b'+c+d) . (a'+b'+c+d') = a' +c
f(a,b,c,d) = ΠM(0,1,6,7,8,9,12,13) =Π(b+c)+(a+b'+c')+(a'+c)



Convert Boolean expression to Canonical form using Boolean Laws


Sum of Products

F(A,B,C) = A + B'C

= A.1 + B'C.1

= A(B+B') + B'C(A+A')

=AB + AB' + AB'C + A'B'C

=AB.1 + AB'.1+AB'C + A'B'C

=AB(C+C')+AB'(C+C')+AB'C+A'B'C

=ABC + ABC' + AB'C + AB'C' + AB'C +A'B'C

=A'B'C+ AB'C' +AB'C+ABC' + ABC                (REMOVE THE DUPLICATE ENTRIES)

f(A,B,C) = m(1,4,5,6,7)


Using Truth Table


A

B

C

B'

B'C

A+B'C


0

0

0

1

0

0


0

0

1

1

1

0
A'BC'

0

1

0

0

0

1



0

1

1

0

1

1

A'BC

1

0

0

1

0

0


1

0

1

1

0

1

AB'C

1

1

0

0

1

1

ABC'

1

1

1

0

1

1

ABC

Sum of Products


F(A,B,C)=(A+ B)( B + C)

= (A + B+0).(0+B+C) (X+0 = X)

= (A + B + C.C').(AA'+B+C) (0 = XX')

=(A + B+ C)( A+B+C')(A+B+C)(A'+B+C)              (REMOVE THE DUPLICATE ENTRIES)

= (A + B+ C)( A+B+C')(A'+B+C)

F(A,B,C) = m(0,1,4)


Using Truth Table



A

B

C

A+B

B+C

(A+ B)( B + C)


0

0

0

0

0

0

ABC

0

0

1

0

1

0

ABC'

0

1

0

1

1

1


0

1

1

1

1

1


1

0

0

1

0

0

A'BC

1

0

1

1

1

1


1

1

0

1

1

1


1

1

1

1

1

1




Definitely coming back within forthright with  using Quine-McCluskey Method (Tabulation Method)


!!!Hope going to have a nice time with Saraswati Puja, till then Bye!!!

Thursday, December 23, 2010

Boolean Algebra - Canonical Form


A literal is a variable or a complemented variable in Boolean algebra. A fundamental product or fundamental sum is a literal of a product or sum of two or more literals in which no two literals involve in the same variable. With the help of fundamental product or fundamental sum representing any Boolean known as Canonical form.

In a Boolean algebra, a Boolean function that is composed of standard logical operators can be expressed in a canonical form using the dual concepts of a minterms and maxterms.
In Boolean algebra, any Boolean function can be expressed in a canonical form using the dual concepts of minterms and maxterms. All logical functions are expressible in canonical form, both as a "sum of minterms" and as a "product of maxterms". This allows for greater analysis into the simplification of these functions, which is of great importance in the minimization of digital circuits.
A Boolean function expressed as a (OR) of minterms is commonly known as a "sum of products" or "SoP". Thus it is a disjunctive normal form in which only minterms are allowed as summands. Its De Morgan dual is a "product of sums" or "PoS" , which is a function expressed as a (AND) of maxterms.

Canonical and Standard forms 

Boolean functions are commonly expressed using the following forms:
  • Canonical forms:
    • Sum of minterms
    • Product of maxterms
  • Standard forms:
    • Sum of products
    • Product of sums
Represented as a sum of minterms only : f = Σ(minterms)
Represented as a product of maxterms only : f= π(maxterms)

Mineterm : A minterm is a special product of literals, in which each input variable appears exactly once. A sum of minterms corresponding to the input combination of the truth table for which the function produces a “1” output.

Maxterm : A maxterm is a sum of literals, in which each input variable appears exactly once. A product of maxterms corresponding to the input combination of the truth table for which the function produces a “0” output.

Karnaugh Map is developed by Maurice Karnaugh, an electrical engineer at Bell Labs, USA. Karnaugh Map is a Row and Column representation of a Boolean expression to reduce a term.

Pair: A pair is a group of two’s may be horizontally, vertically adjacent or end-to-end in the same row or column. The end-to-end 1’s are obtained by rolling a map.

Quad: A quad is a group of four's may be horizontally, vertically adjacent or end-to-end in the same row or column. The end-to-end 1’s are obtained by rolling a map.

Octet : A octet is a group of eight’s may be horizontally, vertically adjacent or end-to-end in the same row or column.

Overlapping Groups : If two or more groups use the same 1’s, such groups are called overlapping groups.

Redundant Groups : A redundant group whose 1’s are already used by other groups.

Rules for grouping :
  1. Groups only contain only 1’s for SOP and 0's for POS.
  2. No diagonals.
  3. Only power of 2 number of cells in each group.
  4. Groups should be as large as possible.
  5. Every one must be in at least one group.
  6. Groups can overlap.
  7. Wrap around allowed.
  8. Fewest number of groups possible.
  9. Use don’t care conditions when you can and if given but group cannot made out of only don’t care conditions.

Truth Table for three literals
x y z minterms (SoP) maxterm(PoS)
0 0 0 x'y'z' xyz
0 0 1 x'y'z xyz'
0 1 0 x'yz' xy'z
0 1 1 x'yz xy'z'
1 0 0 xy'z' x'yz
1 0 1 xy'z x'yz'
1 1 0 xyz' x'y'z
Rules : How to group in Karnaugh Map

Two literals Karnaugh Map


Three literals Karnaugh Map


Four literals Karnaugh Map



Grouping Rules (Two Literals)


Grouping Rules (Three Literals)


Grouping Rules    &

               Map Rolling

Grouping Rules

Next time I will give some solved problems for minterms and maxterms. Also for my engineering student I will give some tips for solving the same with Quine & Mclusky methods also known as Tabulation Methods.


!!!Wish you enjoying your winter with a support of a few extra warm clothes, A Merry X'Mas and wish a Wonderful New year.!!!

Thursday, December 9, 2010

Boolean Algebra and Propositional Logic


The reason of Boolean algebra is to simplify the design of a digital circuit  that designed to performs a function, this helped to minimize the number of gates or to minimize the time of the function.

We already discussed the Booleans laws and some theorems for this purpose, I will give some examples.

Simplification (Using Boolean Laws)

Example 1 Example 2 Example 3


X.Y + X.Z + X.Y.Z
=XY +XYZ + XZ
=XY(1+Z) +XZ
=XY + X
=X(Y+Z)



[1+Z=1]


X.Y(X.Y+YZ)
= (XY). (XY) + (XY).(YZ)
 = XY + XYZ
= XY(1+Z)
= XY.1
= XY


[Distributive Law]
[ X.X = X]
[ 1 + X = 1]

= X’YZ + XY’Z’ + XY’Z
+ XYZ' +XYZ
= X’YZ + XY’ + XY
= X’YZ + X
= X + YZ

[xy’ + xy = x]






Proof (Using Boolean Laws)

Example 1
Example 2

Example 3

.XY + YZ + Y'Z = XY + Z
=XY + YZ + Y'Z
= XY +
Z(Y + Y')
= XY + 1.Z
= XY + Z

[ AB +AC = A(B+C)]
[ A + A' = 1]
 [ 1.A = A]

(X+Y)(X+Z) = X + YZ
=XX + XZ + XY + YZ
=X+XZ+XY+YZ
=X.1 + XY + XZ + YZ
=X(1+Y) + XZ + YZ
=X + XZ + YZ
=X(1+Z) + YZ
=X+YZ


[A.(B+C)=AB + AC]
[A.A = 1]
[X.1 = X]
[1 + A = 1]

[1 + A = 1]

(X+Y)(Y+Z)(X+Z)=XY+XZ+YZ
(XY + XZ + YY + YZ) (X+Z)
(XY + XZ + Y (1 + Z)(X + Z)
(XY + XZ + Y)(X + Z)
XXY + XYZ + XXZ + XZZ + XY + YZ
XY(1 + Z) + XZ + XZ + XY + YZ
XY + XZ + YZ


[A(B+C) = AB + AC]
[ 1 + A = 1]

[ A. A = A]
[ A. A = A]
[ 1 + A = 1]


Proof (Using Boolean Laws)

XY + YZ + Y'Z = XY + Z (X+Y)(X+Z) = X + YZ
X Y Z Y' XY YZ Y'Z XY+YZ+Y'Z XY+Z X Y Z X+Y X+Z YZ (X+Y)(X+Z) X+YZ
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 1 0 0 1 1 1 0 0 1 0 1 0 0 0
0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0
0 1 1 0 0 1 0 1 1 0 1 1 1 1 1 1 1
1 0 0 1 0 0 0 0 0 1 0 0 1 1 0 1 1
1 0 1 1 0 0 1 1 1 1 0 1 1 1 0 1 1
1 1 0 0 1 0 0 1 1 1 1 0 1 1 0 1 1
1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1


Propositional Logic

Propositional Logic are concerned with propositional (or sentential) operators which may be applied to one or more propositions giving new propositions. Propositional logic is a propositional logic whose interpretation limits the truth values of its propositions to two, usually true and false that denoted by 1 and 0.

1. NOT Operation (Inverter)

2. OR Operation (Disjunction)

3. AND Operation (Conjunction)
~p ≡ "Today is not Sunday" Today is Sunday Or a Holiday (p ۷ q)  Today is Sunday and a Holiday (p ۸ q)
Truth Table Truth Table Truth Table

p
~p p q p + q p q p . q

T
F T T T T T T
F T T F T T F F
F T T F T F
F F F F F F

4. IF - THEN (Conditional) Operation 4. IF AND ONLY IF (Bi-conditional) Operation

“If today is Sunday, then today is my Birthday”

“If and only if today is Sunday, then today is my Birthday”
p If today is Sunday
q then today is my Birthday  If p THEN q
p → q
p If and only if today is Sunday
q then today is my Birthday  If  and only if p THEN q
  p ↔ q

Therefore p → q ≡ p' + q Therefore p ↔ q ≡ p . q + p' . q'
p p' q p→q [ p' + q ] p p' q q' p . q p' . q' p . q + p' . q'
T F T T T F T F T F T
T F F F T F F T F T F
F T T T F T T F F T F
F T F T F T F T F T T

Tautology is a statement that is always true p ۷ ~q will always be True (Negation Law)

Contradiction is a statement that is always false p ۸ ~p will always be False (Negation Law)


A logical equivalence means that the two sides always
have the same truth values p q and ~q ~p  is Logically equivalence
p p ۷ ~q p ۸ ~p p q p q
T T F F F T
F T F T T
T T F
T T T

Inversion: "If something is not a bird, then it is not an animal." Unlike the contrapositive, the inversion's truth value is not dependent upon whether the original proposition is true, as evidenced here. The inverse, here, is clearly not true.

Conversion: "If something is an animal, then it is a bird." The conversion is actually the contrapositive of the inversion and always has the same truth value as the inversion, which is not necessarily the same as that of the original proposition.

Contradiction: "There exists a bird that is not an animal. " If the contradiction is true, then the original proposition and, by extension, the contrapositive are untrue. Here, of course, the contradiction is untrue.

!!!Coming back with Maurice Karnaugh, I mean more with Boolean
Algebra and Karnaugh Map!!!