1 / 20

Comparators

Comparators. Combinational Design. Comparators. Equality and Magnitude Comparators TTL Comparators Comparator Networks Cascading 1-bit Comparators. Equality Comparator. XNOR. X Y Z 0 0 1 0 1 0 1 0 0 1 1 1. X. Z. Y. Z = !(X $ Y). 4-Bit Equality Comparator.

abena
Download Presentation

Comparators

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. Comparators Combinational Design

  2. Comparators • Equality and Magnitude Comparators • TTL Comparators • Comparator Networks • Cascading 1-bit Comparators

  3. Equality Comparator XNOR X Y Z 0 0 1 0 1 0 1 0 0 1 1 1 X Z Y Z = !(X $ Y)

  4. 4-Bit Equality Comparator FIELD A = [A0..3]; FIELD B = [B0..3]; FIELD C = [C0..3];

  5. 4-bit Equality Detector A[3..0] Equality Detector A_EQ_B B[3..0]

  6. 4-bit Magnitude Comparator A_LT_B A[3..0] Magnitude Detector A_EQ_B B[3..0] A_GT_B

  7. Magnitude Comparator How can we find A_GT_B? How many rows would a truth table have? 28 = 256!

  8. Magnitude Comparator Find A_GT_B Because A3 > B3 i.e. A3 & !B3 = 1 If A = 1001 and B = 0111 is A > B? Why? Therefore, one term in the logic equation for A_GT_B is A3 & !B3

  9. Magnitude Comparator A_GT_B = A3 & !B3 + ….. Because A3 = B3 and A2 > B2 i.e. C3 = 1 and A2 & !B2 = 1 If A = 1101 and B = 1011 is A > B? Why? Therefore, the next term in the logic equation for A_GT_B is C3 & A2 & !B2

  10. Magnitude Comparator A_GT_B = A3 & !B3 + C3 & A2 & !B2 + ….. Because A3 = B3 and A2 = B2 and A1 > B1 i.e. C3 = 1 and C2 = 1 and A1 & !B1 = 1 If A = 1010 and B = 1001 is A > B? Why? Therefore, the next term in the logic equation for A_GT_B is C3 & C2 & A1 & !B1

  11. Magnitude Comparator A_GT_B = A3 & !B3 + C3 & A2 & !B2 + C3 & C2 & A1 & !B1 + ….. Because A3 = B3 and A2 = B2 and A1 = B1 and A0 > B0 i.e. C3 = 1 and C2 = 1 and C1 = 1 and A0 & !B0 = 1 If A = 1011 and B = 1010 is A > B? Why? Therefore, the last term in the logic equation for A_GT_B is C3 & C2 & C1 & A0 & !B0

  12. Magnitude Comparator A_GT_B = A3 & !B3 + C3 & A2 & !B2 + C3 & C2 & A1 & !B1 + C3 & C2 & C1 & A0 & !B0

  13. Magnitude Comparator Find A_LT_B A_LT_B = !A3 & B3 + C3 & !A2 & B2 + C3 & C2 & !A1 & B1 + C3 & C2 & C1 & !A0 & B0

  14. Comparators • Equality and Magnitude Comparators • TTL Comparators • Comparator Networks • Cascading 1-bit Comparators

  15. 1 20 P>Q Vcc 1 16 2 19 B3 Vcc P0 P=Q 2 15 3 18 A<Bin A3 Q0 Q7 3 14 4 17 B2 A=Bin P1 P7 4 13 5 16 A>Bin A2 Q1 Q6 5 12 6 15 A1 A>Bout P2 P6 6 11 7 14 A=Bout B1 Q2 Q5 7 10 8 13 A<Bout A0 P3 P5 8 9 9 12 GND B0 Q3 Q4 10 11 GND P4 74LS85 74LS682 TTL Comparators

  16. Cascading two 74LS85s

  17. Comparators • Equality and Magnitude Comparators • TTL Comparators • Comparator Networks • Cascading 1-bit Comparators

  18. 1-Bit Magnitude Comparator

  19. 4-Bit Magnitude Comparator X Y 1101 0110 1110 1011 1011 1011 0101 0111 1010 1011 gt = 1 eq = 1 lt = 1

  20. Tree comparator network

More Related