Adders Computer Organization I 1 August 2009 ©2006-09 McQuain, Feng & Ribbens 1-bit Full Adder The expressions for the sum and carry lead to the.

Slides:



Advertisements
Similar presentations
Lecture 13: Sequential Circuits
Advertisements

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.
Morgan Kaufmann Publishers
Introduction So far, we have studied the basic skills of designing combinational and sequential logic using schematic and Verilog-HDL Now, we are going.
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.
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 7 Arithmetic Logic Unit February 19,
Logic Networks …and the card game Boolette
Cosc 2150: Computer Organization Chapter 3: Boolean Algebra and Digital Logic.
DPSD This PPT Credits to : Ms. Elakya - AP / ECE.
Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
ECE 331 – Digital System Design
CSE-221 Digital Logic Design (DLD)
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
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
4-bit adder, multiplexer, timing diagrams, propagation delays
Propositional Calculus Math Foundations of Computer Science.
Quine-McCluskey Computer Organization I 1 March 2010 © McQuain Introduction Recall that the procedure we've seen for forming a Boolean function.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Binary Addition CSC 103 September 17, 2007.
CS1Q Computer Systems Lecture 8
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
IKI a-Combinatorial Components Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture Notes.
Chapter 6-1 ALU, Adder and Subtractor
Digital Logic Computer Organization 1 © McQuain Logic Design Goal:to become literate in most common concepts and terminology of digital.
CHAPTER 4 Combinational Logic
Circuit Delays. Outline  Calculation of Circuit Delays  Faster Circuits  Look-Ahead Carry Adder.
1 Arithmetic Logic Unit ALU. 2 The Bus Concept 3 CPU Building Blocks  Registers (IR, PC, ACC)  Control Unit (CU)  Arithmetic Logic Unit (ALU)
Computing Systems Designing a basic ALU.
CHAPTER 4 Combinational Logic Design- Arithmetic Operation (Section 4.6&4.9)
Digital Logic. 2 Abstractions in CS (gates) Basic Gate: Inverter IO IO GNDI O Vcc Resister (limits conductivity) Truth Table.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
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.
COMP541 Arithmetic Circuits
Combinational Circuits
Topics covered: Arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Computer Architecture Lecture 16 Fasih ur Rehman.
Computer Architecture
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.
1 IKI20210 Pengantar Organisasi Komputer Kuliah No. 23: Aritmatika 18 Desember 2002 Bobby Nazief Johny Moningka
Gates & Logic Computer Organization I 1 August 2009 © McQuain, Feng & Ribbens Logic Design Goal:to become literate in most common concepts.
Number Systems and Circuits for Addition – Binary Adders Lecture 6 Section 1.5 Fri, Jan 26, 2007.
Counters Computer Organization I 1 June 2010 © McQuain, Feng & Ribbens JK Flip-flop The JK flip-flop takes two data inputs and updates its.
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.
LECTURE 4 Logic Design. LOGIC DESIGN We already know that the language of the machine is binary – that is, sequences of 1’s and 0’s. But why is this?
Number Representation (Part 2) Computer Architecture (Fall 2006)
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
EEL 5722 FPGA Design Fall 2003 Digit-Serial DSP Functions Part I.
Topic: N-Bit parallel and Serial adder
C OMBINATIONAL L OGIC D ESIGN 1 Eng.Maha AlGubali.
Electrical Engineering Engineering the Future Digital Circuits Fundamentals Hands-on Full-Adder Simulation (afternoon)
Explain Half Adder and Full Adder with Truth Table.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
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.
Combinational Circuits
CSE Winter 2001 – Arithmetic Unit - 1
Lecture 14 Logistics Last lecture Today
Week 7: Gates and Circuits: PART II
Digital Logic.
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Composing the Elements
Digital Logic.
Lecture 14 Logistics Last lecture Today
Combinational Circuits
ECE 352 Digital System Fundamentals
Adder and Subtractors Discussion D4.1. Adder and Subtractor Circuits Objective: (i) To construct half and full adder circuit and verify its working (ii)
Presentation transcript:

Adders Computer Organization I 1 August 2009 © McQuain, Feng & Ribbens 1-bit Full Adder The expressions for the sum and carry lead to the following unified implementation: This implementation requires only two levels of logic (ignoring the inverters as customary). Is there an alternative design that requires fewer AND/OR gates? If so, how many levels does it require?

Adders Computer Organization I 2 August 2009 © McQuain, Feng & Ribbens LogiSim Implementation The previous circuit is easily implemented in LogiSim.

Adders Computer Organization I 3 August 2009 © McQuain, Feng & Ribbens LogiSim Analysis Tool The Project menu contains an option to analyze the circuit. You may find these useful in verifying the correctness of a circuit.

Adders Computer Organization I 4 August 2009 © McQuain, Feng & Ribbens 1-bit Full Adder as a Module When building more complex circuits, it is useful to consider sub-circuits as individual, "black-box" modules. For example:

Adders Computer Organization I 5 August 2009 © McQuain, Feng & Ribbens Chaining an 8-bit Adder An 8-bit adder build by chaining 1-bit adders: This has one serious shortcoming. The carry bits must ripple from top to bottom, creating a lag before the result will be obtained for the final sum bit and carry.

Adders Computer Organization I 6 August 2009 © McQuain, Feng & Ribbens Computing the Carry Bits Any Boolean function can be computed using two levels of logic gates (not counting inverters)… why? Let's consider the problem of adding two 8-bit operands, A and B, and label the bits of each as: Therefore, it should be possible to compute all of the carry bits needed by the preceding 8- bit adder using only two levels of logic gates, and that should provide a way to speed up the computation of the final result… Similarly, label the relevant carry bits as: And finally, label the sum bits as: Normally 0!

Adders Computer Organization I 7 August 2009 © McQuain, Feng & Ribbens Computing the Carry Bits We can derive some interesting (Boolean) results for the carry bits: But… this shows c 2 as dependent on first knowing c 1 … which is the ripple carry logic. However, if we substitute we can show: And that gives us c 2 in two levels of logic gates… but imagine how complex the formulas would be for the higher-order carry bits…

Adders Computer Organization I 8 August 2009 © McQuain, Feng & Ribbens Abstraction Take the original (generalized) carry equation and factor it: Then, if we rewrite the formula for c 2, we have: where: We call the latter terms the generate and propagate factors.

Adders Computer Organization I 9 August 2009 © McQuain, Feng & Ribbens Generate and Propagate We can then express the general carry bit formula: The formula indicates that if g i = 1 then the adder generates a carry-out no matter what the value of the carry-in c i might be. Moreover, if p i = 1, then if there is a carry-in, the adder propagates a carry-out to the next position no matter what the generate bit g i might be. So we can show that: Now, note that we can calculate all the g's and p's in one level of logic from the bits of the two operands, so we can calculate these four carry bits in just three levels of logic. But… this will still get very complex if we try to find higher-order carry bits…

Adders Computer Organization I 10 August 2009 © McQuain, Feng & Ribbens 4-bit Fast-Carry Adder We can build a 4-bit adder using the fast-carry logic shown on the previous slide: Computes the four carry bits in three levels of logic… …carry bits are then fed to the four adders… …which then compute the sum bits

Adders Computer Organization I 11 August 2009 © McQuain, Feng & Ribbens A Higher-level Abstraction The formulas grow too complex to make this approach ideal for building a practical (wider) adder… however, we can consider cascading four of the 4-bit fast-carry adders to implement a 16-bit adder. To do this, we must consider the carry bits that must be generated for each of the 4-bit adders. We can adapt the approach used above to create a higher-level fast-carry logic unit to generate those carry bits quickly as well. See Appendix C.6 in P&H for the details.