ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 7 Dr. Shi Dept. of Electrical and Computer Engineering.

Slides:



Advertisements
Similar presentations
Abdullah Said Alkalbani University of Buraimi
Advertisements

ECE 2110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Encoders.
Give qualifications of instructors: DAP
Princess Sumaya University
Cs 1110 Ch 4-1 Combinational Logic. ° Introduction Logic circuits for digital systems may be: °2°2 combinational sequential OR A combinational circuit.
Combinational Circuits
Functions and Functional Blocks
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
التصميم المنطقي Second Course
Overview Part 2 – Combinational Logic
CS 151 Digital Systems Design Lecture 17 Encoders and Decoders
CS 151 Digital Systems Design Lecture 15 Magnitude Comparators and Multiplexers.
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.
EE2174: Digital Logic and Lab
DIGITAL SYSTEMS TCE OTHER COMBINATIONAL LOGIC CIRCUITS DECODERS ENCODERS.
ENGIN112 L14: Binary Adder Subtractor October 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 14 Binary Adders and Subtractors.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
CS 105 Digital Logic Design
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Building Functions.
Combinational Circuits
Combinational Logic Chapter 4.
Morgan Kaufmann Publishers
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.
Top-down modular design
Combinational Logic Design
Overview of Chapter 4 °Design digital circuit from specification °Digital inputs and outputs known Need to determine logic that can transform data °Start.
Combinational and Sequential Logic Circuits.
Combinational Logic Chapter 4. Digital Circuits Combinational Circuits Logic circuits for digital system Combinational circuits the outputs are.
Sahar Mosleh PageCalifornia State University San Marcos 1 Multiplexer, Decoder and Circuit Designing.
Chap 3. Chap 3. Combinational Logic Design. Chap Combinational Circuits l logic circuits for digital systems: combinational vs sequential l Combinational.
Combinational Circuit – Arithmetic Circuit
Combinational Circuits
CS2100 Computer Organisation MSI Components (AY2015/6 Semester 1)
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Combinational Design, Part 3: Functional Blocks
Digital Electronics and Computer Interfacing
1 Combinational Logic Design Digital Computer Logic Kashif Bashir
Kuliah Rangkaian Digital Kuliah 6: Blok Pembangun Logika Kombinasional Teknik Komputer Universitas Gunadarma.
CHAPTER 4 Combinational Logic
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
Chap 2. Combinational Logic Circuits
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Magnitude Comparator A magnitude comparator is a combinational circuit that compares two numbers, A and B, and then determines their relative magnitudes.
Digital Systems Section 11 Decoders and Encoders.
DIGITAL LOGIC DESIGN & COMPUTER ARCHTECTURE
Module 11.  In Module 9, we have been introduced to the concept of combinational logic circuits through the examples of binary adders.  Meanwhile, in.
CS151 Introduction to Digital Design Chapter 3: Combinational Logic Design 3-5 Combinational Functional Blocks 3-6 Rudimentary Logic Functions 3-7 Decoding.
Chapter 3 Digital Logic Structures
Digital Design Module 2 Decoder Amit Kumar AP SCSE, GU Greater Noida.
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
Combinational Circuits. Outline Boolean Algebra Decoder Encoder MUX.
1 DLD Lecture 16 More Multiplexers, Encoders and Decoders.
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.
MSI Circuits.
Combinational Functions and Circuits
Combinational Circuit Design
Combinational Logic Circuits
Lecture 4: Combinational Functions and Circuits
Combinational Circuits
Computer Architecture CST 250
FIGURE 4.1 Block diagram of combinational circuit
Dr. Clincy Professor of CS
Digital Systems Section 17 Decoders and Encoders.
Chapter-4 Combinational Logic
Electronics for Physicists
Digital System Design Combinational Logic
Presentation transcript:

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 7 Dr. Shi Dept. of Electrical and Computer Engineering

BINARY ADDERS

Overview  Addition of binary data is fundamental  Need to determine hardware implementation  Represent inputs and outputs  Inputs: single bit values, carry in  Outputs: Sum, Carry  Hardware features  Create a single-bit adder and chain together  Dealing with overflow  What happens if numbers are too big?

4-Bit Adder Think top-down: How to break a problem into pieces?

Multiple-bit Addition A 3 A 2 A 1 A A B 3 B 2 B 1 B 0 B A B A i +B i C i SiSi C i+1 Consider single-bit adder for each bit position. Each bit position creates a sum and carry

Full Adder Block Diagram Single-bit full adder, building block of large adders Common piece of computer hardware

Full Adder C i A i B i S i C i CiCi AiBiAiBi SiSi Full adder includes carry in C i Notice interesting pattern in Karnaugh map.

Full Adder C i A i B i S i C i CiCi AiBiAiBi C i+1 Now consider implementation of carry out Two outputs per full adder bit (C i+1, S i ) Note: 3 inputs

Full Adder Implementation S i = C i  (A i  B i ) C i+1 = A i · B i + C i · (A i  B i )

Full Adder A full adder can be made from two half adders (plus an OR gate). Hardware repetition simplifies hardware design

4-Bit Adder C A B S Chain single-bit adders together. What does this do to delay?

Half Adder (not very useful) C AB S A 0 B 0 S 0 C Dec Binary Add two binary numbers A 0, B 0 -> single bit inputs S 0 -> single bit sum C 1 -> carry out

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 the size of the multiplexer

Implementing a Four- Input Function with a Multiplexer

Multiplexers & Shannon Expansion

Shannon Expansion Theorem  The Shannon expansion develops the idea that Boolean functions can be reduced by means of the identity:  where F is any function and F x and F x' are Shannon cofactors of F.

Example f = yz + xyz' + x'y'z = yz(x' + x) + xyz' + x'y'z = x'yz + xyz + xyz' + x'y'z = x'(yz + y'z) + x(yz + yz') = x'g x' + xg x

Expand about 2 variables

Multiplexer Implementation

DECODERS

Overview  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 2 n inputs to an n-bit output  Useful for compressing data  Can be developed using AND/OR gates  Both encoders and decoders are extensively used in digital systems

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

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

3-to-8 Binary Decoder F 1 = x'y'zE xzy F 0 = x'y'z’E F 2 = x'yz'E F 3 = x'yzE F 5 = xy'zE F 4 = xy'z'E F 6 = xyz'E F 7 = xyzE Truth Table: 3-to-8 Decoder X Y F0 F1 F2 F3 F4 F5 F6 F7 Z Enable Enable = 1

Implementing Functions Using Decoders  Any n-variable logic function can be implemented using a single n-to-2 n 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-2 n decoder with m OR gates.  Suitable when a circuit has many outputs, and each output function is expressed with few minterms.

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

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

Encoders

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

8-to-3 Binary Encoder At any one time, only one input line has a value of I0I1I2I3I4I5I6I7I0I1I2I3I4I5I6I7 y 0 = I 1 + I 3 + I 5 + I 7 y 1 = I 2 + I 3 + I 6 + I 7 y 2 = I 4 + I 5 + I 6 + I 7

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.

Priority Encoder (8 to 3 encoder)  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’ I1 I2 I3 I4 I5 I6 I0 I7 H1 H2 H3 H4 H5 H6 H0 H7 IDLE

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 Y1 Y2 Y0 IDLE I1 I2 I3Y1 Y2I4 I5 I6 I0 Y0 I7 Binary encoder Priority Circuit I1 I2 I3 I4 I5 I6 I0 I7 H1 H2 H3 H4 H5 H6 H0 H7 IDLE I1 I2 I3 I4 I5 I6 I0 I7 Priority encoder