Other Arithmetic Functions Section 4-5

Slides:



Advertisements
Similar presentations
8085 processor. Bus system in microprocessor.
Advertisements

Arithmetic Operations and Circuits
Henry Hexmoor1 Chapter 5 Arithmetic Functions Arithmetic functions –Operate on binary vectors –Use the same subfunction in each bit position Can design.
Chapter 6 Arithmetic. Addition Carry in Carry out
Copyright 2008 Koren ECE666/Koren Part.6a.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital Computer.
Arithmetic-Logic Units (ALUs). The four-bit adder The basic four-bit adder always computes S = A + B + CI But by changing what goes into the adder inputs.
1 Lecture 4: Arithmetic for Computers (Part 4) CS 447 Jason Bakos.
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Arithmetic Operations and Circuits Lecture 5. Binary Arithmetic let’s look at the procedures for performing the four basic arithmetic functions: addition,
More Basics of CPU Design Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
Prepared by: Sanchita mishra Sonkali bhalavi sunita Submitted to: Shweta agrawal.
Lecture Objectives: 1)Explain the relationship between addition and subtraction with twos complement numbering systems 2)Explain the concept of numeric.
Binary Addition Binary Multiplication Section 4.5 and 4.7.
Chapter 4 Register Transfer and Microoperations
ECE 4110– Sequential Logic Design
Computer Arithmetic. Instruction Formats Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than.
Chapter 7 Arithmetic Operations and Circuits Binary Arithmetic Addition –When the sum exceeds 1, carry a 1 over to the next-more-significant column.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 3.
Khaled A. Al-Utaibi  Introduction  Arithmetic Instructions  Basic Logical Instructions  Shift Instructions  Rotate Instructions.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Arithmetic Circuits II Anselmo Lastra.
CS1Q Computer Systems Lecture 9 Simon Gay. Lecture 9CS1Q Computer Systems - Simon Gay2 Addition We want to be able to do arithmetic on computers and therefore.
Introduction to Chapter 6  Digital circuits are frequently used for arithmetic operations  Fundamental arithmetic operations on binary numbers and digital.
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
Chapter 6-1 ALU, Adder and Subtractor
Chapter 4 Register Transfer and Micro -operations
June 19, 2002Addition and multiplication1 Delays in the ripple carry adder The diagram below shows a 4-bit adder completely drawn out. This is called a.
Topic: Arithmetic Circuits Course: Digital Systems Slide no. 1 Chapter # 5: Arithmetic Circuits.
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.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
Arithmetic Functions BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
The Central Processing Unit (CPU) and the Machine Cycle.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Decoders and Multiplexer Circuits.
1 CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits 4-1,2: Iterative Combinational Circuits and Binary Adders.
Combinational Circuits
IT253: Computer Organization
Topics covered: Arithmetic CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
1 Outline Bus Transfer Memory Transfer Microoperations.
Outline Binary Addition 2’s complement Binary Subtraction Half Adder
Arithmetic Operations
CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits
1 Fundamentals of Computer Science Combinational Circuits.
Chapter 4 Register Transfer and Microoperations Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
Integer Operations Computer Organization and Assembly Language: Module 5.
MicroProcessors Lec. 4 Dr. Tamer Samy Gaafar. Course Web Page —
CS151 Introduction to Digital Design Chapter 4: Arithmetic Functions and HDLs 4-1: Iterative Combinational Circuits 4-2: Binary Adders 1Created by: Ms.Amany.
10/25/2005Comp 120 Fall October 25 Review for 2 nd Exam on Tuesday 27 October MUL not MULI Ask Questions!
REGISTER TRANSFER AND MICROOPERATIONS
Array multiplier TU/e Processor Design 5Z032.
REGISTER TRANSFER AND MICROOPERATIONS
Chapter 4 Register Transfer and Microoperations
Integer Real Numbers Character Boolean Memory Address CPU Data Types
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Part 4 Combinational Logic.
Morgan Kaufmann Publishers
Digital Logic Last Time … This Time … Control Path, Arithmetic Ops a
Data Representation – Instructions
ECE/CS 552: Arithmetic and Logic
Radix 2 Sequential Multipliers
King Fahd University of Petroleum and Minerals
ECE/CS 552: Integer Multipliers
Computer Organization and Design
EE207: Digital Systems I, Semester I 2003/2004
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
Overview Iterative combinational circuits Binary adders
ECE 352 Digital System Fundamentals
ECE 352 Digital System Fundamentals
Presentation transcript:

Other Arithmetic Functions Section 4-5

Combinational Multiplier Example: 4-Bit Multiplicand B = {B3 B2 B1 B0} 3-Bit Multiplier A = {A2 A1 A0} Product is a 7-Bit number, C = {C6 C5 C4 C3 C2 C1 C0 }

Computing the Product Let us work out the multiplication on the board:

Multiplier 4-Bit by 3-Bit Binary Multiplier

Contraction Can implement other functions ( Like increment, decrement ) by using basic arithmetic circuits (e.g. Adder) And removing unused portions This is called contraction

To increment A = { A2 A1 A0 }, do Incrementing Very common Computation of memory address for the next instruction to execute by CPU Use a customized adder To increment A = { A2 A1 A0 }, do A2 A1 A0 + 001; Do not use C3 (why?) Hiding Box

Customized adder To increment A = { A2 A1 A0 }, do Reference Customized adder To increment A = { A2 A1 A0 }, do A2 A1 A0 + 001; Ignore C3 C2

Eliminate Unneeded Gates No need for C3 C2 Cell 0 C1 C2 For the right cell, the output of gate 1 becomes A0’ so it can be replaced by an inverter. The output of gate 2 becomes A0, so it can be replaced by a wire connected to A0. Applying A0 and 0 to gate 3, it can be replaced by a wire, connecting A0 to the output S0. The output of gate 4 is 0, so it can be replaced with a 0 value. Applying this 0 and A0 from gate 2 to gate 5, gate 5 can be replaced by a wire connecting A0 to C1. The resulting circuit is shown as the right cell in Figure 5-12(b). Apply the same technique to the typical cell 1 Cell 2 Cell 1

Multiplication by Constant Case 1: Constant is a power of two Case 2: Constant is NOT a power of two

Multiplication by Power of 2 Just wires Division by power of 2 similar C = 4 * B C = B / 4

Multiplication by A Constant Which Is Not A Power Of 2 AND gates removed because A is a constant First adder removed by contraction

Contraction Not Always Best Sometimes it pays to rethink the function Example: study decrementer in book (Example 4-6 page 167)

Sign Extension Changing the number of bits used to store a number is common Example: -5 in stored in 4-bits (1011) to store -5 in 8 bits, extend the “Sign Bit” in the 4 left most bits 1011 is changed to 1111 1011 1011 = -5 1111 1011 is also -5

We’ve Covered Adders Subtracting unsigned numbers Signed numbers Ripple carry Subtracting unsigned numbers New design for adder-subtractor Signed numbers Signed addition/subtraction Multiplication – just basic Modified Circuits