CSCI206 - Computer Organization & Programming

Slides:



Advertisements
Similar presentations
Intuit QuickBooks Connect Intuit ® QuickBooks ® Connect/Mobile Extending the power of QuickBooks to the web and smart phones.
Advertisements

Test practice Multiplication. Multiplication 9x2.
ARITHMETIC, LOGIC INSTRUCTIONS, AND PROGRAMS
CMPT 334 Computer Organization Chapter 3 Arithmetic for Computers [Adapted from Computer Organization and Design 5 th Edition, Patterson & Hennessy, ©
The Structure of the CPU
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
FIGURES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Lecture 12: Computer Arithmetic Today’s topic –Numerical representations –Addition / Subtraction –Multiplication / Division 1.
Binary Addition Addition Rules: = = = = = carry 1 1 carry 1 Example 1: Example 2:
1 CS/COE0447 Computer Organization & Assembly Language Chapter 3.
Topic: Arithmetic Circuits Course: Digital Systems Slide no. 1 Chapter # 5: Arithmetic Circuits.
computer
Mohammad Amin Kuhail M.Sc. (York, UK) University of Palestine Faculty of Engineering and Urban planning Software Engineering Department Digital Logic Design.
Introduction to Computing Dr. Nadeem A Khan. Lecture 10.
Positional Number Systems
ECE 2110: Introduction to Digital Systems Signed Addition/Subtraction.
1 CSC 143 Two' s complement. 2 10's complement  How to represent negative numbers?  Use a sign → but −0 is the same as +0  10's complement  Example.
Lecture 2 Binary Arithmetic Topics Terminology Fractions Base-r to decimal Unsigned Integers Signed magnitude Two’s complement August 26, 2003 CSCE 211.
CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits
Introduction: Efficient Algorithms for the Problem of Computing Fibonocci Numbers Prepared by John Reif, Ph.D. Analysis of Algorithms.
Negative binary numbers 1 Computer Architectures M.
CHAPTER 3 Arithmetic For Computers 1/31/ Topics for discussion 1/31/ Number system: { radix/base, a set of distinct digits, operations} Radix.
Chapter 4 Test Design Techniques MNN1063 System Testing and Evaluation.
©2010 Cengage Learning SLIDES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION Click the mouse to move to the next page. Use the ESC key to exit.
Signed Arithmetic TYWu. Verilog 2001 Verilog 1995 provides only one signed data type, integer. Verilog 2001 provides a very rich set of new signed data.
Welcome to CSE 370 Introduction to Digital Design Jan 10, 2002.
10/25/2005Comp 120 Fall October 25 Review for 2 nd Exam on Tuesday 27 October MUL not MULI Ask Questions!
Representing Positive and Negative Numbers
Computer Architecture & Operations I
CSCI206 - Computer Organization & Programming
Binary -ve and +ve numbers!.
Introduction to Computing
Dr. Clincy Professor of CS
Integer Real Numbers Character Boolean Memory Address CPU Data Types
Morgan Kaufmann Publishers
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
Boolean algebra and Logic Circuits Chapter 5
CDA 3101 Summer 2007 Introduction to Computer Organization
Computer Science 210 Computer Organization
Data Representation – Instructions
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
Computer Science 210 Computer Organization
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
The University of Adelaide, School of Computer Science
Tree and Array Multipliers
Unsigned Multiplication
CSCI206 - Computer Organization & Programming
Comp Integers Spring 2015 Topics Numeric Encodings
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
Chapter 14 Bitwise Operators Objectives
CPU Design & Computer Arithmetic
How to represent real numbers
CSCI206 - Computer Organization & Programming
MIPS instruction encoding
Dr. Clincy Professor of CS
Architecture Overview
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
مديريت موثر جلسات Running a Meeting that Works
Arithmetic Topics Basic operations Programming Implications
Booth Recoding: Advantages and Disadvantages
Chapter 2 Representing and Manipulating Information
GCSE COMPUTER SCIENCE Topic 3 - Data 3.3 Logical and Arithmetic Shifts.

For More Details:
TITLE OF PRESENTATION Name of Presenter.
Presentation transcript:

CSCI206 - Computer Organization & Programming Two’s Complement Multiplication and Fibonacci Procedure Workshop zyBook: 8.3

Two’s complement multiplication When doing two’s complement multiplication, the signs will take care of themselves. The values (operands) must be fully “sign-extended” before operation (multiplication)! The result of two n-bits values will have 2*n bits. Thus sign extension must be 2*n bit long. We will discuss the topic in greater detail in Chapter 10

Examples Discussions and examples are from (2/23/2017) http://pages.cs.wisc.edu/~smoler/cs354/beyond354/int.mult.html A 4-bit, 2’s complement example: (-1) * (-7) == 7, extending to 8 bits 1111 1111 (-1) X) 1111 1001 (-7) ------------------------------------ 11111111 00000000 +) 11111111 ----------------------------------- 1111100000000111 ---> 7 Computer will extend the sign automatically to the full bits 1111100000000111 becomes 0000000000000111

Examples A 4-bit 2’s complement example 3*(-5) == -15, extending to 8 bits 0000 0011 (3) X) 1111 1011 (-5) ---------------------- 00000011 00000000 +) 00000011 0000001011110001 ---> -15 Computer will extend the sign automatically to the full bits 0000001011110001 becomes 1111111111110001 Run the program mult.s in MARS

Work in groups of three (or two) on the problem of Fibonacci procedure (Activity 15)