Logical Circuit Design Week 8: Arithmetic Circuits Mentor Hamiti, MSc Office 305.02,

Slides:



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

DPSD This PPT Credits to : Ms. Elakya - AP / ECE.
Arithmetic Operations and Circuits
Henry Hexmoor1 Chapter 5 Arithmetic Functions Arithmetic functions –Operate on binary vectors –Use the same subfunction in each bit position Can design.
ECE 331 – Digital System Design
ECE C03 Lecture 61 Lecture 6 Arithmetic Logic Circuits Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
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.
Chapter 7 Arithmetic Operations and Circuits Hexadecimal Arithmetic 4 binary bits represent a single hexadecimal digit Addition –Add the digits.
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
ReVieW Combinational & Sequential Logic Circuit EKT 221 / 4 DIGITAL ELECTRONICS II.
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.
Chap 3. Chap 3. Combinational Logic Design. Chap Combinational Circuits l logic circuits for digital systems: combinational vs sequential l Combinational.
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
Digital Arithmetic and Arithmetic Circuits
Introduction to Chapter 6  Digital circuits are frequently used for arithmetic operations  Fundamental arithmetic operations on binary numbers and digital.
Power Point Presentation Donald Bearden CS 147 September 13, 2001.
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
Fall 2004EE 3563 Digital Systems Design EE 3563 Comparators  Comparators determine if two binary inputs are equal  Some will signal greater than/less.
Chapter 6-1 ALU, Adder and Subtractor
1 Adders & Subtractors Adders –An adder is a combinational logic circuit that performs the addition of 2 binary numbers (A & B) to generate the sum (S)
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.
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.
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices X-OR gates and Parity circuits Comparators Adders, subtractors,
1 CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits 4-1,2: Iterative Combinational Circuits and Binary Adders.
Combinational Circuits
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
Topics covered: Arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
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
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
1 Fundamentals of Computer Science Combinational Circuits.
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.
CS151 Introduction to Digital Design Chapter 4: Arithmetic Functions and HDLs 4-1: Iterative Combinational Circuits 4-2: Binary Adders 1Created by: Ms.Amany.
Topic: N-Bit parallel and Serial adder
Explain Half Adder and Full Adder with Truth Table.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Addition and multiplication1 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.
Chapter 6. Digital Arithmetic: Operations and Circuits
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Combinational Circuits
Digital Arithmetic Wen-Hung Liao, Ph.D..
Part 4 Combinational Logic.
Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates,
Combinational Logic Circuits
Principles & Applications
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
Combinational Circuits
Digital System Design Combinational Logic
Chapter-4 Combinational Logic
Half & Full Subtractor Half Subtractor Full Subtractor.
Half & Full Subtractor Half Subtractor Full Subtractor.
Presentation transcript:

Logical Circuit Design Week 8: Arithmetic Circuits Mentor Hamiti, MSc Office ,

2 Last Time  Combinational Logic Circuits Decoders Encoders Multiplexers De-multiplexers Code converters Comparators

3 Contents  Combinational Arithmetic Circuits Adders Sub tractors Multipliers Dividers Other Circuits

4 Combinational Arithmetic Circuits  Arithmetic circuits are the ones which perform arithmetic operations like: addition, subtraction, multiplication, division, parity calculation, etc.  Most of the time, designing these circuits is the same or similar as designing: Encoders, Decoders, Multiplexers, De-multiplexers, Code converters, etc.

5 Adders  Adders are the basic building blocks of all arithmetic circuits  Adders add two binary numbers and give out sum and carry as output Example: X + Y = S + c  Basically we have two types of adders: Half Adder. Full Adder.

6 Half Adder  Adding two single-bit binary values X, Y produces a sum S bit and a carry out C-out bit. This operation is called half addition and the circuit to realize it is called a half adder.  Truth Table: S (X,Y) =m 1 (1,2) = X'Y+XY‘ = X Y CARRY(X,Y) =m 1 (3) = X·Y XYSUMCARRY

7 Half Adder S(X,Y) =m 1 (1,2) = X'Y+XY‘ = X Y CARRY(X,Y) =m 1 (3) = X·Y Circuit: Symbol:

8 Full Adder  Full adder takes a three-bits input. Adding two single-bit binary values X, Y with a carry input bit C-in produces a sum bit S and a carry out C-out bit.  Truth Table: K-Diagrams: SUM=X Y Z C=XY+YZ+XZ XYZSUMCARRY

9 Full Adder SUM = X Y Z Symbol: CARRY = XY+YZ+XZ

10 n-bit (Carry Ripple) Adder  An n-bit adder used to add two n-bit binary numbers can be built by connecting n full adders in series. Each full adder represents a bit position j (from 0 to n-1).  Each carry out C-out from a full adder at position j is connected to the carry in C-in of the full adder at higher position j+1. The output of a full adder at position j is given by: S j = X j Y j C j C j+1 = X j ·Y j + X j · C j + Y j · C j  In the expression of the sum C j must be generated by the full adder at lower position j. The propagation delay in each full adder to produce the carry is equal to two gate delays = 2 D. Since the generation of the sum requires the propagation of the carry from the lowest position to the highest position, the total propagation delay of the adder is approximately: Total Propagation delay = 2 nD

11 4-bit Carry Ripple Adder  Adds two 4-bit numbers: X = X 3 X 2 X 1 X 0 Y = Y 3 Y 2 Y 1 Y 0  Producing the sum: S = S 3 S 2 S 1 S 0, C out = C 4 from the most significant position j=3 Total Propagation delay = 2 nD = 8D or 8 gate delays!

12 Larger Adder  Example: 16-bit adder using 4x4-bit adders. Adds two 16-bit inputs X (bits X 0 to X 15 ), Y (bits Y 0 to Y 15 ) producing a 16-bit Sum S (bits S 0 to S 15 ) and a carry out C 16 from the most significant position  Propagation delay for 16-bit adder = 4 x propagation delay of 4-bit adder = 4 x 2 nD = 4 x 8D = 32 D or 32 gate delays

13 Carry Look-Ahead Adder  The delay generated by an N-bit adder is proportional to the length N of the two numbers X and Y that are added because the carry signals have to propagate from one full-adder to the next.  For large values of N, the delay becomes unacceptably large so that a special solution needs to be adopted to accelerate the calculation of the carry bits.  This solution involves a "look-ahead carry generator" which is a block that simultaneously calculates all the carry bits involved.  The design of the look-ahead carry generator involves two Boolean functions named Generate and Propagate. For each input bits pair these functions are defined as: G i = X i · Y i P i = X i + Y i

14 Carry Look-Ahead Adder  For a four-bit adder the carry-outs are calculated as follows: carry_out0 = G0 + P0. carry_in0 carry_out1 = G1 + P1. carry_out0 = G1 + P1G0 + P1P0. carry_in0 carry_out2 = G2 + P2G1 + P2P1G0 + P2P1P0. carry_in0 carry_out3 = G3 + P3G2 + P3P2G1 + P3P2P1G0 + P3P2P1. carry_in0

15 Subtractor  Subtractor circuits take two binary numbers as input and subtract one binary number input from the other binary number input.  Similar to adders, it gives out two outputs, difference and borrow.  There are two types of subtracters: Half Subtracter. Full Subtracter.

16 Half Subtracter  The half-subtracter is a combinational circuit which is used to perform subtraction of two bits.  It has two inputs, X (minuend) and Y (subtrahend) and two outputs D (difference) and B (borrow).  Truth Table:Boolean expressions: Difference = XY’+X’Y Borrow = X’ Y XYDB

17 Half Subtracter Difference = XY’+X’Y Borrow = X’ Y Circuit: Symbol:

18 Full Subtracter  A full subtracter is a combinational circuit that performs subtraction involving three bits, namely minuend, subtrahend, and borrow-in.  Truth Table: D = X Y B in B = X’Y + X’B in + YB in XYB in DB out

19 Full Subtracter D = X Y Bin B = X’Y + X’B in + YB in  Circuit: Symbol:

20 Full Subtracter  Full subtractor composed by 2 half substractors:

21 Parallel Binary Subtracter  Parallel binary subtracter can be implemented by cascading several full-subtracters.  Block level representation of a 4-bit parallel binary subtracter, which subtracts 4-bit Y3Y2Y1Y0 from 4-bit X3X2X1X0. It has 4- bit difference output D3D2D1D0 with borrow output B out

22 Serial Binary Subtracter  A serial subtracter can be obtained by converting the serial adder using the 2's complement system.  The subtrahend is stored in the Y register and must be 2's complemented before it is added to the minuend stored in the X register.   The circuit for a 4-bit serial subtracter using full-adder:

23 Multipliers  Multiplication is achieved by adding a list of shifted multiplicands according to the digits of the multiplier.  An n-bit X n-bit multiplier can be realized in combinational circuitry by using an array of n-1 n-bit adders where each adder is shifted by one position.  For each adder one input is the shifted multiplicand multiplied by 0 or 1 (using AND gates) depending on the multiplier bit, the other input is n partial product bits.

24 Dividers  The binary divisions are performed in a very similar manner to the decimal divisions.  Thus, the second number is repeatedly subtracted from the figures of the first number after being multiplied either with '1' or with '0'.  The multiplication bit ('1' or '0') is selected for each subtraction step in such a manner that the subtraction result is not negative.  The division result is composed from all the successive multiplication bits while the remainder is the result of the last subtraction step.

25 Other Circuits  Adder/Subtractor

26 Other Circuits  Arithmetic-Logic Unit (ALU) Arithmetic Extender (AE) Logic Extender (LE)

27 Logical Circuit Design  Questions?!