Arithmetic and Logic Units

Slides:



Advertisements
Similar presentations
1 Register Transfer &  -operations Computer Organization Computer Architectures Lab REGISTER TRANSFER AND MICROOPERATIONS Register Transfer Language Register.
Advertisements

Chapter 9 Computer Design Basics. 9-2 Datapaths Reminding A digital system (or a simple computer) contains datapath unit and control unit. Datapath: A.
Datorteknik IntegerMulDiv bild 1 MIPS mul/div instructions Multiply: mult $2,$3Hi, Lo = $2 x $3;64-bit signed product Multiply unsigned: multu$2,$3Hi,
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 8 - Multiplication.
÷ 2 0 = 1 0.
Integer division Pencil and paper binary division (dividend)(divisor) 1000.
THE ARITHMETIC-LOGIC UNIT. BINARY HALF-ADDER BINARY HALF-ADDER condt Half adder InputOutput XYSC
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3: IT Students.
Binary Addition Rules Adding Binary Numbers = = 1
Chapter 3 Arithmetic for Computers. Multiplication More complicated than addition accomplished via shifting and addition More time and more area Let's.
361 div.1 Computer Architecture ECE 361 Lecture 7: ALU Design : Division.
Lecture 9 Sept 28 Chapter 3 Arithmetic for Computers.
Computer Organization Multiplication and Division Feb 2005 Reading: Portions of these slides are derived from: Textbook figures © 1998 Morgan Kaufmann.
Chap 3.3~3.5 Construction an Arithmetic Logic Unit (ALU) Jen-Chang Liu, Spring 2006.
Integer Arithmetic Floating Point Representation Floating Point Arithmetic Topics.
UNIVERSITY OF MASSACHUSETTS Dept
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
Registers and Counters
©2004 Brooks/Cole FIGURES FOR CHAPTER 18 CIRCUITS FOR ARITHMETIC OPERATIONS Click the mouse to move to the next page. Use the ESC key to exit this chapter.
ECE 4110– Sequential Logic Design
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
Lecture 6: Multiply, Shift, and Divide
Lesson 5-4 Example Example 2 Find 14 ÷ 4. Show the remainder. 1.Rewrite the problem in vertical format.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Digital Logic Design.
Csci 136 Computer Architecture II – Multiplication and Division
Mohamed Younis CMCS 411, Computer Architecture 1 CMSC Computer Architecture Lecture 11 Performing Division March 5,
294 ÷ 14. Look at the division problem.  The divisor, 14, can be divided into the first two digits of the dividend, 29, since you can get groups of 14.
Department of Communication Engineering, NCTU 1 Unit 4 Arithmetic and Logic Units.
Digital Electronics Tutorial: Number System & Arithmetic Circuits Solutions.
Warm-Up Divide 1.) 560 ÷ 8 = 2.) 105 ÷ 3 =. Essential question: What are the steps to divide whole numbers? Name date period Long Division Quotient: The.
CDA 3101 Spring 2016 Introduction to Computer Organization
COMPUTER ARITHMETIC Arithmetic with Signed-2's Complement Numbers
Integer Operations Computer Organization and Assembly Language: Module 5.
Chapter 8 Computer Arithmetic. 8.1 Unsigned Notation Non-negative notation  It treats every number as either zero or a positive value  Range: 0 to 2.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
Digital Design: With an Introduction to the Verilog HDL, 5e M. Morris Mano Michael D. Ciletti Copyright ©2013 by Pearson Education, Inc. All rights reserved.
More Binary Arithmetic - Multiplication
COMPUTER ARITHMETIC Arithmetic with Signed-2's Complement Numbers
Multiplication and Division basics
CHAPTER 18 Circuits for Arithmetic Operations
Array multiplier TU/e Processor Design 5Z032.
Integer Multiplication and Division
MIPS mul/div instructions
Computer Design Basics
Sequential Logic Counters and Registers
Lecture 16 Arithmetic Circuits
CDA 3101 Summer 2007 Introduction to Computer Organization
Digital Systems Section 14 Registers. Digital Systems Section 14 Registers.
Digital System Design Review.
ECE 434 Advanced Digital System L13
ECE 434 Advanced Digital System L12
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Binary Math Basic operations.
October 15 Chapter 4 – Multiplication/Division Go to the State Fair!
ECE 434 Advanced Digital System L11
Montek Singh Mon, Mar 28, 2011 Lecture 11
Computer Design Basics
Division and Modulo 15 Q A = Dividend B = Divisor Q = Quotient = A/B
CHAPTER 18 Circuits for Arithmetic Operations
Adder Circuits By: Asst Lec. Basma Nazar
Reference Chapter 7 Moris Mano 4th Edition
Multiplying and Dividing Decimals by 10, 100, 1000
Design of Networks for Arithmetic Operation
Instruction execution and ALU
Computer Architecture
Presentation transcript:

Arithmetic and Logic Units Department of Communication Engineering, NCTU

4.1 Serial Adder with Accumulator Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU We design a control circuit for a serial adder with an accumulator Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU Operation Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU State graph for serial adder control Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU 4.2 A Parallel Multiplier Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU A multiplier for binary positive number Save the product in a register Shift the product to the right each time Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU Datapath of the multiplier Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU Operation for a simple example Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU State graph for a straightforward implementation Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU An alternative approach Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU Operation using a counter Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU 4.3 A binary Divider Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU A parallel divider for positive numbers A circuit to divide an 8-bit dividend by a 4-bit divisor to obtain a 5-bit quotient Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU Block diagram Store the dividend in a register Shift the dividend to the left each time An extra bit is required on the left end of the dividend register Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU The operation for an example Load initial data Subtraction cannot be carried out without a negative result Thus, shift the dividend to the left before we subtract Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU The quotient digit of 1 is stored in the unused position of the dividend register Shift the dividend one place to the left Shift once again The first quotient digit Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU Subtraction is carried out, and the 3rd quotient digit of 1 is stored in the unused position of the dividend register A final shift is carried out, and the 4th quotient bit is set to zero What if the quotient is too large > 4 bits If the initial left five bits  the divisor overflow Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU Datapath Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU The state graph If X8 X7 X6 X5 X4  Y3 Y2 Y1Y0  C =1  Sh and Sub and the quotient bit is 1 Otherwise  Sh and the quotient bit is 0 Department of Communication Engineering, NCTU

Department of Communication Engineering, NCTU Implementation with the one-hot assignment Department of Communication Engineering, NCTU