Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Schematics adapted from those provided by the authors Hennessey and Patterson.

Slides:



Advertisements
Similar presentations
Lecture 19: Hardware for Arithmetic Today’s topic –Designing an ALU –Carry Look-Ahead Adder 1.
Advertisements

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.
Tutorial: Wednesday Week 3 Hand in on Monday, Do the questions for tutorials 1 & 2 at the back of the course notes (answers to tutorial 3 will be published.
Fast Adders See: P&H Chapter 3.1-3, C Goals: serial to parallel conversion time vs. space tradeoffs design choices.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Arithmetic See: P&H Chapter 3.1-3, C.5-6.
Binary Addition. Binary Addition (1) Binary Addition (2)
ECE 331 – Digital System Design
CS61C L23 Combinational Logic Blocks (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
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.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 6 - Logic &
Chap 3.3~3.5 Construction an Arithmetic Logic Unit (ALU) Jen-Chang Liu, Spring 2006.
Lecture 8 Arithmetic Logic Circuits
CS61C L23 Combinational Logic Blocks (1) Garcia, Fall 2006 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c UC.
© Yohai Devir 2007 Fast Arithmetics. © Yohai Devir 2007 Full Adder Cout AiAi BiBi SiSi Cin.
Homework Reading Machine Projects Labs
ECE 301 – Digital Electronics
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 4 – Arithmetic Functions Logic and Computer.
Computer Science 210 Computer Organization The Arithmetic Logic Unit.
Prof. Hakim Weatherspoon CS 3410, Spring 2015 Computer Science Cornell University See: P&H Chapter 2.4, 3.2, B.2, B.5, B.6.
CSC321 Emulate a 4-Bit ALU in Java A0A0 A1A1 A2A2 A3A3 B0B0 B1B1 B2B2 B3B3 S0S0 S1S1 S2S2 S3S3 C in ILIL IRIR C out OV 4-Bit ALU S0S0 S1S1 S2S2 S3S3 Sum.
Computer System Configuration and Function Computer Architecture and Design Lecture 6.
ADDERS Half Adders Recall that the basic rules of binary addition are as indicated below in Table 2-9. A circuit known as the half-adder carries out these.
Chapter 6-1 ALU, Adder and Subtractor
Acknowledgement: Overheads adapted from those provided by the authors of the textbook Logic Circuits Mehmet Can Vuran, Instructor University of Nebraska-Lincoln.
CS61C L26 Combinational Logic Blocks (1) Garcia, Spring 2014 © UCB Very fast 3D Micro Printer  A new company called Nanoscribe has developed a fabrication.
Digital Electronics Lecture 6 Combinational Logic Circuit Design.
Numbers and Arithmetic Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University See: P&H Chapter , 3.2, C.5 – C.6.
1 Arithmetic Logic Unit ALU. 2 The Bus Concept 3 CPU Building Blocks  Registers (IR, PC, ACC)  Control Unit (CU)  Arithmetic Logic Unit (ALU)
CS3350B Computer Architecture Winter 2015 Lecture 5.4: Combinational Logic Blocks Marc Moreno Maza [Adapted from lectures.
DIGITAL CIRCUITS David Kauchak CS52 – Fall 2015.
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.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1.
Ch3b- 2 EE/CS/CPE Computer Organization  Seattle Pacific University There is logic to it andRd, Rs, RtRd
The Karnaugh Map.
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
MIPS ALU. Building from the adder to ALU ALU – Arithmetic Logic Unit, does the major calculations in the computer, including – Add – And – Or – Sub –
CPE 232 MIPS Arithmetic1 CPE 232 Computer Organization MIPS Arithmetic – Part I Dr. Gheith Abandah [Adapted from the slides of Professor Mary Irwin (
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
ALU & CPU Computer Architecture. Introducing ALU ALU: Arithmetic & Logic Unit –Performs arithmetic operations Addition Subtraction –Performs logic operations.
Computer Architecture
CPEN Digital System Design
Addition, Subtraction, Logic Operations and ALU Design
Registers and Binary Arithmetic Prof. Sirer CS 316 Cornell University.
Cpu control.1 2/14 Datapath Components for Lab The Processor! ( th ed)
Numbers and Arithmetic Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University See: P&H Chapter , 3.2, C.5 – C.6.
Chapter 3 Digital Logic Structures
Gates AND, OR, NOT NAND, NOR Combinational logic No memory A set of inputs uniquely and unambiguously specifies.
1 Lecture 11: Hardware for Arithmetic Today’s topics:  Logic for common operations  Designing an ALU  Carry-lookahead adder.
Number Representation (Part 2) Computer Architecture (Fall 2006)
MIPS ALU. Exercise – Design a selector? I need a circuit that takes two input bits, a and b, and a selector bit s. The function is that if s=0, f=a. if.
President UniversityErwin SitompulDigital Systems 7/1 Lecture 7 Digital Systems Dr.-Ing. Erwin Sitompul President University
1 Chapter 4: Arithmetic for Computers (Part 2) CS 447 Jason Bakos.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Combinational Circuits
ECE 3130 Digital Electronics and Design
Lecture 11: Hardware for Arithmetic
MIPS ALU.
Instructors: Randy H. Katz David A. Patterson
5. Combinational circuits
MIPS ALU.
EEL 3705 / 3705L Digital Logic Design
Lecture 11: Hardware for Arithmetic
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Digital Logic.
Combinational Circuits
MIPS ALU.
MIPS ALU.
Presentation transcript:

Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Schematics adapted from those provided by the authors Hennessey and Patterson.

 Common functions  AND  OR  NAND  NOR  Add  Sub 2

 Common functions  AND  OR  NAND  NOR  Add  Sub 3

4 B A R Symbol: B A R B0B0 A0A0 R0R0 B1B1 A1A1 R1R1 B2B2 A2A2 R2R2 B3B3 A3A3 R3R3

5 A: B: C: A:A 3 A 2 A 1 A 0 B:B 3 B 2 B 1 B 0 C: S0S0 C1C1 S1S1 C2C2 S2S2 C3C3 S3S3 C4C4 Basic Building Block: Full Adder BiBi AiAi CiCi C i+1 SiSi AiAi BiBi CiCi SiSi Truth Table: C0C0

6 Full Adder B0B0 A0A0 C 0 =0 C1C1 S0S0 Full Adder B1B1 A1A1 C2C2 S1S1 Full Adder B2B2 A2A2 C3C3 S2S2 Full Adder B3B3 A3A3 C4C4 S3S3 A-B ? A:A 3 A 2 A 1 A 0 B:B 3 B 2 B 1 B 0 C: S0S0 C1C1 S1S1 C2C2 S2S2 C3C3 S3S3 C4C4 C0C0

7 Full Adder B’ 0 A0A0 C 0 =1 C1C1 S0S0 Full Adder B’ 1 A1A1 C2C2 S1S1 Full Adder B’ 2 A2A2 C3C3 S2S2 Full Adder B’ 3 A3A3 C4C4 S3S3

8 Full Adder A0A0 C1C1 S0S0 Full Adder B1B1 A1A1 C2C2 S1S1 Full Adder B2B2 A2A2 C3C3 S2S2 Full Adder B3B3 A3A3 C4C4 S3S3 B0B0 Add/Sub Function Select F: 0: Add 1: Sub Carry C Basic ALU AB S Symbol: Any other way? B-A ?

MUX R G ALU B A R C F,G FG1G0R B A F C Basic ALU B A B A AND OR ADD/ SUB

MUX R G ALU B A R C F,G FG1G0R -00And -01Or 010Add 110Sub -11- B A F C Basic ALU B A B A AND OR ADD/ SUB

 Carry (C): Already seen in the design of Adder/Subtractor  Overflow (V): Next slide  Sign (N): Just the sign bit  Zero (Z): Zero result 11 Exercise: Add logic to the ALU design to generate V, N and Z flags.

 Use the rule:  Carry-in to Sign-bit != Carry-out of Sign-bit 12 carry-in carry-out != Overflow What is the truth table? Exercise: Find the logic to implement overflow by other rules discussed earlier.

 Both A and B can be inverted before arithmetic and logical operations.  If Ainvert = Binvert = 1 and Operation = 00, we do:  A’ and B’ = A nor B  Similarly, Nand with Operation = 01.  Doing both A-B and B-A will require connecting Carryin via a mux. 13 Fig. B.5.9

 Quiz 3 – Chapter 3  Friday, Oct. 11 th (15 min)  Midterm – Chapter 1, 2, 3  Wednesday, Oct. 23 rd (50 min)  Quiz 4 – Chapter A  Monday, Oct. 28 th (15 min)  Test 2 – Chapters A & 5  Monday, Nov. 4 th (50 min) 14