1 / 19

Discrete Structures Lecture 17 Applications of Propositional Logic Combinational Digital Logic

Discrete Structures Lecture 17 Applications of Propositional Logic Combinational Digital Logic. Digital Circuits. Inputs and Outputs are true and false . Low Voltage/Off = false High Voltage/On = true

Download Presentation

Discrete Structures Lecture 17 Applications of Propositional Logic Combinational Digital Logic

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. Discrete Structures Lecture 17 Applications of Propositional Logic Combinational Digital Logic

  2. Digital Circuits Inputs and Outputs are true and false. Low Voltage/Off = false High Voltage/On = true Data and programs all represented by sequences of bits 1 (true) and 0 (false).

  3. Combinational Digital Circuits • The output is determined by the current values of the inputs. • The output is not history sensitive, i.e. it doesn’t matter what previous inputs or outputs were. • Examples of computer components using combinational digital circuits: ALU (Arithmetic Logical Unit) memory addressing circuits

  4. Circuit Diagramsshow gates and their interconnections. and-gate (conjunction) z  a1 a2 ….  an or-gate (disjunction) z  a1V a2V …. V an inverter (negation) z  ¬a

  5. Contructing Boolean Expressions from Circuits • Assign labels to each wire in the diagram. • Construct an expression according to the wires and the logic gates. • Remove the internal names (using substitution, (3.84)) • Construct a truth table for expression to determine behavior of the circuit. (The behavior of a circuit is a list of inputs and the associated outputs).

  6. Example (problem 5.10 (i) ) a  z b (a) Write a boolean expression for the above circuit: ( a  b)  (z  ¬) (b) Remove internal names z  ¬(a  b) (c) Construct a truth table

  7. Truth Table (b) z  ¬(a  b) construct a truth table (c)a b a  b z T T T F F T F F T F F F F T T T

  8. Example 2: Problem 5.10 (ii) a  (a) Construct Boolean Expression: ( a  b)  ( b V c)  (z ) (b) Remove internal names: z  (a  b)  (b V c) (c) Construct a truth table z b  c

  9. Example 2: Truth table (b) z  (a  b)  (b V c) construct a truth table (c)a b c a  b b V c z T T T T T F T F T T F F F T T F T F F F T F F F T T F F F F F F T T T F T T T F T T F F F F F F

  10. Construct a circuit from a logical expression Divide expression into subexpressions that use logical operators, AND, OR and NOT. Repeat 1 until each subexpression uses only a single operator. 3. Build the circuit using the appropriate gates, starting with the smallest subexpressions and working outward to the larger expressions.

  11. Example 1: Problem 5.15(a) Draw a circuit for each expression, where a, b, and c are the inputs and z is the output. Use only inverters, 2-input-and (2-and) gates, and 2-input-or (2-or) gates. z  a  b  c

  12. a b z c 5.15 (a) (a) z  a  b  c

  13. Example 2: Problem 5.15(d) Draw a circuit for each expression, where a, b, and c are the inputs and z and s the outputs. Use only inverters, 2-and gates, and 2-or gates. (d)(z  a  ¬b)  (s  a  b)

  14. a s z b 5.15 (d) (d)(z  a  ¬b)  (s  a  b)

  15. Specification to Implementation • A Boolean expression, C, can be a specification of a combinational circuit, C. The circuit implements the specification,S. (5.8) Circuit C implements specification S exactly when C  S is valid. NOTE: C and C are equivalent.

  16. Specification for the Half-Adder (5.10) HA(a,b,s,c): s = (a  b)  c = (a  b) a 1 1 0 0 + b + 1 + 0 + 1 + 0 c s a b c s T T T F F T F F 1 0 0 1 0 1 0 0 T F F T F T F F

  17. Half-Adder HA(a,b,s,c)

  18. Half-Adder HA(a,b,s,c) a b c a a   b b s b   a

  19. Prove HA circuit implements the specification HA = <(5.5) is HA > c = (a  b)  = ¬b  = (a )   = ¬a  = (b )  s = ( V ) = <(3.84a) Substitution--for  and  > c = (a  b)  = ¬b  = (a  ¬b)  = ¬a  = (b  ¬a)  s = ( V ) <(3.76b)Weakening - lose  and  > c = (a  b)  = (a  ¬b)  = (b  ¬a)  s = ( V ) = <(3.84a) Substitution--for  and  > c = (a  b)  = (a  ¬b)  = (b  ¬a)  s = ((a  ¬b) V (b  ¬a)) <(3.76b)Weakening - lose  and  > c = (a  b)  s = ((a  ¬b) V (b  ¬a)) = <(3.53) Exclusive OR > c = (a  b)  s = (a  b)

More Related