Fall 2004EE 3563 Digital Systems Design EE 3563 Comparators  Comparators determine if two binary inputs are equal  Some will signal greater than/less.

Slides:



Advertisements
Similar presentations
Kuliah Rangkaian Digital Kuliah 7: Unit Aritmatika
Advertisements

Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
EET 1131 Unit 7 Arithmetic Operations and Circuits
Comparator.
Lab 10 : Arithmetic Systems : Adder System Layout: Slide #2 Slide #3 Slide #4 Slide #5 Arithmetic Overflow: 2’s Complement Conversions: 8 Bit Adder/Subtractor.
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 7 Arithmetic Logic Unit February 19,
DPSD This PPT Credits to : Ms. Elakya - AP / ECE.
Parallel Adder Recap To add two n-bit numbers together, n full-adders should be cascaded. Each full-adder represents a column in the long addition. The.
ECE 331 – Digital System Design
CSE-221 Digital Logic Design (DLD)
Computer Structure - The ALU Goal: Build an ALU  The Arithmetic Logic Unit or ALU is the device that performs arithmetic and logical operations in the.
ECE C03 Lecture 61 Lecture 6 Arithmetic Logic Circuits Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Chapter # 5: Arithmetic Circuits Contemporary Logic Design Randy H
Lecture 8 Arithmetic Logic Circuits
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
1 COMP541 Arithmetic Circuits Montek Singh Mar 20, 2007.
Digital Arithmetic Wen-Hung Liao, Ph.D.. Objectives Perform binary addition, subtraction, multiplication, and division on two binary numbers. Add and.
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Logic Gates Combinational Circuits
Adders, subtractors, ALUs
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
CS 105 Digital Logic Design
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Chapter 6 Digital Arithmetic: Operations and Circuits ECE 221 Intro
3-1 Chapter 3 - Arithmetic Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles of Computer Architecture.
Logical Circuit Design Week 8: Arithmetic Circuits Mentor Hamiti, MSc Office ,
Digital Arithmetic and Arithmetic Circuits
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
Chapter # 5: Arithmetic Circuits
Chapter 6-1 ALU, Adder and Subtractor
Topic: Arithmetic Circuits Course: Digital Systems Slide no. 1 Chapter # 5: Arithmetic Circuits.
5-1 Programmable and Steering Logic Chapter # 5: Arithmetic Circuits.
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Adders, subtractors, ALUs.
CSE 241 Computer Organization Lecture # 9 Ch. 4 Computer Arithmetic Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices X-OR gates and Parity circuits Comparators Adders, subtractors,
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
Combinational Circuits
COMP541 Arithmetic Circuits
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Combinational Logic Design
COMBINATIONAL LOGIC.
Addition, Subtraction, Logic Operations and ALU Design
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
1 Fundamentals of Computer Science Combinational Circuits.
Number Representation (Part 2) Computer Architecture (Fall 2006)
Lecture #23: Arithmetic Circuits-1 Arithmetic Circuits (Part I) Randy H. Katz University of California, Berkeley Fall 2005.
Computer Arthmetic Chapter Four P&H. Data Representation Why do we not encode numbers as strings of ASCII digits inside computers? What is overflow when.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices Adders,subtractors, ALUs.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Arithmetic Circuits I. 2 Iterative Combinational Circuits Like a hierachy, except functional blocks per bit.
Chapter 6. Digital Arithmetic: Operations and Circuits
Computer Arthmetic Chapter Four P&H.
Combinational Circuits
Digital Arithmetic Wen-Hung Liao, Ph.D..
Principles & Applications
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
ECE 331 – Digital System Design
CSE Winter 2001 – Arithmetic Unit - 1
King Fahd University of Petroleum and Minerals
Arithmetic Circuits (Part I) Randy H
EE207: Digital Systems I, Semester I 2003/2004
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
ECE 352 Digital System Fundamentals
Combinational Circuits
Presentation transcript:

Fall 2004EE 3563 Digital Systems Design EE 3563 Comparators  Comparators determine if two binary inputs are equal  Some will signal greater than/less than as well –These are called magnitude comparators  An XOR gate is a 1-bit comparator  If the inputs are equal, the output is zero –You could say it has an active high “not equal” signal or an active low “equal” signal

Fall 2004EE 3563 Digital Systems Design EE 3563 Comparators  Comparators can be cascaded as well  The “diff” signal is propagated to the next comparator  This is similar to the ripple carry adder that we will examine shortly  The 74x85 is an MSI 4-bit comparator that has three outputs: –greater than, less than, equal  The 74x682 is an 8-bit comparator that has two outputs: –greater than, equal –These outputs could be used to determine less than, less than or equal, and greater than or equal What would you do to determine less than?

Fall 2004EE 3563 Digital Systems Design EE3563 Adders, Subtractors, ALUs  An adder – well, you all know what an adder is!  The adders work well for two’s complement and unsigned binary numbers  Refresher: 8-bit binary –152 – – unsigned –If you want to represent 152 as a signed number, then you need at least 9 bits! –The above binary number could also be considered a two’s complement signed number (-104)  The binary adders/subtractors do NOT work with sign- magnitude representation –Certainly, circuitry could be developed to do that, but it would have to handle the “negative 0” situation

Fall 2004EE 3563 Digital Systems Design EE3563 Adders, Subtractors, ALUs  A half adder adds two, 1-bit operands producing a 2-bit sum  The low order bit of the sum is called the half sum  The high order bit is called the carry out  add: X=1 + Y=1  Half Sum: X xor Y = X*Y’ + X’*Y  Carry Out: X*Y  In order to add larger numbers, need a “Carry In” also  This is called a Full Adder

Fall 2004EE 3563 Digital Systems Design EE3563 Full Adders  Sum = X xor Y xor CIN == X*Y’*CIN’ + X’*Y*CIN’ + X’*Y’*CIN + X*Y*CIN  COUT = X*Y + X*CIN + Y*CIN

Fall 2004EE 3563 Digital Systems Design EE3563 Full Adders  A Ripple Adder is simply a cascaded set of full adders  Each Carry Out feeds into the succeeding Carry In  The LSB Carry In is cleared  The ripple adder is slow since the carry must propagate through all the stages, i.e. a correct result will not be guaranteed to appear until that carry has propagated

Fall 2004EE 3563 Digital Systems Design EE3563 Subtractors  The full subtractor is very similar to the adder –The Carry In/Out is called the Borrow In/Out –The result is called the “difference” –The LSB Borrow In is set to one  D = X xor Y xor BIN  BOUT = X’*Y + X’*BIN + Y*BIN  Basically, we can subtract by adding the two’s complement of the subtrahend –in X-Y, X is the minuend, and Y is the subtrahend  The two’s complement of Y is Y’ + 1, hence the BIN is set to 1, and the inputs for Y are inverted  Which common type of gate allows us to control the inversion?

Fall 2004EE 3563 Digital Systems Design EE3563 Subtractors  The 8-bit adder/subtractor I did for VLSI used this technique  In order to add, should the Add/Subtract pin be high or low?  Note that the initial CIN should be 1 for subtraction, and 0 for addition – can we use the Add/Subtract input for this?

Fall 2004EE 3563 Digital Systems Design EE3563 Carry Lookahead Adder  The carry lookahead adder was developed to overcome the shortcomings of the ripple adder  Basically, all the carry bits are calculated in parallel with the sum bits  There is a “generate” signal which means that a carry out is produced at a particular stage independent of the previous inputs –In other words, ignore any Carry In signal –Both inputs at this stage must be 1  There is a “propagate” signal which means that a carry out is produced when the Carry In is 1 –Either or both inputs are 1 and the Carry In is 1  g i = X i * Y i, p i = X i + Y i –“i” is the stage

Fall 2004EE 3563 Digital Systems Design EE3563 Carry Lookahead Adder  The Carry Out of a stage can be written in terms of the generate and propagate signals:  c i+1 = g i + p i * c i  Applying this concept recursively, we can develop a three- level circuit to produce the carry signal at each stage –One level is for the generate and propagate signals –The other two levels are for the sum of products equations  The equations for the first four stages can be found on p.435

Fall 2004EE 3563 Digital Systems Design EE3563 MSI Adders  The 74x283 is a 4-bit binary adder that uses the carry lookahead technique  The 74x83 is identical except for non-standard pinout  The half sum can be produced more cheaply from the generate and propagate signals, so this eliminates the need for XOR gates  The 74x283 adder can be cascaded to form an adder that can handle more bits

Fall 2004EE 3563 Digital Systems Design EE3563 MSI Arithmetic Logic Units (ALU)  The ALU is the heart of a microprocessor  It performs a variety of mathematical and logic functions –ADD, SUB, AND, OR, XOR, and current CPUs do MUL, DIV  All of the above functions can be performed using combinational logic  Other functions will be examined when we reach chapter 7  The 74x181 4-bit ALU has a series of built-in functions

Fall 2004EE 3563 Digital Systems Design EE3563 MSI Arithmetic Logic Units (ALU)