COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 3 - ARITMETHIC-LOGIC UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ
|
|
- Lilian Brooks
- 5 years ago
- Views:
Transcription
1 OMUTERS ORGANIZATION 2ND YEAR OMUTE SIENE MANAGEMENT ENGINEERING UNIT 3 - ARITMETHI-LOGI UNIT JOSÉ GARÍA RODRÍGUEZ JOSÉ ANTONIO SERRA ÉREZ Tema 3. La Unidad entral de roceso. A.L.U.
2 Arithmetic Logic Unit ALU Introduction Logic Operations Addition and subtraction arry propagated adder (A) Adder-Subtractor circuit Overflow arry Look-ahead Adder (LA) Multiplication Binary multiplication without sign Binary multiplication with sign Booth Algorithm Division onclusions Tema 3. La Unidad entral de roceso. A.L.U. 2
3 Introduction Introduction B A TEM D E ALU Z O Arithmetic and logic operator (one or more) Accumulator One or more temporal registers Result flags arry () Negative (N) Overflow (O or V) Zero (Z) Tema 3. La Unidad entral de roceso. A.L.U. 3
4 Logic operations Logic Operations Easy to implement Direct correspondence with the Hardware. Logic gates AND, OR, XOR, INVERTER,... Operation A B 00 0 Result 0 Tema 3. La Unidad entral de roceso. A.L.U. 4
5 Addition and subtraction Half-adder Binary half-adder (H.A.) Inputs Outputs X Y S S = X Y + X Y = X Y = X Y H.A. A S A B H.A. B S Tema 3. La Unidad entral de roceso. A.L.U. 5
6 Full Adder (F.A.) Addition and Subtraction A B F.A. Inputs Outputs in A B in S out S out S = A B in + A B in + A B in + A B in out = A B + A in + B in S = out = ( A B) in AB + in ( A B) Tema 3. La Unidad entral de roceso. A.L.U. 6
7 Full Adder (F.A.) Addition and Subtraction Usign half-adders (H.A.) H.A. A S F.A. H.A. S S B out in Tema 3. La Unidad entral de roceso. A.L.U. 7
8 Full Adder (F.A.) Addition and Subtraction Usign gates Tema 3. La Unidad entral de roceso. A.L.U. 8
9 arry ropagated Adder Addition and Subtraction To add two numbers of n bits, n full adder should be placed one after another. arry is propagated from one stage to the next one: arry ropagated Adder. B 3 A 3 B 2 A 2 B A B 0 A S 3 S 2 S S 0 Tema 3. La Unidad entral de roceso. A.L.U. 9
10 arry ropagated Adder Addition and Subtraction Adders built with logic gates using the expression: S = A B in + A B in + A B in + A B in out = A B + A in + B in B 3 A 3 B 2 A 2 B A B 0 A 0 4 8T 9T 2 6T 7T 2 4T 5T 2T 3T 0 S 3 S 2 S S 0 Tema 3. La Unidad entral de roceso. A.L.U. 0
11 arry ropagated Adder Addition and Subtraction Full adders built with half-adders A B in S out B 3 A 3 B 2 A 2 B A B 0 A 0 4 9T 8T 2 7T 6T 2 5T 4T 3T 2T 0 S 3 S 2 S S 0 Total _ Time = ( 2 n + )T Tema 3. La Unidad entral de roceso. A.L.U.
12 Subtractor circuit Addition and Subtraction The circuit works with numbers in two s complement notation. A - B = A + ((B) + ) B 3 A 3 B 2 A 2 B A B 0 A = 4 S 3 S 2 S S 0 Tema 3. La Unidad entral de roceso. A.L.U. 2
13 Adder-Subtractor ircuit Addition and Subtraction S/A B i input Total _ Time = 2( n + )T B 3 A 3 B 2 A 2 B A B 0 A 0 R/S S 3 S 2 S S 0 Tema 3. La Unidad entral de roceso. A.L.U. 3
14 Overflow detection Addition and Subtraction Two s complement Adder-Substractor with overflow detection B 3 A 3 B 2 A 2 B A B 0 A 0 R/S S 3 S 2 S S 0 V Tema 3. La Unidad entral de roceso. A.L.U. 4
15 Overflow Detection Addition and Subtraction. ase Addition of two positive numbers S OV 2. ase Addition of two negative numbers S OV Tema 3. La Unidad entral de roceso. A.L.U. 5
16 arry Look-ahead Adder Assume A and B to be 4 bits numbers arry generating signal: arry propagating signal: Addition and Subtraction i i i b a G = = = + i i i b a Tema 3. La Unidad entral de roceso. A.L.U. 6 arry on stage i: haracterized for A and B: = + i i i b a i i i i G + = G G G G + = + = + = + =
17 arry Look-ahead Adder Expanding the expressions depending on -: Addition and Subtraction G G G G G G = + + = + = Tema 3. La Unidad entral de roceso. A.L.U. 7 arries depend on ai and bi. These expressions are resolved as addition of products. Three leves of logic gates are needed to get each carry G G G G G G G = =
18 arry Look-ahead Adder Addition and Subtraction a 3 b 3 a 2 b 2 a b a 0 b 0 g 3 p 3 S 3 c 2 g 2 p 2 S 2 c g p S c 0 g 0 p 0 S 0 c - c 3 Look-ahead arry Generator Tema 3. La Unidad entral de roceso. A.L.U. 8
19 arry Look-ahead Adder Addition and Subtraction a 3 b 3 3T c 2 a 2 b 2 3T c a b 3T c 0 a 0 b 0 c - p 3 4T g 2 p 2 4T g p 4T g 0 p 0 4T T T S 3 T T S T T 2 S T T S 0 g 3 c 3 Look-ahead arry Generator 3T F.A. a i b i i- H.A. 3T H.A. T 4T S i c i Adders built with half-adders Tema 3. La Unidad entral de roceso. A.L.U. 9
20 Example (8 bits LA) Addition and Subtraction a 7 b 7 a 6 b 6 a 5 b 5 a 4 b 4 a 3 b 3 a 2 b 2 a b a 0 b 0 c 6 c 5 c 4 c 3 c 2 c c 0 c - g 7 p 7S7 g 6 p g 6 5p 5S5 g 4 p 4S4 S 6 g 3 p 3S3 g 2 p g 2 p S g 0 p 0S0 S 2 c 7 Look-ahead carry generator Look-ahead carry generator alculate the delay in this LA supposing that the adders are built with half-adders. ompare the result against a 8 bits A. Tema 3. La Unidad entral de roceso. A.L.U. 20
21 Example ( 4 bits LA) Addition and Subtraction Tema 3. La Unidad entral de roceso. A.L.U. 2
22 Example (4 bits LA) Addition and Subtraction Tema 3. La Unidad entral de roceso. A.L.U. 22
23 Multiplication Multiplication Sums and shifts algorithm If multiplicand has n bits and multiplier has m bits, them the product will have n+m bits. Binary multiplication: simple as you only multiply by or by 0. Multiplicand Multiplier roduct Tema 3. La Unidad entral de roceso. A.L.U. 23
24 Binary multipication without sign Multiplication Repeat n times If bit 0 of multiplier= then End if End repeat Sum the multiplicand to the left half of the product and place the result int the left half of the product Shift the product register bit to the right Shift the multiplier register bit to the right reliminary Version ALU Multiplicand n bits Multiplier n bits Sum Right shift Right shift roduct 2n bits Write ontrol Tema 3. La Unidad entral de roceso. A.L.U. 24
25 Binary multiplication without sign Multiplication Multiplicand 0 Multiplier roduct reliminary Version ALU Multiplicand n bits Multiplier n bits Sum Right shift Right shift roduct 2n bits Write ontrol Tema 3. La Unidad entral de roceso. A.L.U. 25
26 Binary multiplication without sign Multiplication Repeat n times If bit 0 of product register= then End if End repeat Sum the multiplicand to the left half of the product and place the result in the left half of the product. Shift the product register bit to the right Final Version Multiplicand n bits ALU Sum Right shift roduct 2n bits Multiplier Write ontrol Tema 3. La Unidad entral de roceso. A.L.U. 26
27 Binary multiplication without sign Multiplication 0 0 Multiplicand 0(d Iteration 0 Initial values ALU Sum Right shift roduct Multiplier 5(d Write ontrol Tema 3. La Unidad entral de roceso. A.L.U. 27
28 Binary multiplication without sign Multiplication 0 0 Multiplicand Iteration roduct + Multiplicand ALU Sum Right shift roduct Multiplier Write ontrol Tema 3. La Unidad entral de roceso. A.L.U. 28
29 Binary multiplication without sign Multiplication 0 0 Multiplicand Iteration Right shift ALU Sum Right shift roduct Multiplier Write ontrol Tema 3. La Unidad entral de roceso. A.L.U. 29
30 Binary multiplication without sign Multiplication 0 0 Multiplicand Iteration 2 Right shift ALU Sum Right shift roduct Multiplier Write ontrol Tema 3. La Unidad entral de roceso. A.L.U. 30
31 Binary multiplication without sign Multiplication 0 0 Multiplicand Iteration 3 roduct + Multiplicand ALU Sum Right shift roduct Multiplier Write ontrol Tema 3. La Unidad entral de roceso. A.L.U. 3
32 Binary multiplication without sign Multiplication 0 0 Multiplicand Iteration 3 Right shift ALU Sum Right shift roduct Multiplier Write ontrol Tema 3. La Unidad entral de roceso. A.L.U. 32
33 Binary multiplication without sign Multiplication 0 0 Multiplicand Iteration 4 Right shift ALU Sum Right shift roduct 50(d Multiplier Write ontrol Tema 3. La Unidad entral de roceso. A.L.U. 33
34 Binary multiplication without sign Multiplication Multiplicand = 00 Multiplier = 00 roduct Multiplicand Action Iteration Initial values Sum prod. and multiplicand Right shift prod. bit Right shift prod. bit Sum prod. and multiplicand Right shift prod. bit Right shift prod. bit 4 Tema 3. La Unidad entral de roceso. A.L.U. 34
35 Fast multiplication Multiplication Tema 3. La Unidad entral de roceso. A.L.U. 35
36 Binary multiplication with sign Multiplication Assume two s complement numbers A = 00 y B = 00 Apply sums and shifts algorithm 0 0 x x Wrong version Right version Tema 3. La Unidad entral de roceso. A.L.U. 36
37 Booth Algorithm Multiplication Assume Multiplicand = 2 and Multiplier = 7 (binaries 000 x 0) Booth expressed 7 = 8 - and replaced the multiplier by this decomposition: 0 = = Multiplicand x Multiplier according to A. Booth 0 Multiplicand subtraction shifts (2 zeros in the multiplier) Multiplicand addition Tema 3. La Unidad entral de roceso. A.L.U. 37
38 Booth Algorithm Multiplication urrent Bit Bit on the left Replacement (no transition) 0 - (transition to negative) 0 + (transition to positive) 0 (no transition) Example: Multiplicand = 00 y Multiplier = 000 Multiplier according to Booth = x Tema 3. La Unidad entral de roceso. A.L.U. 38
39 Booth Algorithm Multiplication q - =0 Repeat n times If q 0 = and q - = 0 then roduct h = product h - Multiplicand If q 0 = 0 and q - = then roduct h = roduct h + Multiplicand Arithmetic shift to the right of roduct and q - End repeat. Multiplicand n bits ALU Sum/Subt. Right shift roduct Multiplier q 0 q - ontrol 2n bits Tema 3. La Unidad entral de roceso. A.L.U. 39
40 Booth Algorithm Multiplication Multiplicand = 00 Multiplier = 0 Multiplicand roduct q - Action Itertion Initial values No operation Right shift Subtraction Right shift No operation Right shift No operation Right shift 4 Tema 3. La Unidad entral de roceso. A.L.U. 40
41 Division Division Division can be expressed as: Dividend = Quotient x Divisor + Remainder The remainder is smaller than the divisor. Double of space should be reserved for the dividend. Assume positive operands. Dividend Divisor Quotient Remainder Tema 3. La Unidad entral de roceso. A.L.U. 4
42 Algorithm with restoration Division Repeat n times Shift dividend to the left Dividend h = Dividend h - Divisor If Dividend h < 0 then (does not fit) else end if end repeat q 0 =0 Dividend h = Dividend h + Divisor (restore) q 0 = Divisor n bits ALU Sum/Subt. Left shift Dividend Quotient Remainder 2n bits q 0 ontrol Tema 3. La Unidad entral de roceso. A.L.U. 42
43 Algorithm with restoration Division Dividend Divisor Action Iteration Initial values _ 00 Shift bit to the left 000 0_ 00 Restar Dividend h > 0 q 0 = 000 _ 00 Shift bit to the left _ 00 Dividend h - Divisor (Subtract) Dividend h > 0 q 0 = 2 00 _ 00 Shift bit to the left 3 _ 00 Dividend h - Divisor (Subtract) Dividend h <= 0 q 0 = Dividend h + Divisor (Restore) 3 0 0_ 00 Shift bit to the left _ 00 Dividend h - Divisor (Subtract) Dividend h > 0 q 0 = 4 Rem. Quot. Tema 3. La Unidad entral de roceso. A.L.U. 43
44 Algorithm without restoration Division Dividend h = Dividend h - Divisor Repeat n times If Dividend h < 0 then Shift the Dividend to the left Dividend h = Dividend h + Divisor Else End if Shift the Dividend to the left Dividend h = Dividend h - Divisor If Dividend h < 0 then Else End if End repeat q 0 =0 q 0 = Divisor n bits Sum/Subt. ALU Left shift Dividend Quotient Remainder 2n bits ontrol Tema 3. La Unidad entral de roceso. A.L.U. 44 q 0
45 Algorithm without restoration Division Dividend Divisor Action Iteration Initial values Dividend h - Divisor 0 00 _ 000 Dividend h < 0 Shift left 0 _ 000 Dividend h + Divisor Dividend h < 0 q 0 = 0 0 0_ 000 Dividend h < 0 Shift left 2 0_ 000 Dividend h + Divisor Dividend h < 0 q 0 = _ 000 Dividend h < 0 Shift left _ 000 Dividend h + Divisor Dividend h >= 0 q 0 = _ 000 Dividend h > 0 Shift left _ 000 Dividend h - Divisor Dividend h > 0 q 0 = 4 Remain. Quotient Tema 3. La Unidad entral de roceso. A.L.U. 45
46 onclusions onclusions Adders Temporal problems with arry ropagated Adder, specially if n high. arry Look-ahead Adders improve response time of the adders. Multiplication roblems with the multiplication of signed numbers. Booth algorithm allows to multiply two s complement numbers and sometimes it reduces the number of operations if there is s or 0 s chains in the multiplier. Division Algorithm with restoration for positive numbers. For negative numbers, the sign must be preprocessed. The result s sign will depend on that. Tema 3. La Unidad entral de roceso. A.L.U. 46
Carry Look Ahead Adders
Carry Look Ahead Adders Lesson Objectives: The objectives of this lesson are to learn about: 1. Carry Look Ahead Adder circuit. 2. Binary Parallel Adder/Subtractor circuit. 3. BCD adder circuit. 4. Binary
More informationChapter 5 Arithmetic Circuits
Chapter 5 Arithmetic Circuits SKEE2263 Digital Systems Mun im/ismahani/izam {munim@utm.my,e-izam@utm.my,ismahani@fke.utm.my} February 11, 2016 Table of Contents 1 Iterative Designs 2 Adders 3 High-Speed
More informationMidterm Exam Two is scheduled on April 8 in class. On March 27 I will help you prepare Midterm Exam Two.
Announcements Midterm Exam Two is scheduled on April 8 in class. On March 27 I will help you prepare Midterm Exam Two. Chapter 5 1 Chapter 3: Part 3 Arithmetic Functions Iterative combinational circuits
More informationChapter 03: Computer Arithmetic. Lesson 03: Arithmetic Operations Adder and Subtractor circuits Design
Chapter 03: Computer Arithmetic Lesson 03: Arithmetic Operations Adder and Subtractor circuits Design Objective To understand adder circuit Subtractor circuit Fast adder circuit 2 Adder Circuit 3 Full
More informationChapter 1: Solutions to Exercises
1 DIGITAL ARITHMETIC Miloš D. Ercegovac and Tomás Lang Morgan Kaufmann Publishers, an imprint of Elsevier, c 2004 Exercise 1.1 (a) 1. 9 bits since 2 8 297 2 9 2. 3 radix-8 digits since 8 2 297 8 3 3. 3
More informationAdders, subtractors comparators, multipliers and other ALU elements
CSE4: Components and Design Techniques for Digital Systems Adders, subtractors comparators, multipliers and other ALU elements Adders 2 Circuit Delay Transistors have instrinsic resistance and capacitance
More informationCombinational Logic Design Arithmetic Functions and Circuits
Combinational Logic Design Arithmetic Functions and Circuits Overview Binary Addition Half Adder Full Adder Ripple Carry Adder Carry Look-ahead Adder Binary Subtraction Binary Subtractor Binary Adder-Subtractor
More informationLogic and Computer Design Fundamentals. Chapter 5 Arithmetic Functions and Circuits
Logic and Computer Design Fundamentals Chapter 5 Arithmetic Functions and Circuits Arithmetic functions Operate on binary vectors Use the same subfunction in each bit position Can design functional block
More informationBinary Multipliers. Reading: Study Chapter 3. The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding
Binary Multipliers The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 2 2 4 6 8 2 4 6 8 3 3 6 9 2 5 8 2 24 27 4 4 8 2 6
More informationAdders, subtractors comparators, multipliers and other ALU elements
CSE4: Components and Design Techniques for Digital Systems Adders, subtractors comparators, multipliers and other ALU elements Instructor: Mohsen Imani UC San Diego Slides from: Prof.Tajana Simunic Rosing
More informationEECS150. Arithmetic Circuits
EE5 ection 8 Arithmetic ircuits Fall 2 Arithmetic ircuits Excellent Examples of ombinational Logic Design Time vs. pace Trade-offs Doing things fast may require more logic and thus more space Example:
More informationCombinational Logic. By : Ali Mustafa
Combinational Logic By : Ali Mustafa Contents Adder Subtractor Multiplier Comparator Decoder Encoder Multiplexer How to Analyze any combinational circuit like this? Analysis Procedure To obtain the output
More information14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation
4:332:23 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 203 Lecture #3: Addition, Subtraction, Multiplication, and Division 2 s-complement Representation RECALL
More informationUNIT III Design of Combinational Logic Circuits. Department of Computer Science SRM UNIVERSITY
UNIT III Design of ombinational Logic ircuits Department of omputer Science SRM UNIVERSITY Introduction to ombinational ircuits Logic circuits for digital systems may be ombinational Sequential combinational
More informationCS 140 Lecture 14 Standard Combinational Modules
CS 14 Lecture 14 Standard Combinational Modules Professor CK Cheng CSE Dept. UC San Diego Some slides from Harris and Harris 1 Part III. Standard Modules A. Interconnect B. Operators. Adders Multiplier
More information14:332:231 DIGITAL LOGIC DESIGN
4:332:23 DIGITAL LOGIC DEIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 23 Lecture #4: Adders, ubtracters, and ALUs Vector Binary Adder [Wakerly 4 th Ed., ec. 6., p. 474] ingle
More informationDIVIDER IMPLEMENTATION
c n = cn-= DAIL LLAOCCA CLab@OU DIVID IPLTATIO The division of two unsigned integer numbers A (where A is the dividend and the divisor), results in a quotient and a residue. These quantities are related
More informationHardware Design I Chap. 4 Representative combinational logic
Hardware Design I Chap. 4 Representative combinational logic E-mail: shimada@is.naist.jp Already optimized circuits There are many optimized circuits which are well used You can reduce your design workload
More informationCSE140: Components and Design Techniques for Digital Systems. Decoders, adders, comparators, multipliers and other ALU elements. Tajana Simunic Rosing
CSE4: Components and Design Techniques for Digital Systems Decoders, adders, comparators, multipliers and other ALU elements Tajana Simunic Rosing Mux, Demux Encoder, Decoder 2 Transmission Gate: Mux/Tristate
More informationALU (3) - Division Algorithms
HUMBOLDT-UNIVERSITÄT ZU BERLIN INSTITUT FÜR INFORMATIK Lecture 12 ALU (3) - Division Algorithms Sommersemester 2002 Leitung: Prof. Dr. Miroslaw Malek www.informatik.hu-berlin.de/rok/ca CA - XII - ALU(3)
More informationGraduate Institute of Electronics Engineering, NTU Basic Division Scheme
Basic Division Scheme 台灣大學電子所吳安宇博士 2002 ACCESS IC LAB Outline Shift/subtract division algorithm. Programmed division. Restoring hardware dividers. Nonstoring and signed division. Radix-2 SRT divisioin.
More informationSolutions for Appendix C Exercises
C Solutions for Appix C Exercises 1 Solutions for Appix C Exercises C.1 A B A B A + B A B A B A + B 0 0 1 1 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 1 0 0 0 0 0 0 C.2 Here is the first equation: E = ((
More informationLinear Feedback Shift Registers (LFSRs) 4-bit LFSR
Linear Feedback Shift Registers (LFSRs) These are n-bit counters exhibiting pseudo-random behavior. Built from simple shift-registers with a small number of xor gates. Used for: random number generation
More informationDIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute
DIGITAL TECHNICS Dr. Bálint Pődör Óbuda University, Microelectronics and Technology Institute 4. LECTURE: COMBINATIONAL LOGIC DESIGN: ARITHMETICS (THROUGH EXAMPLES) 2016/2017 COMBINATIONAL LOGIC DESIGN:
More informationARITHMETIC COMBINATIONAL MODULES AND NETWORKS
ARITHMETIC COMBINATIONAL MODULES AND NETWORKS 1 SPECIFICATION OF ADDER MODULES FOR POSITIVE INTEGERS HALF-ADDER AND FULL-ADDER MODULES CARRY-RIPPLE AND CARRY-LOOKAHEAD ADDER MODULES NETWORKS OF ADDER MODULES
More informationAdders - Subtractors
Adders - Subtractors Lesson Objectives: The objectives of this lesson are to learn about: 1. Half adder circuit. 2. Full adder circuit. 3. Binary parallel adder circuit. 4. Half subtractor circuit. 5.
More informationNumber representation
Number representation A number can be represented in binary in many ways. The most common number types to be represented are: Integers, positive integers one-complement, two-complement, sign-magnitude
More informationChapter 4. Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. elements. Dr.
Chapter 4 Dr. Panos Nasiopoulos Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. Sequential: In addition, they include storage elements Combinational
More informationReview. EECS Components and Design Techniques for Digital Systems. Lec 18 Arithmetic II (Multiplication) Computer Number Systems
Review EE 5 - omponents and Design Techniques for Digital ystems Lec 8 rithmetic II (Multiplication) David uller Electrical Engineering and omputer ciences University of alifornia, Berkeley http://www.eecs.berkeley.edu/~culler
More informationEx code
Ex. 8.4 7-4-2-1 code Codeconverter 7-4-2-1-code to BCD-code. When encoding the digits 0... 9 sometimes in the past a code having weights 7-4-2-1 instead of the binary code weights 8-4-2-1 was used. In
More informationSystems I: Computer Organization and Architecture
Systems I: Computer Organization and Architecture Lecture 6 - Combinational Logic Introduction A combinational circuit consists of input variables, logic gates, and output variables. The logic gates accept
More informationDivider Implementation
c n = cn-= LCTRICAL AD COTR GIRIG DPARTT, OAKLAD UIVRSITY RCRLA@OU ALGORITH Divider Implementation The division of two unsigned integer numbers A (where A is the dividend and the divisor), results in a
More information9. Datapath Design. Jacob Abraham. Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017
9. Datapath Design Jacob Abraham Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 October 2, 2017 ECE Department, University of Texas at Austin
More informationChapter 2 Basic Arithmetic Circuits
Chapter 2 Basic Arithmetic Circuits This chapter is devoted to the description of simple circuits for the implementation of some of the arithmetic operations presented in Chap. 1. Specifically, the design
More informationHakim Weatherspoon CS 3410 Computer Science Cornell University
Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer. memory inst 32 register
More informationELEN Electronique numérique
ELEN0040 - Electronique numérique Patricia ROUSSEAUX Année académique 2014-2015 CHAPITRE 3 Combinational Logic Circuits ELEN0040 3-4 1 Combinational Functional Blocks 1.1 Rudimentary Functions 1.2 Functions
More informationCHAPTER 2 NUMBER SYSTEMS
CHAPTER 2 NUMBER SYSTEMS The Decimal Number System : We begin our study of the number systems with the familiar decimal number system. The decimal system contains ten unique symbol 0, 1, 2, 3, 4, 5, 6,
More informationCOMBINATIONAL LOGIC FUNCTIONS
COMBINATIONAL LOGIC FUNCTIONS Digital logic circuits can be classified as either combinational or sequential circuits. A combinational circuit is one where the output at any time depends only on the present
More informationLecture 8: Sequential Multipliers
Lecture 8: Sequential Multipliers ECE 645 Computer Arithmetic 3/25/08 ECE 645 Computer Arithmetic Lecture Roadmap Sequential Multipliers Unsigned Signed Radix-2 Booth Recoding High-Radix Multiplication
More informationEECS150 - Digital Design Lecture 24 - Arithmetic Blocks, Part 2 + Shifters
EECS150 - Digital Design Lecture 24 - Arithmetic Blocks, Part 2 + Shifters April 15, 2010 John Wawrzynek 1 Multiplication a 3 a 2 a 1 a 0 Multiplicand b 3 b 2 b 1 b 0 Multiplier X a 3 b 0 a 2 b 0 a 1 b
More informationArithmetic Circuits-2
Arithmetic ircuits-2 Multipliers Array multipliers hifters Barrel shifter Logarithmic shifter EE 261 Krish hakrabarty 1 Binary Multiplication X = Σ X i 2 i i=0 Multiplicand M-1 N-1 Y = Σ Y i 2 i i=0 Multiplier
More informationWe are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors
CSC258 Week 3 1 Logistics If you cannot login to MarkUs, email me your UTORID and name. Check lab marks on MarkUs, if it s recorded wrong, contact Larry within a week after the lab. Quiz 1 average: 86%
More informationECE380 Digital Logic. Positional representation
ECE380 Digital Logic Number Representation and Arithmetic Circuits: Number Representation and Unsigned Addition Dr. D. J. Jackson Lecture 16-1 Positional representation First consider integers Begin with
More informationCprE 281: Digital Logic
CprE 281: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Multiplication CprE 281: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev HW
More informationThe goal differs from prime factorization. Prime factorization would initialize all divisors to be prime numbers instead of integers*
Quantum Algorithm Processor For Finding Exact Divisors Professor J R Burger Summary Wiring diagrams are given for a quantum algorithm processor in CMOS to compute, in parallel, all divisors of an n-bit
More informationLogic. Combinational. inputs. outputs. the result. system can
Digital Electronics Combinational Logic Functions Digital logic circuits can be classified as either combinational or sequential circuits. A combinational circuit is one where the output at any time depends
More informationEECS150 - Digital Design Lecture 10 - Combinational Logic Circuits Part 1
EECS5 - Digital Design Lecture - Combinational Logic Circuits Part Feburary 26, 22 John Wawrzynek Spring 22 EECS5 - Lec-cl Page Combinational Logic (CL) Defined y i = f i (x,...., xn-), where x, y are
More informationDesign of Sequential Circuits
Design of Sequential Circuits Seven Steps: Construct a state diagram (showing contents of flip flop and inputs with next state) Assign letter variables to each flip flop and each input and output variable
More informationMultiplication of signed-operands
Multiplication of signed-operands Recall we discussed multiplication of unsigned numbers: Combinatorial array multiplier. Sequential multiplier. Need an approach that works uniformly with unsigned and
More informationCost/Performance Tradeoffs:
Cost/Performance Tradeoffs: a case study Digital Systems Architecture I. L10 - Multipliers 1 Binary Multiplication x a b n bits n bits EASY PROBLEM: design combinational circuit to multiply tiny (1-, 2-,
More informationCOE 202: Digital Logic Design Combinational Circuits Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
COE 202: Digital Logic Design Combinational Circuits Part 2 Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 860-7554 Office: 22-324 Objectives Arithmetic Circuits Adder Subtractor Carry Look Ahead Adder
More informationNumbers and Arithmetic
Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu
More informationBinary addition by hand. Adding two bits
Chapter 3 Arithmetic is the most basic thing you can do with a computer We focus on addition, subtraction, multiplication and arithmetic-logic units, or ALUs, which are the heart of CPUs. ALU design Bit
More informationMenu. Binary Adder EEL3701 EEL3701. Add, Subtract, Compare, ALU
Other MSI Circuit: Adders >Binar, Half & Full Canonical forms Binar Subtraction Full-Subtractor Magnitude Comparators >See Lam: Fig 4.8 ALU Menu Look into m... 1 Binar Adder Suppose we want to add two
More informationUnit 16 Problem Solutions
5.28 (contd) I. None II. (4, 7)ü (6, 7)ü (2, 4)ü (2, 6)ü Assignment: S =, =, =, =, = A B S Present ate Next ate W = Output S S S Present ate Next ate W = Output T input equations derived from the transition
More informationIntroduction to Digital Logic
Introduction to Digital Logic Lecture 15: Comparators EXERCISES Mark Redekopp, All rights reserved Adding Many Bits You know that an FA adds X + Y + Ci Use FA and/or HA components to add 4 individual bits:
More informationCSE 140L Spring 2010 Lab 1 Assignment Due beginning of the class on 14 th April
CSE 140L Spring 2010 Lab 1 Assignment Due beginning of the class on 14 th April Objective - Get familiar with the Xilinx ISE webpack tool - Learn how to design basic combinational digital components -
More informationArithmetic in Integer Rings and Prime Fields
Arithmetic in Integer Rings and Prime Fields A 3 B 3 A 2 B 2 A 1 B 1 A 0 B 0 FA C 3 FA C 2 FA C 1 FA C 0 C 4 S 3 S 2 S 1 S 0 http://koclab.org Çetin Kaya Koç Spring 2018 1 / 71 Contents Arithmetic in Integer
More informationUNSIGNED BINARY NUMBERS DIGITAL ELECTRONICS SYSTEM DESIGN WHAT ABOUT NEGATIVE NUMBERS? BINARY ADDITION 11/9/2018
DIGITAL ELECTRONICS SYSTEM DESIGN LL 2018 PROFS. IRIS BAHAR & ROD BERESFORD NOVEMBER 9, 2018 LECTURE 19: BINARY ADDITION, UNSIGNED BINARY NUMBERS For the binary number b n-1 b n-2 b 1 b 0. b -1 b -2 b
More informationModule 2. Basic Digital Building Blocks. Binary Arithmetic & Arithmetic Circuits Comparators, Decoders, Encoders, Multiplexors Flip-Flops
Module 2 asic Digital uilding locks Lecturer: Dr. Yongsheng Gao Office: Tech 3.25 Email: Web: Structure: Textbook: yongsheng.gao@griffith.edu.au maxwell.me.gu.edu.au 6 lecturers 1 tutorial 1 laboratory
More informationCMSC 313 Lecture 18 Midterm Exam returned Assign Homework 3 Circuits for Addition Digital Logic Components Programmable Logic Arrays
MS 33 Lecture 8 Midterm Exam returned Assign Homework 3 ircuits for Addition Digital Logic omponents Programmable Logic Arrays UMB, MS33, Richard hang MS 33, omputer Organization & Assembly
More informationTree and Array Multipliers Ivor Page 1
Tree and Array Multipliers 1 Tree and Array Multipliers Ivor Page 1 11.1 Tree Multipliers In Figure 1 seven input operands are combined by a tree of CSAs. The final level of the tree is a carry-completion
More informationELCT201: DIGITAL LOGIC DESIGN
ELCT2: DIGITAL LOGIC DESIGN Dr. Eng. Haitham Omran, haitham.omran@guc.edu.eg Dr. Eng. Wassim Alexan, wassim.joseph@guc.edu.eg Lecture 4 Following the slides of Dr. Ahmed H. Madian محرم 439 ه Winter 28
More information3.3 Dividing Polynomials. Copyright Cengage Learning. All rights reserved.
3.3 Dividing Polynomials Copyright Cengage Learning. All rights reserved. Objectives Long Division of Polynomials Synthetic Division The Remainder and Factor Theorems 2 Dividing Polynomials In this section
More informationALUs and Data Paths. Subtitle: How to design the data path of a processor. 1/8/ L3 Data Path Design Copyright Joanne DeGroat, ECE, OSU 1
ALUs and Data Paths Subtitle: How to design the data path of a processor. Copyright 2006 - Joanne DeGroat, ECE, OSU 1 Lecture overview General Data Path of a multifunction ALU Copyright 2006 - Joanne DeGroat,
More informationNumbers and Arithmetic
Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu
More information1 Short adders. t total_ripple8 = t first + 6*t middle + t last = 4t p + 6*2t p + 2t p = 18t p
UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences Study Homework: Arithmetic NTU IC54CA (Fall 2004) SOLUTIONS Short adders A The delay of the ripple
More informationLooking at a two binary digit sum shows what we need to extend addition to multiple binary digits.
A Full Adder The half-adder is extremely useful until you want to add more that one binary digit quantities. The slow way to develop a two binary digit adders would be to make a truth table and reduce
More informationNumbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary.
Numbering Systems Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary. Addition & Subtraction using Octal & Hexadecimal 2 s Complement, Subtraction Using 2 s Complement.
More informationBinary addition (1-bit) P Q Y = P + Q Comments Carry = Carry = Carry = Carry = 1 P Q
Digital Arithmetic In Chapter 2, we have discussed number systems such as binary, hexadecimal, decimal, and octal. We have also discussed sign representation techniques, for example, sign-bit representation
More informationArithmetic Circuits-2
Arithmetic Circuits-2 Multipliers Array multipliers Shifters Barrel shifter Logarithmic shifter ECE 261 Krish Chakrabarty 1 Binary Multiplication M-1 X = X i 2 i i=0 Multiplicand N-1 Y = Y i 2 i i=0 Multiplier
More informationCMPUT 329. Circuits for binary addition
CMPUT 329 Parallel Adder with Carry Lookahead and ALU Ioanis Nikolaidis (Katz & Borriello) rcuits for binary addition Full adder (carry-in to cascade for multi-bit adders) Sum = xor A xor B Cout = B +
More informationAddition and Subtraction
ddition and Subtraction Philipp Koehn 9 February 2018 1 addition 1-it dder 2 Let s start simple: dding two 1-it numbers Truth table + 0 0 0 0 1 1 1 0 1 1 1 10 Really 2 Operations 3 Truth table for "position
More informationCMP 334: Seventh Class
CMP 334: Seventh Class Performance HW 5 solution Averages and weighted averages (review) Amdahl's law Ripple-carry adder circuits Binary addition Half-adder circuits Full-adder circuits Subtraction, negative
More informationArithmetic Circuits How to add and subtract using combinational logic Setting flags Adding faster
rithmetic Circuits Didn t I learn how to do addition in second grade? UNC courses aren t what they used to be... 01011 +00101 10000 Finally; time to build some serious functional blocks We ll need a lot
More informationCSE 20 Discrete Math. Algebraic Rules for Propositional Formulas. Summer, July 11 (Day 2) Number Systems/Computer Arithmetic Predicate Logic
CSE 20 Discrete Math Algebraic Rules for Propositional Formulas Equivalences between propositional formulas (similar to algebraic equivalences): Associative Summer, 2006 July 11 (Day 2) Number Systems/Computer
More informationDigital Techniques. Figure 1: Block diagram of digital computer. Processor or Arithmetic logic unit ALU. Control Unit. Storage or memory unit
Digital Techniques 1. Binary System The digital computer is the best example of a digital system. A main characteristic of digital system is its ability to manipulate discrete elements of information.
More informationAnswers (1) A) 36 = - - = Now, we can divide the numbers as shown below. For example : 4 = 2, 2 4 = -2, -2-4 = -2, 2-4 = 2.
Answers (1) A) 36 We can divide the two numbers by using the following steps : 1. Firstly, we will divide the mathematical signs of the numbers. We place a negative sign before the negative numbers and
More informationProposal to Improve Data Format Conversions for a Hybrid Number System Processor
Proposal to Improve Data Format Conversions for a Hybrid Number System Processor LUCIAN JURCA, DANIEL-IOAN CURIAC, AUREL GONTEAN, FLORIN ALEXA Department of Applied Electronics, Department of Automation
More informationCombinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.
Combinational Logic ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2010 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Combinational Circuits
More informationReview for Final Exam
CSE140: Components and Design Techniques for Digital Systems Review for Final Exam Mohsen Imani CAPE Please submit your evaluations!!!! RTL design Use the RTL design process to design a system that has
More informationCost/Performance Tradeoff of n-select Square Root Implementations
Australian Computer Science Communications, Vol.22, No.4, 2, pp.9 6, IEEE Comp. Society Press Cost/Performance Tradeoff of n-select Square Root Implementations Wanming Chu and Yamin Li Computer Architecture
More informationOverview. Arithmetic circuits. Binary half adder. Binary full adder. Last lecture PLDs ROMs Tristates Design examples
Overview rithmetic circuits Last lecture PLDs ROMs Tristates Design examples Today dders Ripple-carry Carry-lookahead Carry-select The conclusion of combinational logic!!! General-purpose building blocks
More informationCombinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.
Combinational Logic ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2017 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Combinational Circuits
More information6.111 Lecture # 12. Binary arithmetic: most operations are familiar Each place in a binary number has value 2 n
6.111 Lecture # 12 Binary arithmetic: most operations are familiar Each place in a binary number has value 2 n Representation of negative numbers: there are a number of ways we might do this: 5 = 00000101
More informationBuilding a Computer Adder
Logic Gates are used to translate Boolean logic into circuits. In the abstract it is clear that we can build AND gates that perform the AND function and OR gates that perform the OR function and so on.
More informationProposal to Improve Data Format Conversions for a Hybrid Number System Processor
Proceedings of the 11th WSEAS International Conference on COMPUTERS, Agios Nikolaos, Crete Island, Greece, July 6-8, 007 653 Proposal to Improve Data Format Conversions for a Hybrid Number System Processor
More informationThis Unit: Arithmetic. CIS 371 Computer Organization and Design. Pre-Class Exercise. Readings
This Unit: Arithmetic CI 371 Computer Organization and Design Unit 3: Arithmetic Based on slides by Prof. Amir Roth & Prof. Milo Martin App App App ystem software Mem CPU I/O A little review Binary + 2s
More informationLecture 11. Advanced Dividers
Lecture 11 Advanced Dividers Required Reading Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design Chapter 15 Variation in Dividers 15.3, Combinational and Array Dividers Chapter 16, Division
More informationBinary addition example worked out
Binary addition example worked out Some terms are given here Exercise: what are these numbers equivalent to in decimal? The initial carry in is implicitly 0 1 1 1 0 (Carries) 1 0 1 1 (Augend) + 1 1 1 0
More informationA Simple Architectural Enhancement for Fast and Flexible Elliptic Curve Cryptography over Binary Finite Fields GF(2 m )
A Simple Architectural Enhancement for Fast and Flexible Elliptic Curve Cryptography over Binary Finite Fields GF(2 m ) Stefan Tillich, Johann Großschädl Institute for Applied Information Processing and
More informationLecture 3 Review on Digital Logic (Part 2)
Lecture 3 Review on Digital Logic (Part 2) Xuan Silvia Zhang Washington University in St. Louis http://classes.engineering.wustl.edu/ese461/ ircuit Optimization Simplest implementation ost criterion literal
More informationChapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>
Chapter 5 Digital Design and Computer Architecture, 2 nd Edition David Money Harris and Sarah L. Harris Chapter 5 Chapter 5 :: Topics Introduction Arithmetic Circuits umber Systems Sequential Building
More informationLecture 8. Sequential Multipliers
Lecture 8 Sequential Multipliers Required Reading Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design Chapter 9, Basic Multiplication Scheme Chapter 10, High-Radix Multipliers Chapter
More informationResource Efficient Design of Quantum Circuits for Quantum Algorithms
Resource Efficient Design of Quantum Circuits for Quantum Algorithms Himanshu Thapliyal Department of Electrical and Computer Engineering University of Kentucky, Lexington, KY hthapliyal@uky.edu Quantum
More informationArithmetic Circuits-2
Arithmetic Circuits-2 Multipliers Array multipliers Shifters Barrel shifter Logarithmic shifter ECE 261 Krish Chakrabarty 1 Binary Multiplication M-1 X = X i 2 i i=0 Multiplicand N-1 Y = Y i 2 i i=0 Multiplier
More informationArithmetic and Logic Unit First Part
Arithmetic and Logic Unit First Part Arquitectura de Computadoras Arturo Díaz D PérezP Centro de Investigación n y de Estudios Avanzados del IPN adiaz@cinvestav.mx Arquitectura de Computadoras ALU1-1 Typical
More informationconvert a two s complement number back into a recognizable magnitude.
1 INTRODUCTION The previous lesson introduced binary and hexadecimal numbers. In this lesson we look at simple arithmetic operations using these number systems. In particular, we examine the problem of
More informationECE/CS 552: Introduction To Computer Architecture 1. Instructor:Mikko H Lipasti. Fall 2010 University i of Wisconsin-Madison
ECE/CS 552: Arithmetic I Instructor:Mikko H Lipasti Fall 2010 Univsity i of Wisconsin-Madison i Lecture notes partially based on set created by Mark Hill. Basic Arithmetic and the ALU Numb representations:
More information