9. logic gates._rr

7,834 views
7,358 views

Published on

Published in: Technology, Education
2 Comments
12 Likes
Statistics
Notes
No Downloads
Views
Total views
7,834
On SlideShare
0
From Embeds
0
Number of Embeds
16
Actions
Shares
0
Downloads
573
Comments
2
Likes
12
Embeds 0
No embeds

No notes for slide

9. logic gates._rr

  1. 1. Logic Gates
  2. 2. Logic • Formal logic is a branch of mathematics that deals with true and false values instead of numbers. • In 1840’s, George Boole developed many Logic ideas. • A logic gate performs a logical operation on one or more logic inputs and produces a single logic output.
  3. 3. The logic normally performed is Boolean logic and is most commonly found in digital circuits . Logic gates are primarily implemented electronically using diodes or transistors , but can also be constructed using electromagnetic relays ( relay logic ), fluidic logic , pneumatic logic , optics , molecules , or even mechanical elements. In electronic logic, a logic level is represented by a voltage or current, depending on the type of electronic logic in use.
  4. 4. Logic Signals          There are a number of different systems for representing binary information in physical systems.  Here are a few. A voltage signal with zero (0) corresponding to 0 volts and one (1) corresponding to five or three volts. A sinusoidal signal with zero corresponding to some frequency, and one corresponding to some other frequency. A current signal with zero corresponding to 4 milliamps and one corresponding to 20 milliamps. And one last way is to use switches, OPEN for "0" and CLOSED for "1". (And there are more ways!)
  5. 5. Boolean algebra is the algebra of two values. These are usually taken to be 0 and 1, as we shall do here, although F and T, false and true, etc. are also in common use. Whereas elementary algebra is based on numeric operations multiplication xy , addition x + y , and negation − x , Boolean algebra is customarily based on logical counterparts to those operations, namely : (1) conjunction x ∧ y ( AND ) (2) disjunction x ∨ y ( OR ) (3) complement or negation ¬ x ( NOT ). In electronics: AND is represented as a multiplication OR is represented as an addition NOT is represented with an overbar
  6. 6. Basic logic gates <ul><li>Not </li></ul><ul><li>And </li></ul><ul><li>Or </li></ul><ul><li>Nand </li></ul><ul><li>Nor </li></ul><ul><li>Xor </li></ul>
  7. 7. Truth Table A truth table is a good way to show the function of a logic gate. It shows the output states for every possible combination of input states. The symbols 0 (false) and 1 (true) are usually used in truth tables.
  8. 8. A Truth Table: A The output A is true when the input a is NOT true, the output is the inverse of the input: a = NOT A A NOT gate can only have one input. A NOT gate is also called an inverter. NOT a A 0 1 1 0
  9. 9. AND A B A*B Logic Gate: Series Circuit: A B Truth Table: A*B &quot;If A AND B are both 1, then Q should be 1.“ (All or nothing.) A B A*B 0 0 0 0 1 0 1 0 0 1 1 1
  10. 10. Three Input AND Gate A B C ABC 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1
  11. 11. A B A+B Logic Gate: Parallel Circuit: A B Truth Table: A+B OR &quot;If A is 1 OR B is 1 (or both are 1), then Q is 1.&quot; A B A+B 0 0 0 0 1 1 1 0 1 1 1 1
  12. 12. <ul><li>Because + and * are binary operations, they can be cascaded together to OR or AND multiple inputs. </li></ul>A B C A B C A+B+C A+B+C A B A B C ABC ABC
  13. 13. NAND and NOR Gates <ul><li>NAND and NOR gates can greatly simplify circuit diagrams. NAND inverts the output of AND. </li></ul><ul><li>NOR inverts the output of OR. </li></ul>NAND NOR A B A  B 0 0 1 0 1 1 1 0 1 1 1 0 A B A  B 0 0 1 0 1 0 1 0 0 1 1 0
  14. 14. XOR and XNOR Gates XOR XNOR XOR (exclusive OR) :&quot;If either A OR B is 1, but NOT both, Q is 1.&quot; XNOR (exclusive NOR) : invert output of XOR A B A  B 0 0 0 0 1 1 1 0 1 1 1 0 A B A B 0 0 1 0 1 0 1 0 0 1 1 1
  15. 15. <ul><li>Find the output of the following circuit </li></ul><ul><li>Answer: ( x+y )y </li></ul>x + y __ y ( x + y ) y
  16. 16. <ul><li>Find the output of the following circuit </li></ul><ul><li>Answer: xy </li></ul>x y x y x y _ _ ___
  17. 17. Give the Boolean expression of the given circuit x + y xy xy ( x + y )(xy) Answer: ( x + y )(xy)
  18. 18. <ul><li>Write the circuits for the following Boolean algebraic expressions </li></ul><ul><li>x + y </li></ul>__ x x + y
  19. 19. <ul><li>Write the circuits for the following Boolean algebraic expressions </li></ul><ul><li>( x + y ) x </li></ul>_______ x + y x + y ( x + y ) x
  20. 20. More about logic gates <ul><li>To implement a logic gate in hardware, you use a transistor </li></ul><ul><li>Transistors are all enclosed in an “IC”, or integrated circuit </li></ul><ul><li>The current Intel Pentium IV processors have 55 million transistors! </li></ul>
  21. 21. Flip-flops <ul><li>Consider the following circuit: </li></ul><ul><li>What does it do? </li></ul>
  22. 22. <ul><li>A flip-flop holds a single bit of memory </li></ul><ul><li>In reality, flip-flops are a bit more complicated </li></ul><ul><ul><li>Have 5 (or so) logic gates (transistors) per flip-flop </li></ul></ul><ul><li>Consider a 1 Gb memory chip </li></ul><ul><ul><li>1 Gb = 8,589,934,592 bits of memory </li></ul></ul><ul><ul><li>That’s about 43 million transistors! </li></ul></ul><ul><li>In reality, those transistors are split into 9 ICs of about 5 million transistors each </li></ul>If you arrange the gates correctly, they will remember an input value. MEMORY This simple concept is the basis of RAM (random access memory) in computers, and also makes it possible to create a wide variety of other useful circuits. Memory relies on a concept called feedback . That is, the output of a gate is fed back into the input.
  23. 23. Exercises: 1.Give the Boolean expression of the given gate. 3.Draw a logic circuit for AB + AC. 2.Give the Boolean expression of the given gate. Answer: (A + B)C Answer: A + BC + D
  24. 24. Exercises: 4.Draw a logic circuit for (A + B)(C + D) C. 5. Give the truth table for a 3-input (A,B & C) OR gate. 6. What type of logic gate's behavior does this truth table represent? 7.Give the Boolean expression of the given gate.
  25. 25. 8.Give the output expressions of the given gates. Exercises: a . b . c . d . e . f .
  26. 26. Answers to Exercises: 3. AB + AC. 4. (A + B)(C + D)C. 5 . 3-input OR gate ABC 6 . 3-input OR gate 7 .
  27. 27. Answers to Exercises: 8 . a.) (ABC)(DE). b.) (ABC)+(DE). c.) (R+S+T) (X+Y+Z). d.) (R+S+T)+(X+Y+Z). e.) (JK)(M + N). f.) (AB) (M + N) (X + Y).
  28. 28. ---the end– 8-)

×