Download presentation
Presentation is loading. Please wait.
Published byPreston McDaniel Modified over 6 years ago
1
CSCI206 - Computer Organization & Programming
Two’s Complement Multiplication and Fibonacci Procedure Workshop zyBook: 8.3
2
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
3
Examples Discussions and examples are from (2/23/2017) A 4-bit, 2’s complement example: (-1) * (-7) == 7, extending to 8 bits (-1) X) (-7) +) > 7 Computer will extend the sign automatically to the full bits becomes
4
Examples A 4-bit 2’s complement example 3*(-5) == -15, extending to 8 bits (3) X) (-5) +) > -15 Computer will extend the sign automatically to the full bits becomes Run the program mult.s in MARS
5
Work in groups of three (or two) on the problem of Fibonacci procedure (Activity 15)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.