Question

One possible performance enhancement is to do a shift and add instead of an actual multiplication....

One possible performance enhancement is to do a shift and add instead of an actual multiplication. Since 9×6, for example, can be written (2 ×2 ×2+1)×6, we can calculate 9 ×6 by shifting 6 to the left three times and then adding 6 to that result. Show the best way to calculate 0x3Ahex × 0x5Fhex using shifts and adds/subtracts. Assume both inputs are 8-bit unsigned integers

0 0
Add a comment Improve this question Transcribed image text
Answer #1

0x3A * 0x5F USING ADD/SHIFTS

Multiply two binary or hexadecimal using add/shift method is an optimal way of getting the result . Its is because add/shift method decrease the number of arithmatic operations we are doing for multiplication. This method gives an optimal result incomparision to the conventional method of multiplications . This results in reduced complexity of programs .

Let's see how we can multiply 0x3A and 0x5F using shifts and adds .

Answer : 0x1586

For easy understanding let's see the example of multiplication of 9 and 6 in binary:-

Add a comment
Know the answer?
Add Answer to:
One possible performance enhancement is to do a shift and add instead of an actual multiplication....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A shift operation is often used to implement either multiply-by-power-of-2 or divide-by power-of-...

    A shift operation is often used to implement either multiply-by-power-of-2 or divide-by power-of-2 operations. For example, 0010 x4 1000. This multiplication can be achieved by shifting 0010 by 2 bits to the left. Likewise, 10004 0010, which can be obtained by shifting 1000 to the right by 2 bits. As multipliers are more "expensive" in terms of area and power consumption, multiplication by shifting is preferred if applicable. Sometime, the multiplier does not have to be power-of-2. For example, 0010...

  • number 4 and 5 please! PROBLEM STATEMENT A logic circuit is needed to add multi-bit binary...

    number 4 and 5 please! PROBLEM STATEMENT A logic circuit is needed to add multi-bit binary numbers. A 2-level circuit that would add two four-bit numbers would have 9 inputs and five outputs. Although a 2-level SOP or POS circuit theoretically would be very fast, it has numerous drawbacks that make it impractical. The design would be very complex in terms of the number of logic gates. The number of inputs for each gate would challenge target technologies. Testing would...

  • Q R S T U A B C D E F G H 4 Problem C...

    Q R S T U A B C D E F G H 4 Problem C (26 points): 5 Statue Company is able to produce two products, a Fancy Statue and a Plain 6 Statue with the same machine in its factory. NOTE that only ONE Statue can be 7 manufactured at a time using this machine. The Company currently makes both 8 statues, but management is concerned that this strategy is not providing 9 maximum benefit. They are thinking...

  • Could you please read 7483 data sheet and then answer number e 7383 Data Sheet 5483A...

    Could you please read 7483 data sheet and then answer number e 7383 Data Sheet 5483A 4-Bit Binary Full Adder with Fast Carry General Description The '83A high speed 4-bit binary full adders with internal carry lookahead accept two 4-bit binary words (Ao-A3, Bo- B3) and a Carry input (Co). They generate the binary Sum outputs (So-S3) and the Carry output (C4) from the most significant bit. They operate with either HIGH or active LOW operands (positive or negative logic)....

  • Rational Number *In Java* A rational number is one that can be expressed as the ratio...

    Rational Number *In Java* A rational number is one that can be expressed as the ratio of two integers, i.e., a number that can be expressed using a fraction whose numerator and denominator are integers. Examples of rational numbers are 1/2, 3/4 and 2/1. Rational numbers are thus no more than the fractions you've been familiar with since grade school. Rational numbers can be negated, inverted, added, subtracted, multiplied, and divided in the usual manner: The inverse, or reciprocal of...

  • Yes, this is one problem. Please solve ALL PARTS. Guaranteed thumbs up for the person who solves it. 3 1. Photodiode...

    Yes, this is one problem. Please solve ALL PARTS. Guaranteed thumbs up for the person who solves it. 3 1. Photodiode amplifier circuit You are designinga CF photosensor circuit for a light detection and ranging LiDAR) system in autonomous vehicles. The circuit utilizes a transimpedance amplifier to convert low-level RF photodiode current signal to a usable voltage output. It consists of a photodiode, an amplifier, and feedback capacitor/resistor pair as shown in Figure 1. We will derive simple equations to...

  • lab3RGB.c file: #include <stdio.h> #define AlphaValue 100 int main() { int r, g,b; unsigned int rgb_pack...

    lab3RGB.c file: #include <stdio.h> #define AlphaValue 100 int main() { int r, g,b; unsigned int rgb_pack; int r_unpack, g_unpack,b_unpack; int alpha = AlphaValue; printf("enter R value (0~255): "); scanf("%d",&r); printf("enter G value (0~255): "); scanf("%d",&g); printf("enter B value (0~255): "); scanf("%d",&b); while(! (r<0 || g<0 || b <0) ) { printf("A: %d\t", alpha); printBinary(alpha); printf("\n"); printf("R: %d\t", r); printBinary(r); printf("\n"); printf("G: %d\t", g); printBinary(g); printf("\n"); printf("B: %d\t", b); printBinary(b); printf("\n"); /* do the packing */ //printf("\nPacked: value %d\t", rgb_pack); printBinary(rgb_pack);printf("\n");...

  • Question 1: According to Milton Friedman, the reason there are two Phillips curves is because a....

    Question 1: According to Milton Friedman, the reason there are two Phillips curves is because a. prices are inflexible. b. the expected inflation rate does not instantaneously adjust to changes in the actual inflation rate. c. the expected inflation rate is equal to 1 minus the actual inflation rate. d. the expected inflation rate adjusts to changes in the actual inflation rate. Question 2: Milton Friedman argued that there a, are two Phillips curves, a short-run one and a long-run...

  • Group Project 1 The Micro-1 Processor Simulation <Micro-1 Computer> Here's the organization of a computer equipped...

    Group Project 1 The Micro-1 Processor Simulation <Micro-1 Computer> Here's the organization of a computer equipped with a Micro-1 processor Memory contains an array of integer cells: int cell[] = new int[CAP]; where CAP is the capacity of memory. Initially this is set to 256. Internally, the Micro-1 processor is equipped with eight 32-bit data/address registers and two 32 bit control registers: PC, the program counter, contains the address of the next instruction to execute. IR, the instruction register, contains...

  • The Dice game of "Pig" can be played with the following rules. 1. Roll two six-sided dice. Add the face values...

    The Dice game of "Pig" can be played with the following rules. 1. Roll two six-sided dice. Add the face values together. 2. Choose whether to roll the dice again or pass the dice to your opponent. 3. If you pass, then you get to bank any points earned on your turn. Those points become permanent. If you roll again, then add your result to your previous score, but you run the risk of losing all points earned since your...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT