Kuliah Rangkaian Digital Kuliah 7: Unit Aritmatika

Slides:



Advertisements
Similar presentations
ADDER, HALF ADDER & FULL ADDER
Advertisements

Modular Combinational Logic
Introduction So far, we have studied the basic skills of designing combinational and sequential logic using schematic and Verilog-HDL Now, we are going.
Chapter 4 -- Modular Combinational Logic. Decoders.
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
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.
DPSD This PPT Credits to : Ms. Elakya - AP / ECE.
Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Henry Hexmoor1 Chapter 5 Arithmetic Functions Arithmetic functions –Operate on binary vectors –Use the same subfunction in each bit position Can design.
ECE 301 – Digital Electronics
Adders.
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.
Lecture # 12 University of Tehran
Adders, subtractors, ALUs
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
 Arithmetic circuit  Addition  Subtraction  Division  Multiplication.
CS 105 Digital Logic Design
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Logical Circuit Design Week 8: Arithmetic Circuits Mentor Hamiti, MSc Office ,
F = ∑m(1,4,5,6,7) F = A’B’C+ (AB’C’+AB’C) + (ABC’+ABC) Use X’ + X = 1.
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
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Adders, subtractors, ALUs.
Lecture 9 Topics: –Combinational circuits Basic concepts Examples of typical combinational circuits –Half-adder –Full-adder –Ripple-Carry adder –Decoder.
CSE115: Digital Design Lecture 20: Comparators, Adders and Subtractors Faculty of Engineering.
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
درس مدارهای منطقی دانشگاه قم مدارهای منطقی محاسباتی تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه.
Arithmetic Functions BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
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,
Morgan Kaufmann Publishers
Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
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)
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
Sneha.  A combinational circuit that performs the addition of two bits is called a half adder.  It has two inputs.  It has two outputs.
IT253: Computer Organization
Computer Science 101 More Devices: Arithmetic. From 1-Bit Equality to N-Bit Equality = A B A = B Two bit strings.
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices Adders,subtractors, ALUs.
1 The ALU l ALU includes combinational logic. –Combinational logic  a change in inputs directly causes a change in output, after a characteristic delay.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Arithmetic Circuits I. 2 Iterative Combinational Circuits Like a hierachy, except functional blocks per bit.
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
ECE 3130 Digital Electronics and Design
Combinational Circuits
Reference: Moris Mano 4th Edition Chapter 4
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.
Combinational Circuits
CSE Winter 2001 – Arithmetic Unit - 1
Number Systems and Circuits for Addition
By: A. H. Abdul Hafez CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU
Adders and Subtractors
COMS 361 Computer Organization
DIGITAL ELECTRONICS B.SC FY
ECE 352 Digital System Fundamentals
Combinational Circuits
XOR Function Logic Symbol  Description  Truth Table 
Arithmetic Circuits.
Adder Circuits By: Asst Lec. Basma Nazar
2's Complement Arithmetic
Presentation transcript:

Kuliah Rangkaian Digital Kuliah 7: Unit Aritmatika Teknik Komputer Universitas Gunadarma

Topic #7 – Arithmetic Units Comparator Adders Half-adder & Full-adder Carry-ripple adder & carry-look-ahead adder Overflow detection Subtractor Multiplier

(Equality) Comparators (using XOR) 1-bit comparator 4-bit comparator

Half adder Adds two 1-bit input to produce a sum and a carry-out Does not account for carry-in S = X’·Y + X·Y = XY Cout = X·Y Inputs Outputs Y 1 S X Cout X Y S Cout

Full adder Building block to realize binary arithmetic operations 1-bit-wide adder with carry-in, produces sum and carry-out Truth table: X Y Cin S Cout 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1

Designing full adder 1 00 01 11 10 Cout S 1 00 01 11 10 Cin X 1 00 01 11 10 Y XY 2 3 6 7 4 5 Cout S Cin X 1 00 01 11 10 Y XY 2 3 6 7 4 5 S = X’·Y’·(Cin) + X·Y’·(Cin)’ + X·Y’·(Cin)’ + X·Y·(Cin) = X Å Y Å (Cin) Cout = XY + X(Cin) + Y(Cin)

Resulting circuit

Alternative: full adder using AND-OR X’Y’C-in XY’C-in’ Sum S X’YC-in’ XYC-in X’ X Y’ Y C-in C-in’ X X’ Y Y’ C-in C-in’ Full Adder X Y S C-in C-out XY YC-in C-out XC-in X Y C-in

Q: Do we need C4 for a 4-bit 2’s complement addition? Ripple adder Speed limited by carry chain 2 per full adder  2n for an n-bit adder Approach: eliminate or reduce carry chain Carry look-ahead: compute Cin directly from external inputs Q: Do we need C4 for a 4-bit 2’s complement addition?

Carry look-ahead adder Let Ci+1 = (Xi·Yi)+ (Xi+Yi)· Ci = Gi + Pi · Ci For a 4-bit adder … C1 = G0 + P0·C0 C2 = G1 + P1·C1 = G1 + P1·G0 + P1·P0·C0 C3 = G2 + P2·G1 + P2·P1·G0 + P2·P1·P0·C0 C4 = G3 + P3·G2 + P3·P2·G1 + P3·P2·P1·G0 + P3·P2·P1·P0·C0 where Gi = Xi · Yi Pi = Xi + Yi This is a 3 level circuit including generating the Gs and Ps Rule of thumb: one carry look-ahead circuit every 4-bit

Carry look-ahead circuit Gs and Ps are also useful for generating the sums

16-bit carry ripple adder

16-bit carry look-ahead adder

Subtraction Recall our discussion on subtraction for 2’s complement … X – Y = X + Y + 1 Invert all bits of Y and set Cin to 1 Example: 4-bit subtractor using 4-bit adder Add a control circuit in ALU s.t. same circuit can be used for both addition and subtraction 4-bit Adder X3 X2 X1 X0 D3 D2 D1 D0 C-in C-out C4 Y3 Y2 Y1 Y0 C0 = 1 S3 S2 S1 S0

Multipliers 8x8 multiplier

Full-adder array

Faster carry chain

Binary Multiplication An n-bit X n-bit multiplier can be realized in combinational circuitry by using an array of n-1 n-bit adders where is adder is shifted by one position. For each adder one input is the multiplied by 0 or 1 (using AND gates) depending on the multiplier bit, the other input is n partial product bits. X3 X2 X1 X0 x Y3 Y2 Y1 Y0 __________________________ X3.Y0 X2.Y0 X1.Y0 X0.Y0 X3.Y1 X2.Y1 X1.Y1 X0.Y1 X3.Y2 X2.Y2 X1.Y2 X0.Y2 X3.Y3 X2.Y3 X1.Y3 X0.Y3 _______________________________________________________________________________________________________________________________________________ P7 P6 P5 P4 P3 P2 P1 P0

4x4 Array Multiplier