recategorized by
4,349 views

2 Answers

1 votes
1 votes

P multiplied with 16 which can also be done by SHIFTING LEFT 4 BITS.

since multiplication is complex operation we can reduce the strength of this operation by an equivalent shift left 4 bits method.

$P*16 \Leftrightarrow P<<4$

so option B is correct

 

refer:-> https://stackoverflow.com/questions/141525/what-are-bitwise-shift-bit-shift-operators-and-how-do-they-work

0 votes
0 votes
Strength Reduction :
It is a compiler optimization where expensive operations are replaced with equivalent but less expensive operations. The classic example of strength reduction converts "strong" multiplications inside a loop into "weaker" additions – something that frequently occurs in array addressing.
Examples:
Replacing a multiplication within a loop with an addition
Replacing an exponentiation within a loop with a multiplication
According to options, Option B is most suitable answer.
Answer:

Related questions

1 votes
1 votes
2 answers
1
Arjun asked Dec 7, 2018
1,493 views
_____ merges the bodies of two loopsloop rollingloop foldingloop mergeloop jamming
1 votes
1 votes
3 answers
2
Arjun asked Dec 7, 2018
2,012 views
The context free grammar $S \rightarrow aSb \mid bSa \mid \epsilon$ generates:Equal number of a’s and b’sUnequal number of a’s and b’sAny number of a’s followed...
1 votes
1 votes
3 answers
3
Arjun asked Dec 7, 2018
1,187 views
The language $\{ W^a X^b Y^{a+b} \mid a, b, >1\}$ isRegularContext-free but not regularContext sensitive but not context freeType$=0$ but not context sensitive
0 votes
0 votes
4 answers
4
Arjun asked Dec 7, 2018
2,619 views
Identify the total number of tokens in the given statementprintf("A%B=",&i);$7$$8$$9$$13$