1 / 25

Logic Gates And Boolean Algebra

Logic Gates And Boolean Algebra. This Presentation will cover: Truth Tables: -AND & NAND Gates -OR & NOR Gates -NOT & XOR Gates Logic Gate Diagrams De Morgan’s laws. Logic Gates- AND.

madge
Télécharger la présentation

Logic Gates And Boolean Algebra

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. Logic Gates And Boolean Algebra

  2. This Presentation will cover: • Truth Tables: • -AND & NAND Gates • -OR & NOR Gates • -NOT & XOR Gates • Logic Gate Diagrams • De Morgan’s laws

  3. Logic Gates- AND A logic gate has 2 inputs which outputs either ON or OFF (1 or 0). If an off value is in one of the input values for an AND gate, the output will remain off. So an output of 1 can come from an AND gate only if both inputs are on or ‘1’. Output Q = A AND B. This can also be written Q = A.B (the dot operator in Boolean Algebra means ‘AND’).

  4. Logic Gates- AND A Q AND Gate B 0 0 0 1 1

  5. Logic Gates- AND A Logic Gate: A.B Truth Table: B A B Series Circuit: A.B In the switch analogy above, the lamp will only come on if both switches are closed (or 1); if either is open (or 0) then the lamp stays off.

  6. Logic Gates- OR Like the AND gate, the outputs of an OR gate can be displayed in the same way in a truth table. So only one zero output can come from an OR gate – when both inputs are off or ‘0’. All other combinations of inputs will produce an output of ‘1’.

  7. 0 0 1 0 1 1 0 Logic Gates- OR continued OR Gate So an output of 1 can come from an OR gate if either or both inputs are on or ‘1’. Output Q = A OR B. This can also be written Q = A+B (the ‘+’ operator in Boolean Algebra means ‘OR’).

  8. Logic Gates- OR continued A Logic Gate: A+B Truth Table: B A Parallel Circuit: B A+B In the switch analogy above, the lamp will come on if either or both switches are closed (or 1); if both are open (or 0) then the lamp stays off.

  9. Logic Gates- NOT In a NOT gate, there is only one input – either 1 or 0. The NOT function inverts the input (ie it will flip the value – a ‘0’ becomes a ‘1’, a ‘1’ becomes a ‘0’. The Boolean equation for this is: Q = NOT X. This is also written as Q = X

  10. Logic Gates- NOT NOT Gate 0 1

  11. Logic Gates- NAND NAND Gate Notice the little circle on the end The NAND function is a Boolean function which is simply a combination of the AND function and the NOT function. NOT AND is abbreviated to NAND. The NAND of two variables A and B is represented in Boolean Algebra as A.B, the inversion of A.B. Q = A.B

  12. Logic Gates- NOR The NOR function is a Boolean function which is simply a combination of the OR function and the NOT function. NOT OR is abbreviated to NOR. The NOR of two variables A and B is represented in Boolean Algebra as A+B, the inversion of A+B. Q = A+B Notice the little circle on the end! NOR Gate

  13. Logic Gates- XOR (EX-OR) XOR gates are represented with an OR gate that has an extra curved line before it. If both inputs are the same, then the value of the Output is 0, otherwise if just one, and only one, of the inputs is 1 in an XOR Gate, then the output will be 1 or on. Q = A  B

  14. Logic Gates- the 6 types Q = A Q = A.B Q = A.B Q = A+B Q = A + B Q = A+B

  15. Combinations of logic gates A B C Q=A.B+ B.C Q = A.B Q=A.B+ B.C Q = B.C Q = B Construct the diagram (A.B)+(C.B).

  16. Combinations of logic gates - continued A B C A.B (A.B)+(C+B) (A.B)+(C+B) B C+B Construct the diagram (A.B)+(C+B).

  17. De Morgan’s Laws continued De Morgan’s laws enable Boolean expressions to be converted to forms requiring only the OR and NOT functions or only the AND and NOT functions. This means that any Boolean expression may be implemented using only OR and NOT gates (NOR gates) or using only AND gates and NOT gates (NAND gates). NAND and NOR gates may be used as NOT gates by connecting all the gate inputs together. Therefore NOR gates alone or NAND gates alone can implement any Boolean function. In general, De Morgan’s laws may be written as follows: A1 + A2 + A3 + … + An = A1. A2. A3. … . An A1.A2.A3. … .An = A1 + A2 + A3 + … + An Where any finite number n of Boolean values may be included.

  18. De Morgan’s Laws continued • In their simplest form De Morgan’s laws can be expressed as follows: • A + B = A.B • A.B = A + B • The laws are easily remembered as EVERYTHING associated with an expression must be changed: • The logical connectives must be changed: AND to OR, and OR to AND. • The logical state of each variable must be changed: A to A, A to A • The logical stage of the complete expression must be changed: expression to expression, expression to expression.

  19. De Morgan’s Laws continued A.A = A A.A = 0 1 + A = 1 0 + A = A A + A = A A + A = 1 0.A = 0 1.A = A The following identities apply for the Boolean variable A:

  20. De Morgan’s Laws continued The following identities apply for the Boolean variables A, B and C: A + AB = A(1 + B) = A.1 = A A.(A + B) = A.A + A.B = A.(1 + B) = A.1 = A A.B = B.A A + B = B + A (A + B) + C = A + (B + C)

  21. De Morgan’s Laws continued – Worked Example 1 A+B= A .B = A.B The Boolean Expression for a NAND Gate A.B= A+ B = A+B The Boolean Expression for a NOR Gate De Morgan’s laws enable A + B and A.B to be implemented with a single logic gate using the inputs A and B rather than A and B.

  22. De Morgan’s Laws continued – Worked Example 2 The table below shows a truth table for output Q in terms of inputs A and B. Work out a Boolean expression which would produce these results. Select the rows of the table where Q=1 (rows 2 and 3). Using the values for row 2, A.B makes 1 (A=0 and B=1). Using the values for row 3, A.B makes 1 (A=1 and B=0). Therefore, the Boolean expression is Q = A.B + A.B

  23. De Morgan’s Laws continued – Worked Example 3 Create the truth table for: Q = (A + B).(A + B) Begin by simplifying – multiply out the brackets: Q = A.A + A.B +B.A + B.B Q = A.B + B.A (since A.A = B.B = 0) So, Q = 1 when A.B = 1 or B.A = 1 ie when A=B=0 and A=B=1

  24. Summary In this chapter you’ve covered: • Truth Tables for the following functions/gates: • -AND & NAND Gates • -OR & NOR Gates • -NOT & XOR Gates • Logic Gate Diagrams • De Morgan’s Laws to simplify any Boolean Expression

  25. Examiner’s Tip To simplify a logical expression, first compile its truth table. Next, write down input combinations that make the output 1. Use De Morgan’s laws to produce a solution in NAND or NOR gates.

More Related