material prepared by: MUKESH OHR Follow me on F : http://www.facebook.com/mukesh.sirji4u OOLEN LGER oolean lgebra is a set of rules, laws and theorems by which logical operations can be mathematically expressed. This algebra was first introduced by George oole, an English mathematician. oolean algebra deals with boolean variables (characters allowed -Z, a-z), the operators. (ND), + (OR), and (NOT) and the symbols ( ) and =. asic Theorems/Properties of oolean lgebra Theorem/Law/xioms Over (.) Over (+). Properties of x. = x+ = x 2. Properties of x. = x x+ = 3. Indempotence Law (Identity Law) x.x = x x+x = x 4. Complementarity Law x.x = x+x = 5. Commutative Law x.y = y.x x+y = y+x 6. ssociative Law x.(y.z) = (x.y).z x+(y+z) = (x+y)+z 7. Distributive Law x+(y.z) = (x+y).(x+z) x.(y+z) = xy+xz 8. bsorption Law (Redundance Law) x(x+y) = x x+xy = x 9. De-Morgan s Law (x.y)' = x +y (x+y) = x.y. Involution Law (Negation Law) (x ) = x Principle of Duality: It states that starting with a boolean relation; another boolean relation can be derived by: ) Changing each OR (+) sign to an ND (.) sign. 2) Changing each ND (.) to an OR (+) sign. 3) Replacing each by & vice-versa. e.g. The Dual of an expression x+xy = x is x.(x+y) = x Tautology If the result of a boolean expression is always TRUE or, it is called a tautology. e.g. x + is a tautology. Fallacy If the result of a boolean expression is always FLSE or, it is called Fallacy. e.g. x. is a fallacy. ----------------------------------------------------------------------------------------------------------------------------- Page
LOGIC GTES Logic gates are small electronic circuits that work on digital signals. asically logic gates are of two types: asic Gates ND gate OR gate NOT gate SIC GTES: Derived Gates NND gate NOR gate X-OR gate X-NOR gate. ND gate Operation : logical multiplication Symbol :. or ^ Graphical symbol : i/p lines Y=. Truth Table: INPUT OUTPUT Y=. It is concluded from the above truth table that; the output of an ND gate is TRUE (i.e. ) only when both the inputs are TRUE, and in all other cases it is always FLSE. 2. OR gate Operation : logical addition Symbol : + or v Graphical symbol : i/p lines Y = + Page 2
Truth Table: INPUT OUTPUT Y= + It is concluded from the above truth table that; the output of an OR gate is FLSE (i.e. ) only when both the inputs are FLSE, and in all other cases it is always TRUE. 3. NOT gate ( Inverter) Operation : Compliment Symbol : or Graphical symbol : i/p line Y = (or ) Truth Table: Input output Y = It is concluded from the above truth table that; the NOT gate simply inverts the input. DERIVED GTES: ( obtained by combining two or more basic gates). NND gate: [compliment of ND gate] It is obtained by complimenting the output of ND gate.. Y =. Page 3
Graphical symbol: i/p lines Y=. Truth Table: INPUT OUTPUT. Y=. It is concluded from the above truth table that; the output of an NND gate is FLSE (i.e. ) only when both the inputs are TRUE, and in all other cases it is always TRUE. 2. NOR gate: [compliment of OR gate] It is obtained by complimenting the output of OR gate. + Y = + Graphical symbol: i/p lines Y = + INPUT OUTPUT + Y= + It is concluded from the above truth table that; the output of an NOR gate is TRUE (i.e. ) only when both the inputs are FLSE, and in all other cases it is always FLSE. Page 4
3. X-OR gate: It is a special case in OR gate. It is obtained as: i/p Y= + o/p Graphical symbol: i/p lines Y = + = + Truth Table: INPUT OUTPUT Y = + = + It is concluded from the above truth table that; the output of an X-OR gate is FLSE (i.e. ) when both the inputs are SME, and in all other cases it is always TRUE. Page 5
4. X-NOR gate: It is obtained by complementing the output of X-OR gate. i/p + Y=. o/p Graphical symbol: i/p lines Y =. = + Truth Table: INPUT OUTPUT + Y =. = + It is concluded from the above truth table that; the output of an X-NOR gate is TRUE (i.e. ) when both the inputs are SME, and in all other cases it is always FLSE. Page 6
Universal gates: [ NND & NOR ] NND and NOR gates are known as universal gates because any other gate / any logic circuit can be constructed using only NND as well as only NOR. i. Construction of basic gates using NND gate: ) NOT gate using NND Y = 2) ND gate using NND. Y =. =. 3) OR gate using NND Y =. = + = + Page 7
ii. Construction of basic gates using NOR gate: ) NOT gate using NOR Y = 2) OR gate using NOR + Y = + = + 3) ND gate using NOR Y = + =. =. ----------------------------------------------------------------------------------------------------- Page 8
Minimizing oolean Expression given boolean expression can be minimized or reduced to a simpler form before implementing it into a circuit. y doing so, we can remove complexities of a circuit to a larger extent. There are two methods of minimizing a boolean expression: lgebraic method [using laws of boolean algebra] Map method [using K-map] K- MP ( Karnaugh Map) K-map is a graphical arrangement of a truth-table in the form of a grid, which provides a simplest & systematic way of minimizing a boolean expression. Key Terms: Literal single variable or its compliment. Gray Code binary code in which each successive number differs only in one place. Canonical Form Standard SOP or Standard POS expressions where all variables/literals are present in each term of the expression. Maxterm SUM term containing sum of all the literals, with or without bar Minterm PRODUCT term containing product of all the literals, with or without bar Points to remember while drawing a K-map: ) In SOP; each minterm is marked as binary in the corresponding cell of the map. In POS; each maxterm is marked as binary in the corresponding cell of the map. 2) While grouping the cells, check firstly for large groups. i.e. check first for a group of 6cells, then 8cells, then 4cells, then 2cells and lastly for cell. t each step don t forget to roll/fold the map. 3) Redundant groups should not be taken. 4) For each group, take the common row-variables and the column-variables and multiply them to get the simplified minterm (or add them to get the simplified maxterm). [In SOP: -complemented; -uncomplemeted] [In POS: -uncomplemented; -complemeted] Repeat the procedure for all the groups. 5) Finally, add all the minterms obtained (or multiply all the maxterms obtained) to get the final minimized expression. Page 9
EXMPLE : Reduce the following oolean Expression using K-map: F(,, C, D) = (,, 2, 4, 5, 6, 8, ) [CSE 2] Solution: No. of variables = 4 Therefore, no of cells in the map= 2 4 = 6 So let s draw the K-map with 6 cells g CD g2 m m m3 m2 m4 m5 m7 m6 m2 m3 m5 m4 m8 m9 m m g3 For group g: it s a quad containing cells (m, m, m4, m5) = i.e C= i.e. C Combining both the literals, we ll get the minterm C Page
For group g2: it s a quad containing cells (m, m2, m4, m6) = i.e D= i.e D D For group g3: it s a quad (obtained on map folding) containing cells (m, m2, m8, m) = i.e D= i.e D D Now, Combining the minterms obtained above; we ll get the reduced boolean exp. as: F(,, C, D) = C + D + D ------------------------------------------------------------------------------------------------------------- EXMPLE 2: Minimize the following oolean Expression using K-map: F (K, L, M, N) = (, 3, 4, 5, 6, 7, 2, 3) Solution: Given expression is in POS form. g2 MN KL g3 g M M4 M M5 M3 M7 M2 M6 M2 M3 M5 M4 M8 M9 M M For g(quad M4M5M2M3) : L + M For g2(quad MM3M5M7) : K + N For g3(quad M4M5M7M6) : K + L Combining the Maxterms, we ll get the required reduced expression, F (K, L, M, N)= (L + M)( K + N )( K + L ) ---------------------------------------------------------------------- Page
Use of oolean operators (ND, OR) in search engine queries oolean logic allows you to combine words and phrases into search statements to retrieve documents from searchable databases. oolean logic consists of three logical operators: OR ND NOT i) OR logic: OR logic is most commonly used to search for synonymous terms or concepts. It allows pages with at least one of the terms. e.g. college OR university retrieves all the unique records containing one term, the other term, or both of them. Search terms Results College 396,482 University 59,79 college OR university 89,24 The more terms or concepts we combine in a search with OR logic, the more results we will retrieve. ii) ND logic: ND logic combined in a search retrieves the records in which OTH of the search terms are present. e.g. poverty ND crime retrieves all the records containing both the words poverty and logic. It must be noted that, it will not retrieve any records with only "poverty" or only "crime" Search terms Results poverty 76,342 crime 348,252 poverty ND crime 2,998 The more terms or concepts we combine in a search with ND logic, the fewer results we will retrieve. Page 2
iii) NOT logic: NOT logic excludes records from your search results. e.g. cats NOT dogs retrieves all the records containing the word cats UT no records are retrieved where the word dogs appears [even the overlapping area where both cats and dogs appear, will not be retrieved]. NOTE: Virtually all general search engines on the Web default to ND logic. In other words, when you type words into a search box and generate your search, oolean ND logic is going on behind the scenes. ------------------------------------------------------------------------------------------------------------- Other ctivities: Practice the following: ) Minimization Problems using K-maps & algebraically also. 2) Realization of a given oolean expression using: ny Logic NND NOR gate(s) gate only gate only 3) To draw out the output from a logic circuit and vice-versa. 4) Writing SOP or POS forms from truth tables. 5) SOP to POS conversion and vice-versa. 6) Proving the laws or a given expression lgebraically Using truth tables. ------------------------------------------------------------------------------------------------------------- Page 3