Comparators Combinational Design.

Slides:



Advertisements
Similar presentations
IF statement (i) Single statement. IF ( logical expression ) statement Example: read(*,*) a if (a. lt. 0) a = -a write(*,*) a Or read(*,*) a if (a < 0)
Advertisements

ENGIN112 L15: Magnitude Comparator and Multiplexers October 6, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 15 Magnitude Comparators.
Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
Logic Circuits Design presented by Amr Al-Awamry
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR, Parity Circuits, Comparators.
EELE 367 – Logic Design Module 4 – Combinational Logic Design with VHDL Agenda 1.Decoders/Encoders 2.Multiplexers/Demultiplexers 3.Tri-State Buffers 4.Comparators.
Magnitude Comparator Lecture L6.4 Section 6.1.
Comparator.
Combinational Logic and Verilog. XORs and XNORs XOR.
Lecture 3 Karnaugh Map Chapter 2 Jack Ou, Ph.D.. Home Alarm Logic.
Parity. 2 Datasheets TTL:  CMOS: 
CS 151 Digital Systems Design Lecture 15 Magnitude Comparators and Multiplexers.
Henry Hexmoor--SIUC One bit Equality Comparator XNOR X Y Z Z = !(X $ Y) X Y Z
Equality Detector Lecture L6.1 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
DIGITAL SYSTEMS TCE OTHER COMBINATIONAL LOGIC CIRCUITS WEEK 7 AND WEEK 8 (LECTURE 1 OF 3) COMPARATORS CODE CONVERTERS.
Equality Detector Lecture L6.3 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
Equality Detector Module M5.1 Section 6.1. Equality Detector XNOR X Y Z Z = !(X $ Y) X Y Z
Combinational Comparators
COE 202: Digital Logic Design Combinational Circuits Part 4
Combinational Logic Design Process
1 Comparators: Procedures Discussion D9.2 Example 22.
Writing and Solving Proportions. Proportions Proportion is an equation stating that two ratios are equivalent. Proportional are two quantities that form.
Circuit, State Diagram, State Table
Digital Electronics.
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
COE 202: Digital Logic Design Combinational Circuits Part 4
1 ENGR 254 Lecture DeMorgan Symbol Equivalence.
EEE2243 Digital System Design Chapter 3: Verilog HDL (Combinational) by Muhazam Mustapha, January 2011.
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices X-OR gates and Parity circuits Comparators Adders, subtractors,
Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output.
ECE 3110: Introduction to Digital Systems Combinational-Circuit Synthesis.
Thinking Mathematically
Lecture #18 Page 1 ECE 4110– Sequential Logic Design Lecture #18 Agenda 1.MSI Demultiplexers 2.MSI Tri-State Buffers 3.MSI Comparators Announcements 1.HW.
Branch : IT Semester : 3 PREPARED BY:- Rajpurohit Shravansingh ( ) Patel Dipesh ( ) Shah Maulin( )
Lecture # 10 University of Tehran
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR and parity check Circuits.
Comparators Combinational Design. Comparators Equality and Magnitude Comparators –CSE 171 (Designed using CUPL) TTL Comparators Comparator Networks Cascading.
Lecture #18 Page 1 ECE 4110–5110 Digital System Design Lecture #18 Agenda 1.MSI Demultiplexers 2.MSI Tri-State Buffers 3.MSI Comparators Announcements.
ECE 2110: Introduction to Digital Systems
ECE 2110: Introduction to Digital Systems
Magnitude Comparator Module M5.2 Section 6.1.
ECE 4110–5110 Digital System Design
NAND & NOR as Universal gates
Biconditional - 2 CS-708.
Boolean Expressions Lecture No. 10.
XOR, XNOR, and Binary Adders
Chapter 6 Functions of Combinational Logic
Cascading 1-Bit Comparators
XOR, XNOR, & Binary Adders
Lecture 8 Logistics Last lecture Last last lecture Today
Subsetting Rows with the WHERE clause
Logic Gates.
Boolean Algebra.
Equation Review Given in class 10/4/13.
Unit -06 PLDs.
Gates Type AND denoted by X.Y OR denoted by X + Y NOR denoted by X + Y
Lecture 9 Logistics Last lecture Last last lecture Today
CSE 370 – Winter 2002 – Comb. Logic building blocks - 1
Logic Gates.
a + 2 = 6 What does this represent? 2 a
Logical Truth To show a statement A is a logic truth (tautology) ...
XOR, XNOR, and Binary Adders
Multiplication strategies
XOR Function Logic Symbol  Description  Truth Table 
Magnitude Comparator Lecture L6.2 Section 6.1.
Single bit comparator Single bit comparator 4/10/2007 DSD,USIT,GGSIPU
Equation Review.
EEE2243 Digital System Design Chapter 1: Verilog HDL (Combinational) by Muhazam Mustapha, February 2012.
Digital Circuits.
XOR, XNOR, and Binary Adders
Presentation transcript:

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 X 1 0 0 Z 1 1 1 Y 0 0 1 0 1 0 1 0 0 1 1 1 X Z Y Z = !(X $ Y)

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

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

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

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

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

Magnitude Comparator A_GT_B = A3 & !B3 + ….. Because A3 = B3 and + ….. 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

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

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

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

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

Comparators Equality and Magnitude Comparators TTL Comparators Comparator Networks Cascading 1-bit Comparators

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

Cascading two 74LS85s

Comparators Equality and Magnitude Comparators TTL Comparators Comparator Networks Cascading 1-bit Comparators

1-Bit Magnitude Comparator

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

Tree comparator network