Logic Circuits Design presented by Amr Al-Awamry

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.
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Encoders.
5.5 Encoders A encoder is a multiple-input, multiple-output logic circuit that converts coded inputs into coded outputs, where the input and output codes.
Give qualifications of instructors: DAP
CDA 3100 Recitation Week 10.
Comparators Combinational Design.
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR, Parity Circuits, Comparators.
Lecture #9 EGR 277 – Digital Logic
CS 151 Digital Systems Design Lecture 15 Magnitude Comparators and Multiplexers.
Combinatorial Logic Design Process. Example: Three 1s pattern detector Detect whether a pattern of at least three adjacent 1s occurs anywhere in an 8-bit.
Chapter 3 Combinational Logic Design
COE 202: Digital Logic Design Combinational Circuits Part 4
Combinational Logic Chapter 4.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexers.
ITEC 352 Lecture 5 Low level components(3). Low level components Review Multiplexers Demultiplexer Minterm/Maxterm Karnaugh Map.
Digital Electronics.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Combinational and Sequential Logic Circuits.
Combinational Circuit – Arithmetic Circuit
Combinational Logic. Outline 4.1 Introduction 4.2 Combinational Circuits 4.3 Analysis Procedure 4.4 Design Procedure 4.5 Binary Adder- Subtractor 4.6.
COE 202: Digital Logic Design Combinational Circuits Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
DLD Lecture 15 Magnitude Comparators and Multiplexers
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
9/15/09 - L24 Other FF TypesCopyright Joanne DeGroat, ECE, OSU1 Other FF Types.
CS151 Introduction to Digital Design
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.
EKT 124 / 3 DIGITAL ELEKTRONIC 1
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.
1 CS 151: Digital Design Chapter 3: Combinational Logic Design 3-1Design Procedure CS 151: Digital Design.
CS151 Introduction to Digital Design Chapter 3: Combinational Logic Design 3-1 Design Procedure 1Created by: Ms.Amany AlSaleh.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Digital Systems Section 11 Decoders and Encoders.
Module 11.  In Module 9, we have been introduced to the concept of combinational logic circuits through the examples of binary adders.  Meanwhile, in.
Digital Design Lecture 8 Combinatorial Logic (Continued)
3.13 How many output lines will a five-input decoder have?
Decoders Zhijian John Wang. What are they? Overview of a decoder A device that reverses the process of an encoder Convert information from one format.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Decoders A decoder is a logic circuit that detects the presence of a specific combination of bits at its input. Two simple decoders that detect the presence.
Decoder Chapter 12 Subject: Digital System Year: 2009.
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits.
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.
EKT 124 / 3 DIGITAL ELEKTRONIC 1
Computer Science 210 Computer Organization
CS221: Digital Logic Design Combinational Circuits 3
Part 4 Combinational Logic.
Combinational Circuit Design
Overview Introduction Logic Gates Flip Flops Registers Counters
ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Encoders.
Magnitude Comparator A magnitude comparator is a combinational circuit that compares two numbers, A and B, and then determines their relative magnitudes.
Instructor: Alexander Stoytchev
FIGURE 4.1 Block diagram of combinational circuit
Digital Logic & Design Dr. Waseem Ikram Lecture No. 16.
Multiplexers Anindya IE CSE.
Digital Systems Section 17 Decoders and Encoders.
13 Digital Logic Circuits.
Gates Type AND denoted by X.Y OR denoted by X + Y NOR denoted by X + Y
Combinational Circuits
Electronics for Physicists
Adder, Subtructer, Encoder, Decoder, Multiplexer, Demultiplexer
Instructor: Alexander Stoytchev
Digital Circuits.
ECE2030 HW-6.
SYEN 3330 Digital Systems Chapter 2 – Part 1 SYEN 3330 Digital Systems.
Presentation transcript:

Logic Circuits Design presented by Amr Al-Awamry Give qualifications of instructors: DAP teaching computer architecture at Berkeley since 1977 Co-athor of textbook used in class Best known for being one of pioneers of RISC currently author of article on future of microprocessors in SciAm Sept 1995 RY took 152 as student, TAed 152,instructor in 152 undergrad and grad work at Berkeley joined NextGen to design fact 80x86 microprocessors one of architects of UltraSPARC fastest SPARC mper shipping this Fall

Overview 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 Binary decoders Converts an n-bit code to a single active output Can be developed using AND/OR gates Can be used to implement logic circuits. Binary encoders Converts one of 2n inputs to an n-bit output Useful for compressing data credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

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

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

Magnitude Comparator Find A > 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 > B is A3 . B3’

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’ + …..

More difficult to test less than/greater than Magnitude Comparison Algorithm -> logic A = A3A2A1A0 ; B = B3B2B1B0 A=B if A3=B3, A2=B2, A1=B1and A1=B1 Test each bit: equality: xi= AiBi+Ai'Bi' (A=B) = x3x2x1x0 More difficult to test less than/greater than (A>B) = A3B3'+x3A2B2'+x3x2A1B1'+x3x2x1 A0B0' (A<B) = A3'B3+x3A2'B2+x3x2A1'B1+x3x2x1 A0'B0 Start comparisons from high-order bits Implementation xi = (AiBi'+Ai'Bi)’

Magnitude Comparison Hardware chips

Real-world application 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

Black box with n input lines and 2n output lines Binary Decoder Black box with n input lines and 2n output lines Only one output is a 1 for any given input Binary Decoder n inputs 2n outputs

2-to-4 Binary Decoder Truth Table: F0 = X'Y' F1 = X'Y F2 = XY' F3 = XY From truth table, circuit for 2x4 decoder is: Note: Each output is a 2-variable minterm (X'Y', X'Y, XY' or XY) F0 F1 F2 F3 X 2-to-4 Decoder Y

3-to-8 Binary Decoder Truth Table: F1 = x'y'z x z y F0 = x'y'z'

Implementing Functions Using Decoders Any n-variable logic function can be implemented using a single n-to-2n decoder to generate the minterms OR gate forms the sum. The output lines of the decoder corresponding to the minterms of the function are used as inputs to the or gate. Any combinational circuit with n inputs and m outputs can be implemented with an n-to-2n decoder with m OR gates. Suitable when a circuit has many outputs, and each output function is expressed with few minterms.

Implementing Functions Using Decoders Example: Full adder S(x, y, z) = S (1,2,4,7) C(x, y, z) = S (3,5,6,7) 3-to-8 Decoder 1 2 3 4 5 6 7 S x S2 S1 S0 y C z

Standard MSI Binary Decoders Example 74138 (3-to-8 decoder) (a) Logic circuit. (b) Package pin configuration. (c) Function table.

Building a Binary Decoder with NAND Gates Start with a 2-bit decoder Add an enable signal (E) Note: use of NANDs only one 0 active! if E = 0

Use two 3 to 8 decoders to make 4 to 16 decoder Enable can also be active high In this example, only one decoder can be active at a time. x, y, z effectively select output line for w

The simplest encoder is a 2n-to-n binary encoder Encoders If the a decoder's output code has fewer bits than the input code, the device is usually called an encoder. e.g. 2n-to-n The simplest encoder is a 2n-to-n binary encoder One of 2n inputs = 1 Output is an n-bit binary number . 2n inputs n outputs Binary encoder

8-to-3 Binary Encoder At any one time, only one input line has a value of 1. Inputs Outputs I 1 2 3 4 5 6 7 y2 y1 y0 1 1 1 1 1 1 1 1 1 1 I0 I1 I2 I3 I4 I5 I6 I7 y0 = I1 + I3 + I5 + I7 y1 = I2 + I3 + I6 + I7 y2 = I4 + I5 + I6 + I7

8-to-3 Priority Encoder What if more than one input line has a value of 1? Ignore “lower priority” inputs. Idle indicates that no input is a 1. Note that polarity of Idle is opposite from Table 4-8 in Mano Inputs Outputs I 1 2 3 4 5 6 7 y2 y1 y0 Idle x x 1 0 0 X 1 0

Priority Encoder (8 to 3 encoder) Assign priorities to the inputs When more than one input are asserted, the output generates the code of the input with the highest priority Priority Encoder : H7=I7 (Highest Priority) H6=I6.I7’ H5=I5.I6’.I7’ H4=I4.I5’.I6’.I7’ H3=I3.I4’.I5’.I6’.I7’ H2=I2.I3’.I4’.I5’.I6’.I7’ H1=I1. I2’.I3’.I4’.I5’.I6’.I7’ H0=I0.I1’. I2’.I3’.I4’.I5’.I6’.I7’ IDLE= I0’.I1’. I2’.I3’.I4’.I5’.I6’.I7’ Encoder Y0 = I1 + I3 + I5 + I7 Y1 = I2 + I3 + I6 + I7 Y2 = I4 + I5 + I6 + I7 I1 I2 I3 Y1 Y2 I4 I5 I6 I0 Y0 I7 Binary encoder Priority Circuit H1 H2 H3 H4 H5 H6 H0 H7 IDLE Priority encoder Y0 Y1 Y2 IDLE

Encoder Application (Monitoring Unit) Encoder identifies the requester and encodes the value Controller accepts digital inputs. Encoder Controller Machine Code Machine 1 Machine 2 Machine n Alarm Signal Contoller Response Action