CS 151 Digital Systems Design Lecture 15 Magnitude Comparators and Multiplexers.

Slides:



Advertisements
Similar presentations
ENGIN112 L15: Magnitude Comparator and Multiplexers October 6, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 15 Magnitude Comparators.
Advertisements

1 The 2-to-4 decoder is a block which decodes the 2-bit binary inputs and produces four output All but one outputs are zero One output corresponding to.
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
Documentation Standards
Functions and Functional Blocks
Decoders/DeMUXs CS370 – Spring Decoder: single data input, n control inputs, 2 outputs control inputs (called select S) represent Binary index of.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
Lecture #9 EGR 277 – Digital Logic
Overview Part 2 – Combinational Logic
CPEN Digital System Design
Combinational Logic Chapter 4. Digital Circuits Introduction Logic circuits for digital systems may be combinational or sequential. A combinational.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 2 –
Combinational Logic Chapter 4.
Combinational Logic Building Blocks
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
ECE 301 – Digital Electronics Multiplexers and Demultiplexers (Lecture #12)
Multiplexer MUX. 2 Multiplexer Multiplexer (Selector)  2 n data inputs,  n control inputs,  1 output  Used to connect 2 n points to a single point.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
Combinational Logic Chapter 4.
Outline Decoder Encoder Mux. Decoder Accepts a value and decodes it Output corresponds to value of n inputs Consists of: Inputs (n) Outputs (2 n, numbered.
Digital Electronics.
Chapter 4-part 2 Combinational Logic. 4-6 DecimalAdder   Add twoBCD's   9 inputs: two BCD's and one carry-in 5 outputs: one BCD and one carry-out.
Overview of Chapter 4 °Design digital circuit from specification °Digital inputs and outputs known Need to determine logic that can transform data °Start.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 2 –
Combinational and Sequential Logic Circuits.
Combinational Logic Chapter 4. Digital Circuits Combinational Circuits Logic circuits for digital system Combinational circuits the outputs are.
Three-state devices Multiplexers
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Combinational Logic. Digital Circuits Introduction Logic circuits for digital systems may be combinational or sequential. A combinational circuit.
Digital System Ch4-1 Chapter 4 Combinational Logic Ping-Liang Lai ( 賴秉樑 ) Digital System 數位系統.
Combinational Design, Part 3: Functional Blocks
DLD Lecture 15 Magnitude Comparators and Multiplexers
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
Digital Logic. 2 Abstractions in CS (gates) Basic Gate: Inverter IO IO GNDI O Vcc Resister (limits conductivity) Truth Table.
ITEC 352 Lecture 3 Low level components(2). Low-level components Review Electricity Transistors Gates Really simple circuit.
CS 151  What does the full truth table look like? InputsOutputs D3D3 D2D2 D1D1 D0D0 A1A1 A0A0 V 0000XX
CO UNIT-I. 2 Multiplexers: A multiplexer selects information from an input line and directs the information to an output line A typical multiplexer has.
CEC 220 Digital Circuit Design Timing Diagrams, MUXs, and Buffers Mon, Oct 5 CEC 220 Digital Circuit Design Slide 1 of 20.
CEC 220 Digital Circuit Design Timing Diagrams, MUXs, and Buffers Friday, February 14 CEC 220 Digital Circuit Design Slide 1 of 18.
CEC 220 Digital Circuit Design Timing Diagrams, MUXs, and Buffers
Combinational Circuits by Dr. Amin Danial Asham. References  Digital Design 5 th Edition, Morris Mano.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 7 Dr. Shi Dept. of Electrical and Computer Engineering.
Magnitude Comparator A magnitude comparator is a combinational circuit that compares two numbers, A and B, and then determines their relative magnitudes.
Chapter 3: Combinational Functions and Circuits 3-5 to 3-7: Decoders
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Multiplexers.
Digital Design Lecture 8 Combinatorial Logic (Continued)
Digital Design Module 2 Decoder Amit Kumar AP SCSE, GU Greater Noida.
1 DLD Lecture 16 More Multiplexers, Encoders and Decoders.
Multiplexer.
Encoders The inverse function of a decoder. Priority Encoder resolve the ambiguity of illegal inputs only one of the input is encoded D 3 has the highest.
CS221: Digital Logic Design Combinational Circuits 3
Combinational Circuit Design
Digital Signals Digital Signals have two basic states:
Jeremy R. Johnson Wed. Sept. 29, 1999
Dr. Clincy Professor of CS
Magnitude Comparator A magnitude comparator is a combinational circuit that compares two numbers, A and B, and then determines their relative magnitudes.
FIGURE 4.1 Block diagram of combinational circuit
EET107/3 DIGITAL ELECTRONICS 1
Digital Logic.
COE 202: Digital Logic Design Combinational Circuits Part 3
Dr. Clincy Professor of CS
Digital Logic.
Overview Part 1 - Registers, Microoperations and Implementations
Electronics for Physicists
Digital Circuits.
ECE 352 Digital System Fundamentals
SYEN 3330 Digital Systems Chapter 2 – Part 1 SYEN 3330 Digital Systems.
Presentation transcript:

CS 151 Digital Systems Design Lecture 15 Magnitude Comparators and Multiplexers

Overview °Discussion of two digital building blocks °Magnitude comparators Compare two multi-bit binary numbers Create a single bit comparator Use repetitive pattern °Multiplexers Select one out of several bits Some inputs used for selection Also can be used to implement logic

Magnitude Comparator °The comparison of two numbers outputs: A>B, A=B, A<B °Design Approaches the truth table -2 2n entries - too cumbersome for large n use inherent regularity of the problem -reduce design efforts -reduce human errors Magnitude Compare A[3..0] B[3..0] A = B A < B A > B

Magnitude Comparator How can we find A > B? How many rows would a truth table have? 2 8 = 256

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

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

Magnitude Comparison °Algorithm -> logic A = A 3 A 2 A 1 A 0 ; B = B 3 B 2 B 1 B 0 A=B if A 3 =B 3, A 2 =B 2, A 1 =B 1 and A 1 =B 1 °Test each bit: -equality: x i = A i B i +A i 'B i ' -(A=B) = x 3 x 2 x 1 x 0 °More difficult to test less than/greater than (A>B) = A 3 B 3 '+x 3 A 2 B 2 '+x 3 x 2 A 1 B 1 '+x 3 x 2 x 1 A 0 B 0 ' (A<B) = A 3 'B 3 +x 3 A 2 'B 2 +x 3 x 2 A 1 'B 1 +x 3 x 2 x 1 A 0 'B 0 Start comparisons from high-order bits °Implementation x i = (A i B i '+A i 'B i )’

Magnitude Comparison °Hardware chips

Magnitude Comparator °Real-world application Thermostat controller

Multiplexers °Select an input value with one or more select bits °Use for transmitting data °Allows for conditional transfer of data °Sometimes called a mux

4– to– 1- Line Multiplexer

Quadruple 2–to–1-Line Multiplexer °Notice enable bit °Notice select bit °4 bit inputs

Multiplexer as combinational modules °Connect input variables to select inputs of multiplexer (n-1 for n variables) °Set data inputs to multiplexer equal to values of function for corresponding assignment of select variables °Using a variable at data inputs reduces size of the multiplexer

Implementing a Four- Input Function with a Multiplexer

Typical multiplexer uses

Three-state gates A multiplexer can be constructed with three-state gates Output state: 0, 1, and high-impedance (open ckts) If the select input (E) is 0, the three-state gate has no output Opposite true here, No output if E is 1

Three-state gates A multiplexer can be constructed with three-state gates Output state: 0, 1, and high-impedance (open ckts) If the select input is low, the three-state gate has no output

Summary °Magnitude comparators allow for data comparison Can be built using and-or gates °Greater/less than requires more hardware than equality °Multiplexers are fundamental digital components Can be used for logic Useful for datapaths Scalable °Tristate buffers have three types of outputs 0, 1, high-impedence (Z) Useful for datapaths