Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1.

Slides:



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

Modular Combinational Logic
Lecture 19: Hardware for Arithmetic Today’s topic –Designing an ALU –Carry Look-Ahead Adder 1.
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,
Cosc 2150: Computer Organization Chapter 3: Boolean Algebra and Digital Logic.
Arithmetic II CPSC 321 E. J. Kim. Today’s Menu Arithmetic-Logic Units Logic Design Revisited Faster Addition Multiplication (if time permits)
1 Lecture 4: Arithmetic for Computers (Part 3) CS 447 Jason Bakos.
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.
Chap 3.3~3.5 Construction an Arithmetic Logic Unit (ALU) Jen-Chang Liu, Spring 2006.
Arithmetic-Logic Units CPSC 321 Computer Architecture Andreas Klappenecker.
ECE 301 – Digital Electronics
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
4-bit adder, multiplexer, timing diagrams, propagation delays
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Computer Science 210 Computer Organization The Arithmetic Logic Unit.
Binary Arithmetic Adding Binary numbers Overflow conditions
CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Constructing a Computer Creating a general purpose computing device.
1 CHAPTER 4: PART I ARITHMETIC FOR COMPUTERS. 2 The MIPS ALU We’ll be working with the MIPS instruction set architecture –similar to other architectures.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
Chapter 6-1 ALU, Adder and Subtractor
07/19/2005 Arithmetic / Logic Unit – ALU Design Presentation F CSE : Introduction to Computer Architecture Slides by Gojko Babić.
HCL and ALU תרגול 10. Overview of Logic Design Fundamental Hardware Requirements – Communication: How to get values from one place to another – Computation.
Csci 136 Computer Architecture II – Constructing An Arithmetic Logic Unit Xiuzhen Cheng
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.
Arithmetic Logic Unit (ALU) Anna Kurek CS 147 Spring 2008.
IT253: Computer Organization Lecture 7: Logic and Gates: Digital Design Tonga Institute of Higher Education.
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.
Ch3b- 2 EE/CS/CPE Computer Organization  Seattle Pacific University There is logic to it andRd, Rs, RtRd
Computer Science 101 More Devices: Arithmetic. From 1-Bit Equality to N-Bit Equality = A B A = B Two bit strings.
1  2004 Morgan Kaufmann Publishers Performance is specific to a particular program/s –Total execution time is a consistent summary of performance For.
Appendix C Basics of Digital Logic Part I. Florida A & M University - Department of Computer and Information Sciences Modern Computer Digital electronics.
1  2004 Morgan Kaufmann Publishers Lets Build a Processor Almost ready to move into chapter 5 and start building a processor First, let’s review Boolean.
1 Fundamentals of Computer Science Combinational Circuits.
Cpu control.1 2/14 Datapath Components for Lab The Processor! ( th ed)
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Schematics adapted from those provided by the authors Hennessey and Patterson.
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?
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.
1 Arithmetic Where we've been: –Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's up ahead: –Implementing the Architecture.
Computer Arthmetic Chapter Four P&H. Data Representation Why do we not encode numbers as strings of ASCII digits inside computers? What is overflow when.
Simple ALU  Half adder  Full adder  Constructing 4 bits adder  ALU does several operations  General ALU structure  Timing diagram of adder  Overflow.
1 The ALU l ALU includes combinational logic. –Combinational logic  a change in inputs directly causes a change in output, after a characteristic delay.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
Computer Arthmetic Chapter Four P&H.
Combinational Circuits
ECE 3130 Digital Electronics and Design
Lecture 11: Hardware for Arithmetic
Computer Science 210 Computer Organization
Homework Reading Machine Projects Labs
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.
Computer Science 210 Computer Organization
5. Combinational circuits
Arithmetic Where we've been:
CS/COE0447 Computer Organization & Assembly Language
MIPS ALU.
Digital Logic.
Lecture 11: Hardware for Arithmetic
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Homework Reading Machine Projects Labs
Digital Logic.
COMS 361 Computer Organization
A 1-Bit Arithmetic Logic Unit
Logic Circuits I Lecture 3.
Combinational Circuits
Presentation transcript:

Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1

2 NAND and NOR NAND : NOT of AND : A nand B = A. B NOR : NOT of OR : A nor B = A + B NAND and NOR are universal gates, i.e., they can be used to construct any complex logical function

3 Common Logic Blocks – Decoder Takes in N inputs and activates one of 2 N outputs I 0 I 1 I 2 O 0 O 1 O 2 O 3 O 4 O 5 O 6 O to-8 Decoder I 0-2 O 0-7

4 Common Logic Blocks – Multiplexor Multiplexor or selector: one of N inputs is reflected on the output depending on the value of the log 2 N selector bits 2-input mux

5 Adder Algorithm Sum Carry A B Cin Sum Cout Truth Table for the above operations:

6 Adder Algorithm Sum Carry A B Cin Sum Cout Truth Table for the above operations: Equations: Sum = Cin. A. B + B. Cin. A + A. Cin. B + A. B. Cin Cout = A. B. Cin + A. B. Cin + A. Cin. B + B. Cin. A = A. B + A. Cin + B. Cin

7 Carry Out Logic Equations: Sum = Cin. A. B + B. Cin. A + A. Cin. B + A. B. Cin Cout = A. B. Cin + A. B. Cin + A. Cin. B + B. Cin. A = A. B + A. Cin + B. Cin

8 1-Bit ALU with Add, Or, And Multiplexor selects between Add, Or, And operations

9 32-bit Ripple Carry Adder 1-bit ALUs are connected “in series” with the carry-out of 1 box going into the carry-in of the next box

10 Incorporating Subtraction

11 Incorporating Subtraction Must invert bits of B and add a 1 Include an inverter CarryIn for the first bit is 1 The CarryIn signal (for the first bit) can be the same as the Binvert signal

12 Incorporating NOR

13 Incorporating NOR

14 Incorporating slt

15 Incorporating slt Perform a – b and check the sign New signal (Less) that is zero for ALU boxes 1-31 The 31 st box has a unit to detect overflow and sign – the sign bit serves as the Less signal for the 0 th box

16 Incorporating beq Perform a – b and confirm that the result is all zero’s