Department of Communication Engineering, NCTU 1 Unit 4 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
Division CPSC 321 Computer Architecture Andreas Klappenecker.
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.
Fixed-Point Arithmetics: Part I
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.
UNIVERSITY OF MASSACHUSETTS Dept
1 Lecture 8: Binary Multiplication & Division Today’s topics:  Addition/Subtraction  Multiplication  Division Reminder: get started early on assignment.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 7.
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
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.
Department of Communication Engineering, NCTU 1 Unit 6 Design and Synthesis of a RISC Store-Program Machine.
ECE 4110– Sequential Logic Design
Digital Kommunikationselektronik TNE027 Lecture 2 1 FA x n –1 c n c n1- y n1– s n1– FA x 1 c 2 y 1 s 1 c 1 x 0 y 0 s 0 c 0 MSB positionLSB position Ripple-Carry.
Lecture 6: Multiply, Shift, and Divide
Computer Arithmetic II Instructor: Mozafar Bag-Mohammadi Ilam University.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
Chapter 3 Arithmetic for Computers (Integers). Florida A & M University - Department of Computer and Information Sciences Arithmetic for Computers Operations.
Conversion to Larger Number of Bits Ex: Immediate Field (signed 16 bit) to 32 bit Positive numbers have implied 0’s to the left. So, put 16 bit number.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Lecture notes Reading: Section 3.4, 3.5, 3.6 Multiplication
Digital Logic Design.
IT253: Computer Organization
Csci 136 Computer Architecture II – Multiplication and Division
Mohamed Younis CMCS 411, Computer Architecture 1 CMSC Computer Architecture Lecture 11 Performing Division March 5,
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
Division Quotient Divisor Dividend – – Remainder.
Integer Multiplication and Division COE 301 Computer Organization Dr. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University.
COMPUTER ARITHMETIC Arithmetic with Signed-2's Complement Numbers
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.
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
Lecture 16 Arithmetic Circuits
Arithmetic and Logic Units
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 L12
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Binary Math Basic operations.
ECE 434 Advanced Digital System L11
Division and Modulo 15 Q A = Dividend B = Divisor Q = Quotient = A/B
CHAPTER 18 Circuits for Arithmetic Operations
Multiplying and Dividing Decimals by 10, 100, 1000
Instruction execution and ALU
Computer Architecture
Presentation transcript:

Department of Communication Engineering, NCTU 1 Unit 4 Arithmetic and Logic Units

Department of Communication Engineering, NCTU Serial Adder with Accumulator

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 3 We design a control circuit for a serial adder with an accumulator

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 4 Operation

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 5 State graph for serial adder control

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 6

7 4.2 A Parallel Multiplier

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 8 A multiplier for binary positive number Save the product in a register Shift the product to the right each time

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 9 Datapath of the multiplier

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 10 Operation for a simple example

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 11 State graph for a straightforward implementation

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 12 An alternative approach

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 13 Operation using a counter

Department of Communication Engineering, NCTU A binary Divider

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 15 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

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 16 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

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 17 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

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 18  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

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 19  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

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 20 Datapath

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 21 The state graph  If X 8 X 7 X 6 X 5 X 4  Y 3 Y 2 Y 1 Y 0  C =1  Sh and Sub and the quotient bit is 1  Otherwise  Sh and the quotient bit is 0

Hardware Project Unit 4 Arithmetic & Logic Units Sau-Hsuan Wu Department of Communication Engineering, NCTU 22 Implementation with the one-hot assignment