1 / 63

Lecture 3

Lecture 3. 3. Boolean operations –fundamentals 3.1 Basic logic functions 3.2 Further logic operations 3.3 Establishing switching functions 3.4 Simplification of logic functions 3.5 Karnaugh-Veitch diagram. 3.1 Basic logic functions.

dherrera
Télécharger la présentation

Lecture 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 3 3.Boolean operations –fundamentals 3.1 Basic logic functions 3.2 Further logic operations 3.3 Establishing switching functions 3.4 Simplification of logic functions 3.5 Karnaugh-Veitch diagram

  2. 3.1 Basic logic functions • As described in the previous, any computer and equally any PLC operates using the number system to the base 2. • This also applies to the octal (2 powered by 3) and the hexadecimal systems (2 powered by 4). • The individual variable can therefore assume only two values, „0" or "1". • Special algorithms have been introduced to be able to link these variables - the so-called boolean algebra. • This can be clearly represented by means of electrical contacts.

  3. Basic logic functions – 2Negation (NOT function) Situation

  4. Basic logic functions – 3 Negation (NOT function) Description of the function The push button shown represents normally closed contact (NCC). When this is unactuated, lamp H1 is illuminated, whereas in the actuated state, lamp H1 goes off. Push button S1 acts as signal input (I), the lamp H1 forms the output (O). The actual status can be recorded in a truth table.

  5. Basic logic functions – 4 Negation (NOT function) Block diagram (of the system) • Push button S1 acts as signal input, the lamp H1 forms the output. S1 H1 I O

  6. Basic logic functions - 5 Negation (NOT function) Truth table Example Generally The boolean equation is therefore as follows: _ O = I (read: O equals Not I ) S1 H1 0 1 1 0

  7. Basic logic functions – 6 Negation (NOT function) Logic symbol I O

  8. Basic logic functions - 7 Negation (NOT function) • If two negations are switched in succession, then these cancel one another I1 O1=neg.I1=I2 O2=neg.I2=neg.neg.I1=I1

  9. Basic logic functions - 8 Conjunction (AND function) Situation See the overview ( snap No.67)

  10. Basic logic functions - 9 Conjunction (AND function) Description of the function If two normally open contacts (NOC) S1 and S2 are switched in series, the actuated lamp H1 is illuminated only if both push buttons are actuated.

  11. Basic logic functions - 10 Conjunction (AND function) Block diagram (of the system) S1 H1 S2

  12. Basic logic functions – 11 Conjunction (AND function) Truth table example generally S1 S2 H1 I1 I2 O 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 1 1 1 1 1

  13. Basic logic functions - 12 Conjunction (AND function) Logic symbol I1 O & I2

  14. Basic logic functions - 13 Conjunction (AND function) Important equations a . 0 = 0 a . 1 = a a . Na =0 a . a = a

  15. Basic logic functions - 14 Disjunction (OR function) Situation See the overview ( snap No.67)

  16. Basic logic functions - 15 Disjunction (OR function) Description of the function If the 2 normally open contacts(NOC) S1 and S2 are switched in parallel, then the lamp H1 is illuminated whenever at least one push button is pressed.

  17. Basic logic functions - 16 Disjunction (OR function) Block diagram (of the system) S1 H1 S2

  18. Basic logic functions - 17 Disjunction (OR function) Truth table example generally S1 S2 H1 I1 I2 O 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1

  19. Basic logic functions - 18 Disjunction (OR function) Logic symbol I1 O >=1 I2

  20. Basic logic functions – 19 Disjunction (OR function) Important equations a+ 0 = a a+ 1 = 1 a+ a = a a+ Na = 1

  21. 3.2 Further logic operationsvarious realisations The electrical realisation of a NOT -/AND-/OR-operation has already been described in previous. Each of these operations can of course also be realised pneumatically or electronically. Boolean algebra also recognises the following logic operations. The following tables provide an overview of these.

  22. Further logic operations various realisations -2

  23. Further logic operations various realisations -3

  24. 3.3 Establishing switching functions Deriving boolean equations from the truth table Often, the basic logic operations shown in the previous section are not enough to adequately describe a function in control technology.Very often, there is a combination of different logic operations. The logic connection in the form of a boolean equation can be easily established from the truth table.The example below should clarify this:

  25. Establishing switching functions-2 Example: Sorting station task Various parts for built-in kitchens are to be machined in a production system (milling and drilling machine). The wall and door sections for certain types of kitchen are to be provided with different drill holes. Sen- sors B1 to B4 are intended for the detection of the holes.

  26. Establishing switching functions-3 Situation

  27. Establishing switching functions-4 • Parts with the following hole patterns are for the 'Standard' kitchen type. These parts are to be advanced via the double-acting cylinder 1.0. • Technological process Logical variable B1 a B2 b B3 c B4 d ----------------------------------------------------------------- 1.0 y

  28. Establishing switching functions-5 • Assuming that a drilled hole is read as a 1-signal, the following truth table results. a c b d

  29. Establishing switching functions-6 • Two options (Standard form disjunctive and Standard form conjunctive)are available in order to derive the logic equation from this table, which lead to two different expressions. • The same result is obtained, of course, since the same circumstances are described.

  30. Establishing switching functions-7 • Standard form, disjunctive In the disjunctive standard form, all conjunctions (AND-operations) of input variables with the result 1, are carried out as a disjunctive operation (OR-operation). With signal status 0, the input variable is carried out as a negated one and with signal status 1 as a non-negated one. disjunction of minterms

  31. Establishing switching functions-8 • In the case of the example given, the logic function is therefore as follows: y=a.b.c.d+a.b.Nc.d+a.Nb.c.d+a.Nb.Nc.d+ +Na.b.Nc.d+Na.Nb.Nc.d Negated variable x (complement of x)…………………………Nx non-negated variable x ………………..…x

  32. Establishing switching functions-9 Standard form, conjunctive Inthe conjunctive standard form, all disjunctions (OR-operations) of the input variable producing the result 0, are carried out as a conjunctive operation (AND-operation). In contrast with the disjunctive standard form, in this instance, the input variable is negated with signal status "1" and a non-negated operation carried out with signal status „0".conjunction of maxterms

  33. Establishing switching functions-10 logic function is therefore as follows: y=(a+b+c+d). (a+b+Nc+d). (a+b+Nc+Nd). (a+Nb+c+d). (a+Nb+Nc+d). (a+Nb+Nc+Nd). (Na+b+c+d). (Na+b+Nc+d). (Na+Nb+c+d). (Na+Nb+Nc+d).

  34. 3.4 Simplification of logic functions • Both equations for the example given are rather extensive • Standard form disjunctive – more clear, shorter • Standard form conjunctive – here very long • Criteria for using the disjunctive form or conjunctive form: the decision is made in favour of the shorter form of the equation • In this case disjunctive form is better (shorter)

  35. Simplification methods • The aim of the simplification is to shorten the total number of the literals (variables in true form …a, b,.. or variables in complemented form …Na, Nb….) and total number of logical operators (OR,AND,…) in the logical equation • Two methods are usually used: • Boolean algebra • Karnaugh map (application of Boolean algebra rules in a special way)

  36. Postulates of Boolean algebra Definition: A set B of elements (a,b,c, ….) with an equivalence relation (denoted =), two binary operations, one of them denoted by +(disjunction) and the other denoted by .(conjunction) and a unary operation, complementation (denoted by ‘ or N) is a Boolean algebra if and only if the following postulates are satisfied:

  37. Postulates of Boolean algebra-2 • P1 Associativity: The + and . operations are associative (a+b)+c=a+(b+c)=a+b+c (a.b).c=a.(b.c)=a.b.c • P2 Commutativity: The + and . operations are associative a+b=b+a a.b=b.a

  38. Postulates of Boolean algebra -3 • P3 Distributivity: The two operations are distributive over each other a+b.c=(a+b).(a+c) a.(b+c)=a.b+a.c

  39. Postulates of Boolean algebra-4 • P4 Identity elements: There exists an identity element (denoted by 0, called zero) for the + operation and another (denoted by 1 and called one ore unity) for the .operation within B such that a+0=a a.1=a

  40. Postulates of Boolean algebra-5 • P5 Complement Each member of B has a complement within B such that if a’ (Na) is the complement of a, then a+Na=1 a.Na=0

  41. Postulates of Boolean algebra-6 It should be noted that 0 and 1, which denote two identity elements of the Boolean algebra, should not be misinterpreted as the numbers 0 and 1 of the ordinary algebra. It should also be mentioned here that as in ordinary algebra, so also in a Boolean algebra, the . operation is performed before the + operation! (priority) Thus a+b.c=a+(b.c)=/ (a+b).c

  42. Fundamental theorems of Boolean algebra-1 • T1 Closure of Identity Elements For all a e B a+1=1 a.0=0 • T2 Equality Theorem For all a,b,c e B if a+b=a+c and a.b=a.c, then b=c

  43. Fundamental theorems of Boolean algebra-2 • T3 Complementarity Theorem For all a,b e B if a+b=1 and a.b=0, then a=Nb and b=Na T4 The identityelements 0 and 1 are complements of each other 0=N1 and 1=N0

  44. Uniqueness properties of Boolean algebra • T5 The identity elements 0 and 1 are unique. • T6 The complement of an element is uniqueBounds of Boolean algebra

  45. Laws of Boolean algebra-1 • T7 the law of involution For all a e B, N(Na)=a • T8 the law of idempotence For all a e B, a+a=a and a.a=a • T9 the law of absorption For all a,b a+a.b=a and a(a+b)=a

  46. Laws of Boolean algebra-2 • T10 DeMorgan’s theorem N(a+b)=Na.Nb N(a.b)=Na+Nb • T11 Bounds of Boolean algebra Identity elements 0 and 1 constitute the lower and upper bouds respectivelly for all the elements of a Boolean algebra.

  47. Laws of Boolean algebra-3 • T12 Duality in Boolean algebra Every theorem in Boolean algebra has its dual, which is also true. Notice, that all five postulates that form the basis of Boolean algebra is presented in a pair of equations. An important property exhibited by the pairs is that oneelement of a pair can be obtained from the other by interchanging the + and . Operations and the identity elements 0 and 1.This property is known as the principle of duality and one of the pair of equations is called the dual of the other.

  48. Two-valued Boolean algebra • There are also for example eight-valued and four-valued Boolean algebra. In industrial control, PLCs and PCs we usually use two-valued , so called switching algebra

  49. Simplification using Boolean algebra (previous example)-1 y=Na.Nb.Nc.d+Na.b.Nc.d+a.Nb.Nc.d+a.Nb.c.d+ +a.b.Nc.d+ a.b.c.d= =Na.Nb.Nc.d+Na.b.Nc.d+a.Nb.Nc.d+a.Nb.c.d+ +a.b.d.(Nc+ c)= =Na.Nb.Nc.d+Na.b.Nc.d+a.Nb.Nc.d+a.Nb.c.d+ +a.b.d= Na.Nc.d(Nb+b)+a.Nb.d(Nc+c)+ a.b.d= = Na.Nc.d+a.Nb.d+ a.b.d=

  50. Simplification using Boolean algebra (previous example)-2 = Na.Nc.d+ a.Nb.d+ a.b.d= = Na.Nc.d+ a.d(Nb+ b) = = Na.Nc.d+ a.d = =d.(Na.Nc+a)= /absorption of negation/ =d(Nc+a)= = Nc.d+a.d

More Related