Fast Carry Algorithm a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 c0.

Slides:



Advertisements
Similar presentations
1 ECE 4436ECE 5367 Computer Arithmetic I-II. 2 ECE 4436ECE 5367 Addition concepts 1 bit adder –2 inputs for the operands. –Third input – carry in from.
Advertisements

CCCC 8 CCCC CCCC 8 CCCC.
Chapter 4 -- Modular Combinational Logic. Decoders.
Chapter 4 -- Modular Combinational Logic
Case study 1: Calculate the approximation of Pi
1 Lecture 12: Hardware for Arithmetic Today’s topics:  Designing an ALU  Carry-lookahead adder Reminder: Assignment 5 will be posted in a couple of days.
n-bit comparator using 1-bit comparator
CCCC CCCC CCCC CCCC.
AP Biology Probability & Genetics AP Biology Probability & genetics  Calculating probability of making a specific gamete is just like calculating the.
Lecture 20: Hardware for Arithmetic Today’s topic –Carry Look-Ahead Adder 1.
Contemporary Logic Design Multi-Level Logic © R.H. Katz Transparency No Chapter # 3: Multi-Level Combinational Logic 3.3 and Time Response.
San Jose State University Department of Electrical Engineering Dec 5th, Fall 2005 EE 166 PROJECT Advisor: Prof. David Parent Group Members Radhika Arora,
331 W07.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 7 ALU Design [Adapted from Dave Patterson’s UCB CS152 slides.
A 3 A 3 A 3 A 3 B 3 B 3 B 3 B 3.
© Yohai Devir 2007 Fast Arithmetics. © Yohai Devir 2007 Full Adder Cout AiAi BiBi SiSi Cin.
Let A = {1,2,3,4} and B = {a,b,c}. Define the relation f from A to B by f = {(1,b), (2,a), (3,c), (4,b)}. Is f a function? (1) Yes (2) No.
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Calcul mental. Calcul n°1 2 x 7 = Calcul n°2 3x 7 =
Circular measure Area of a Circle Definition of radians Click on a topic Area of a Sector Exit Definition of 
© T Madas. The Cosine Rule © T Madas A B C a b c a2a2 = b2b2 + c2c2 – 2 b ccosA b2b2 = a2a2 + c2c2 – 2 a ccosB c2c2 = a2a2 + b2b2 – 2 a bcosC The cosine.
Carry look ahead adder P (I) = a(I) xor b(I); G(I) = a(I) and b(I); S(I) = p(I) xor c(I); Carry(I+1) = c(I)p(I) + g(I)
Computing Systems Designing a basic ALU.
درس مدارهای منطقی دانشگاه قم مدارهای منطقی محاسباتی تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه.
COE 202: Digital Logic Design Combinational Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem.
1 Lecture 12 Time/space trade offs Adders. 2 Time vs. speed: Linear chain 8-input OR function with 2-input gates Gates: 7 Max delay: 7.
Building a Faster Adder
Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture Arithmetic: Part II.
1 Lecture 12: Adders, Sequential Circuits Today’s topics:  Carry-lookahead adder  Clocks, latches, sequential circuits.
1 Carry Lookahead Logic Carry Generate Gi = Ai Bi must generate carry when A = B = 1 Carry Propagate Pi = Ai xor Bi carry in will equal carry out here.
Functional Dependencies CIS 4301 Lecture Notes Lecture 8 - 2/7/2006.
2/16/ Pascal’s Triangle. Pascal’s Triangle For any given value of n, there are n+1 different calculations of combinations: 0C00C00C00C0 1C01C01C01C0.
© A B C D 78 A1A2A3A4 B1 B2 B3B4 C1C2 C3C4 D1D2D3D4 A5A6A7A8 B5B6B7B8 C5C6C7C8 D5D6D7D8 Questions: Ships Remaining: © 2012.
ELASTIC & INELASTIC Analyzing Collisions. Collisions During a collision, there is a transfer of momentum & energy. To calculate momentum = p ai + p bi.
1 Lecture 11: Hardware for Arithmetic Today’s topics:  Logic for common operations  Designing an ALU  Carry-lookahead adder.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1.
CS 101 Attendance February 2, A computer’s clock speed A.Is one second per second like every other clock B.A measure of how fast signals are being.
Presented by A. Maleki Fall Semester, 2010
BIS 219 Final Exam 6 Sets Check this A+ tutorial guideline at 219/BIS-219-Final-Exam-Guides For more classes visit.
BIS 219 Week 4 DQ 2 What are digital dashboards and management cockpits? What are the capabilities of these information tools? How are global information.
CDA3101 Recitation Section 5
Chapter Contents 3.1 Overview 3.2 Fixed Point Addition and Subtraction
The Basics of Logic Design Patterson & Hennessy, © 2005 Elsevier, Inc.
Lecture 12 Logistics Last lecture Today HW4 due today Timing diagrams
Chapter 4 -- Modular Combinational Logic
Lecture Adders Half adder.
Single Bit ALU 3 R e s u l t O p r a i o n 1 C y I B v b 2 L S f w d O
Carry Look Ahead (CLA).
CS352H: Computer Systems Architecture
Combinational Circuits
THE VOWELS A /ei/ E /i/ I /ai/ O /ou/ U /yu/
الترتيب (l’ordonnancement)
CSE Winter 2001 – Arithmetic Unit - 1
Lecture 12: Adders, Sequential Circuits
Lecture 12: Adders, Sequential Circuits
© T Madas.
Lecture 14 Logistics Last lecture Today
Arithmetic Circuits (Part I) Randy H
Instructor: Prof. Chung-Kuan Cheng
CS 140 Lecture 14 Standard Combinational Modules
A graphing calculator is required for some problems or parts of problems 2000.
CSE 140 Lecture 14 Standard Combinational Modules
Addition and multiplication
Lecture 14 Logistics Last lecture Today
Addition and multiplication
Unit 3 Review (Calculator)
74LS283 4-Bit Binary Adder with Fast Carry
Arithmetic Circuits.
CpE 5110 Principles of Computer Architecture: Arithmetic Logic Unit
Calculate 9 x 81 = x 3 3 x 3 x 3 x 3 3 x 3 x 3 x 3 x 3 x 3 x =
t r.r. B-CASINB-CASIN " It Q t"fll"' ""..... t -" IrIr,, g "!"!,,,c.,.,c '·'·, '.. i, t I... I.
Presentation transcript:

Fast Carry Algorithm a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 c0

a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 Step 1: calculate pi’s, gi’s c0 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 g0 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g15 pi = ai + bi gi = ai∙bi

p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 g0 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g15 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 Step 2: Calculate global Pi’s, Gi’s c0 P0 = p0∙p1∙p2∙p3 G0 = g3+(p3∙g2)+(p3∙p2∙g1)+(p3∙p2∙p1∙g0) P1 = p4∙p5∙p6∙p7 G1 = g7+(p7∙g6)+(p7∙p6∙g5)+(p7∙p6∙p5∙g4) P2 = p8∙p9∙p10∙p11 G2 = g11+(p11∙g10)+(p11∙p10∙g9)+(p11∙p10∙p9∙g8) P3 = p12∙p13∙p14∙p15 G3 = g15+(p15∙g14)+(p15∙p14∙g13)+(p15∙p14∙p13∙g12) P0 G0 P1 G1 P2 G2 P3 G3

p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 g0 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g15 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 Step 3: Calculate global Ci’s c0 C1 = G0+(P0∙c0) C2 = 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) P0 G0 P1 G1 P2 G2 P3 G3 C1C2C3C4

p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 g0 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g15 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 Step 4: Calculate ri’s in groups of 4 c0 r0 = a0+b0+c0 r1 = a1+b1+g0+(p0∙c0) r2 = a2+b2+g1+(p1∙g0)+(p1∙p0∙c0) r3 = a3+b3+g2+(p2∙g1)+(p2∙p1∙g0)+(p2∙p1∙p0∙c0) P0 G0 P1 G1 P2 G2 P3 G3 C1C2C3C4 r0 r1 r2 r3

p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 g0 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g15 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 Step 4: Calculate ri’s in groups of 4 c0 r4 = a4+b4+C1 r5 = a5+b5+g4+(p4∙C1) r6 = a6+b6+g5+(p5∙g4)+(p5∙p4∙C1) r7 = a7+b7+g6+(p6∙g5)+(p6∙p5∙g4)+(p6∙p5∙p4∙C1) P0 G0 P1 G1 P2 G2 P3 G3 C1C2C3C4 r0 r1 r2 r3 r4 r5 r6 r7

p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 g0 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g15 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 Step 4: Calculate ri’s in groups of 4 c0 r8 = a8+b8+C2 r9 = a9+b9+g8+(p8∙C2) r10 = a10+b10+g9+(p9∙g8)+(p9∙p8∙C2) r11 = a11+b11+g10+(p10∙g9)+(p10∙p9∙g8)+(p10∙p9∙p8∙C2) P0 G0 P1 G1 P2 G2 P3 G3 C1C2C3C4 r0 r1 r2 r3r4 r5 r6 r7 r8 r9 r10 r11

p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 g0 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g15 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 Step 4: Calculate ri’s in groups of 4 c0 r12 = a12+b12+C3 r13 = a13+b13+g12+(p12∙C3) r14 = a14+b14+g13+(p13∙g12)+(p13∙p12∙C3) r15 = a15+b15+g14+(p14∙g13)+(p14∙p13∙g12)+(p14∙p13∙p12∙C3) P0 G0 P1 G1 P2 G2 P3 G3 C1C2C3C4 r0 r1 r2 r3r4 r5 r6 r7r8 r9 r10 r11 r12 r13 r14 r15

p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 g0 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g15 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 Example c0 a = b = = = P0 G0 P1 G1 P2 G2 P3 G3 C1C2 C3 C4

p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 g0 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g Example 0 a = b = = = P0 G0 P1 G1 P2 G2 P3 G3 C1C2 C3 C4

p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 g0 g1 g2 g3 g4 g5 g6 g7 g8 g9 g10 g11 g12 g13 g14 g Step 1: calculate pi’s, gi’s 0 P0 G0 P1 G1 P2 G2 P3 G3 C1C2 C3 C4 pi = ai + bi gi = ai∙bi

Step 1: calculate pi’s, gi’s 0 P0 G0 P1 G1 P2 G2 P3 G3 C1C2 C3 C4 pi = ai + bi gi = ai∙bi

Step 2: Calculate global Pi’s, Gi’s 0 P0 G0 P1 G1 P2 G2 P3 G3 C1C2 C3 C4 P0 = p0∙p1∙p2∙p3 G0 = g3+(p3∙g2)+(p3∙p2∙g1)+(p3∙p2∙p1∙g0) P1 = p4∙p5∙p6∙p7 G1 = g7+(p7∙g6)+(p7∙p6∙g5)+(p7∙p6∙p5∙g4) P2 = p8∙p9∙p10∙p11 G2 = g11+(p11∙g10)+(p11∙p10∙g9)+(p11∙p10∙p9∙g8) P3 = p12∙p13∙p14∙p15 G3 = g15+(p15∙g14)+(p15∙p14∙g13)+(p15∙p14∙p13∙g12)

Step 2: Calculate global Pi’s, Gi’s C1C2 C3 C4 P0 = p0∙p1∙p2∙p3 G0 = g3+(p3∙g2)+(p3∙p2∙g1)+(p3∙p2∙p1∙g0) P1 = p4∙p5∙p6∙p7 G1 = g7+(p7∙g6)+(p7∙p6∙g5)+(p7∙p6∙p5∙g4) P2 = p8∙p9∙p10∙p11 G2 = g11+(p11∙g10)+(p11∙p10∙g9)+(p11∙p10∙p9∙g8) P3 = p12∙p13∙p14∙p15 G3 = g15+(p15∙g14)+(p15∙p14∙g13)+(p15∙p14∙p13∙g12)

Step 3: Calculate global Ci’s C1C2 C3 C4 C1 = G0+(P0∙c0) C2 = 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)

Step 3: Calculate global Ci’s C1 = G0+(P0∙c0) C2 = 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)

Step 4: Calculate ri’s in groups of r0 = a0+b0+c0 r1 = a1+b1+g0+(p0∙c0) r2 = a2+b2+g1+(p1∙g0)+(p1∙p0∙c0) r3 = a3+b3+g2+(p2∙g1)+(p2∙p1∙g0)+(p2∙p1∙p0∙c0) 0 1

Step 4: Calculate ri’s in groups of r4 = a4+b4+C1 r5 = a5+b5+g4+(p4∙C1) r6 = a6+b6+g5+(p5∙g4)+(p5∙p4∙C1) r7 = a7+b7+g6+(p6∙g5)+(p6∙p5∙g4)+(p6∙p5∙p4∙C1) 0 0

Step 4: Calculate ri’s in groups of r8 = a8+b8+C2 r9 = a9+b9+g8+(p8∙C2) r10 = a10+b10+g9+(p9∙g8)+(p9∙p8∙C2) r11 = a11+b11+g10+(p10∙g9)+(p10∙p9∙g8)+(p10∙p9∙p8∙C2)

Step 4: Calculate ri’s in groups of r12 = a12+b12+C3 r13 = a13+b13+g12+(p12∙C3) r14 = a14+b14+g13+(p13∙g12)+(p13∙p12∙C3) r15 = a15+b15+g14+(p14∙g13)+(p14∙p13∙g12)+(p14∙p13∙p12∙C3)

Final Result a = b = = = = r =