CS221: Digital Logic Design Combinational Circuits

Slides:



Advertisements
Similar presentations
Cs 1110 Ch 4-1 Combinational Logic. ° Introduction Logic circuits for digital systems may be: °2°2 combinational sequential OR A combinational circuit.
Advertisements

Logical Design.
Functions and Functional Blocks
Combinational Circuits CS370 – Spring BCD to 7 Segment Display Controller Understanding the problem: input is a 4 bit bcd digit output is the control.
COE 202: Digital Logic Design Combinational Circuits Part 1
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
Comparator.
التصميم المنطقي Second Course
Combinational Logic Design
COE 202: Digital Logic Design Combinational Circuits Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
ECE 331 – Digital System Design
CSE-221 Digital Logic Design (DLD)
Space vs. Speed: Binary Adders 11.3 Space vs. Speed.
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
COE 202: Digital Logic Design Combinational Circuits Part 1
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
Chapter 3 Combinational Logic Design
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Lecture 13 Problems (Mano)
Logic Gates Combinational Circuits
CS 105 Digital Logic Design
Lecture No. 14 Combinational Functional Devices svbitec.wordpress.com.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Building Functions.
Introduction to Digital Logic Design Appendix A of CO&A Dr. Farag
Overview of Chapter 4 °Design digital circuit from specification °Digital inputs and outputs known Need to determine logic that can transform data °Start.
Logical Circuit Design Week 8: Arithmetic Circuits Mentor Hamiti, MSc Office ,
Chap 3. Chap 3. Combinational Logic Design. Chap Combinational Circuits l logic circuits for digital systems: combinational vs sequential l Combinational.
Dr. Ahmed El-Bialy, Dr. Sahar Fawzy Combinational Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
COE 202: Digital Logic Design Combinational Circuits Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
Digital Arithmetic and Arithmetic Circuits
Functions of Combinational Logic
Digital Logic Design Review Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM 2010.
COE 202: Digital Logic Design Combinational Circuits Part 4
CHAPTER 4 Combinational Logic
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
CHAPTER 4 Combinational Logic Design- Arithmetic Operation (Section 4.6&4.9)
COE 202: Digital Logic Design Combinational Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem.
ES 244: Digital Logic Design Chapter 4 Chapter 4: Combinational Logic Uchechukwu Ofoegbu Temple University.
COE 202: Digital Logic Design Combinational Circuits Part 3
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
1 CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits 4-1,2: Iterative Combinational Circuits and Binary Adders.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 8 Arithmetic.
Universal college of engineering & technology. .By Harsh Patel)
Combinational Circuits
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 10 Multiplexers MUX: –Selects binary information from one of many input lines and.
Digital Design Module –II Adders Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.
Computer Architecture
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
ECE 320 Homework #3 1. Simplify the Boolean function F using the don’t care conditions d, in both S.O.P. and P.O.S. form: a) F=A’B’D’+A’CD+A’BC d=A’BC’D+ACD+AB’D’
Computing Machinery Chapter 3: Combinational Circuits.
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.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Combinational Circuits
CPEN Digital System Design
CEC 220 Digital Circuit Design
Addition and multiplication Arithmetic is the most basic thing you can do with a computer, but it’s not as easy as you might expect! These next few lectures.
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
CS151 Introduction to Digital Design Chapter 4: Arithmetic Functions and HDLs 4-1: Iterative Combinational Circuits 4-2: Binary Adders 1Created by: Ms.Amany.
ACOE161Digital Circuit Design1 Design Of Combinational Logic Circuits.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
1 Combinational Logic Design.  A process with 5 steps Specification Formulation Optimization Technology mapping Verification  1 st three steps and last.
Lecture No. 14 Combinational Functional Devices. Digital Logic &Design Dr. Waseem Ikram Lecture 14.
Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates,
Programmable Configurations
COE 202: Digital Logic Design Combinational Circuits Part 3
Unit 5 COMBINATIONAL CIRCUITS-1
Presentation transcript:

CS221: Digital Logic Design Combinational Circuits Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 860-7554 Office: 22-324

Objectives BCD to Excess-3 BCD to 7-Segments Arithmetic Circuits 2-bit numbers Multiplier Big Adders Parallel Adder = Ripple Carry Adder Carry Look-ahead Adder

BCD to Excess-3 Code Converter Code converters convert from one code to another (BCD to Excess-3 in this example) The inputs are defined by the code that is to be converted (BCD in this example) The outputs are defined by the converted code (Excess-3 in this example) Recall Excess-3 code is a decimal digit plus three converted into binary, i.e. 0 is 0011, 1 is 0100, etc.

BCD to Excess-3 Code Converter BCD Input Excess 3 Output Decimal A B C D W X Y Z 1 3 4 2 5 6 7 8 9 10 11 12 10-15 All other inputs x -- Step 1 (Specification) 4-bit BCD input (A,B,C,D) 4-bit E-3 output (W,X,Y,Z) Step 2 (Formulation) Obtain Truth table Ahmad Almulhem, KFUPM 2010

BCD to Excess-3 Code Converter Step 3 (Optimization): 4 different functions/outputs ... utilize don’t cares src: Mano’s book src: online CD

BCD-to-Seven-Segment Decoder src: Mano’s book A seven-segment display is digital readout found in electronic devices like clocks, mobiles, monitors, TVs, etc. Made of seven light-emitting diodes (LED) segments; each segment is controlled separately. A BCD-to-Seven-Segment decoder is a combinational circuit Accepts a decimal digit in BCD (input) Generates appropriate outputs for the segments to display the input decimal digit (output) Ahmad Almulhem, KFUPM 2010

BCD-to-Seven-Segment Decoder Step 1 (Specification): 4 inputs (A, B, C, D) 7 outputs (a, b, c, d, e, f, g) a b c d e f g BCD-to-Seven-Segment Decoder A B C D Ahmad Almulhem, KFUPM 2010

BCD-to-Seven-Segment Decoder Step 2 (Formulation) BCD Input 7 Segment Decoder Decimal A B C D a b c d e f g 1 2 3 4 5 6 7 8 9 10-15 All Other Inputs Invalid BCD codes = No Light Ahmad Almulhem, KFUPM 2010

BCD-to-Seven-Segment Decoder Step 3 (Optimization) a b c d e f g Ahmad Almulhem, KFUPM 2010

BCD-to-Seven-Segment Decoder Step 3 (Optimization) (cont.) a = A’C + A’BD + AB’C’ + B’C’D’ b = A’B’ + A’C’D’ + A’CD + B’C’ c = A’B + B’C’ + A’C’ + A’D d = A’CD’ + A’B’C + B’C’D’+AB’C’+A’BC’D e = A’CD’ + B’C’D’ f = A’BC’ + A’C’D’ + A’BD’ + AB’C’ g = A’CD’ + A’B’C + A’BC’ + AB’C’ a b c d e f g BCD-to-Seven-Segment Decoder A B C D Exercise: Draw the circuit (Atanua?) Ahmad Almulhem, KFUPM 2010

Binary Multiplication Similar to decimal multiplication Multiplying 2 bits will generate 1 if both bits are equal to 1, and will be 0 otherwise. Resembles an AND operation Multiplying two 2-bit numbers is done as follows: B1 B0 x A1 A0 ---------------- A0B1 A0B0 A1B1 A1B0 + ---------------------------------- C3 C2 C1 C0 This operation is an addition, requires an ADDER

Binary Multiplication Therefore, for multiplying two 2-bit numbers, AND gates and ADDERS will be sufficient Half Adders

Bigger Adders How to build an adder for n-bit numbers? Example: 4-Bit Adder Inputs ? Outputs ? What is the size of the truth table? How many functions to optimize?

Bigger Adders How to build an adder for n-bit numbers? Example: 4-Bit Adder Inputs ? 9 inputs (Carry-in from previous circuit!) Outputs ? 5 outputs What is the size of the truth table? 512 rows! How many functions to optimize? 5 functions

Binary Parallel Adder 0 1 0 1 + 0 1 1 0 1 0 1 1 To add n-bit numbers: 1 0 0 0 0 1 0 1 + 0 1 1 0 1 0 1 1 To add n-bit numbers: Use n Full-Adders in parallel The carries propagates as in addition by hand This is an example of a hierarchical design The circuit is broken into small blocks Carry in

This adder is called ripple carry adder Binary Parallel Adder To add n-bit numbers: Use n Full-Adders in parallel The carries propagates as in addition by hand Src: Mano’s Book This adder is called ripple carry adder

Ripple Adder Delay How to improve? 1 delay form first full adder Assume gate delay = T 8 T to compute the last carry 1 delay form first full adder Total delay = 8 + 1 = 9T Delay = (2n+1)T How to improve? Src: Course CD Ahmad Almulhem, KFUPM 2010

Carry Look-ahead Adder How to reduce propagation delay of ripple carry adders? Carry look-ahead adder: All carries are computed as a function of C0 (independent of n !) It works on the following standard principles: A carry bit is generated when both input bits Ai and Bi are 1, or When one of input bits is 1, and a carry-in bit exists Cn Cn-1…….Ci……….C2C1C0 Carry bits An-1…….Ai……….A2A1A0 Bn-1…….Bi……….B2B1B0 Carry Out Sn Sn-1…….Si……….S2S1S0

Carry Look-ahead Adder Ai Bi Pi Si Gi Ci Ci+1 The internal signals (1st H.A.) are given by: Pi = Ai Bi Sum Gi = Ai.Bi Carry

Carry Look-ahead Adder Ai Bi Pi Si Gi Ci Ci+1 The internal signals (1st H.A.) are given by: Pi = Ai Bi Sum Gi = Ai.Bi Carry Carry-Generate Gi = (new carry from Ai,Bi) Ci+1 = 1 when Gi = 1, regardless of the input carry Ci

Carry Look-ahead Adder Ai Bi Pi Si Gi Ci Ci+1 The internal signals (1st H.A.) are given by: Pi = Ai Bi Sum Gi = Ai.Bi Carry Carry-Propagate Pi : Propagates Ci to Ci+1 Note: Pi and Gi depend only on Ai and Bi !

Carry Look-ahead Adder Ai Bi Pi Si Gi Ci Ci+1 The internal signals (1st H.A.) are given by: Pi = Ai Bi Sum Gi = Ai.Bi Carry The output signals (2nd H.A.) are given by: Si = Pi Ci Sum Ci+1 = Gi + PiCi Carry

Carry Look-ahead Adder Ai Bi Pi Si Gi Ci Ci+1 The carry outputs for various stages can be written as: Ci+1 = Gi + Pi.Ci C1 = G0 + P0C0 C2 = G1 + P1C1 = G1 + P1(G0 + P0C0) = G1 + P1G0 + P1P0C0 C3 = G2 + P2C2 = G2 + P2(G1 + P1G0 + P1P0C0) = G2 + P2G1 + P2P1G0 + P2P1P0C0 C4 = G3 + P3C3 = G3 + P3G2 + P3P2G1 + P3P2P1G0 + P3P2P1P0C0

Carry Look-ahead Adder Conclusion: Each carry bit can be expressed in terms of the input carry C0, and not based on its preceding carry bit Each carry bit can be expressed as a SoP, and can be implemented using a two-level circuit, i.e. a gate delay of 2T

Carry Look-ahead Adder B0 P0 G0 P1 P2 G2 G3 S0 Carry Look-ahead Block A1 B1 S1 C1 G1 A2 B2 C2 S2 C3 A3 B3 P3 S3 C4 C4

Carry Look-ahead Adder Steps of operation: All P and G signals are initially generated. Since both XOR and AND can be executed in parallel. Delay = 1T The Carry Look-ahead block will generate the four carry signals C4, C3, C2, C1. Delay = 2T The four XOR gates will generate the Sums. Delay = 1T Total delay before the output can be seen = 4T Compared with the Ripple Adder delay of 9T, this is an improvement of more than 100% CLA adders are implemented as 4-bit modules, that can together be used for implementing larger circuits