Show the bit patterns of both operands in the


Assuming that 12 bits are available to store the relevant operand and the result:a. Show how the compiler can use subtraction and shifting only (that is, no use of multiplication)to determine the result of 19*56, if 19 is the value of a variable, x, and 56 is a constant which is known to thecompiler at compilation time. Show the bit patterns of both operands in the multiplication, and explain clearlythe steps you follow to determine the result. Hint: See the slides on "multiplying by constants".b. Now show how the compiler can use subtraction and shifting only (that is, no use ofmultiplication) to determine the result of 19*-56, if 19 is the value of a variable, x, and -56 is a constant which isknown to the compiler at compilation time. Show the bit patterns of both operands in the multiplication, andexplain clearly the steps you follow to determine the result. Hint: See the slides on "multiplying by constants"when the constant is negative.

Solution Preview :

Prepared by a verified Expert
Business Economics: Show the bit patterns of both operands in the
Reference No:- TGS02235508

Now Priced at $10 (50% Discount)

Recommended (96%)

Rated (4.8/5)