Reference no: EM131105845
For this project, write three separate codes:
1. Convert from decimal to binary.
2. Convert from binary to decimal.
3. Convert from decimal to IEEE-754 format.
Be sure to take into consideration whole numbers, floating-point numbers, and repeating patterns.
Write a code that will convert from IEEE-754 floating-point representation to decimal.
Hint: the built-in commands str2num and num2str may prove useful for certain parts of your code.
Copy your code, command lines, and answers for each case into a Word document.
function [Ibase2]= Convert10to2(Ibase10,n)
% Convert the integral part by successive divisions by 2
Ibase2=[];
if (Ibase10~=0)
while (Ibase10>0)
q=fix(Ibase10/2);
r=Ibase10-2*q;
Ibase2=[r Ibase2];
Ibase10=q;
end
else
Ibase2=0;
end
o = length(Ibase2);
% append redundant zeros
Ibase2 = [zeros(1,n-o) Ibase2];
Find the work done in stretching the spring
: A spring of natural length 12 in. requires a force of 6.0 lb to stretch it 2.0 in. See Fig. 26.64. Find the work done in stretching it 6.0 in. From Hooke's law, we find the constant for the spring, and therefore f(x) as
|
What are the price elasticity of demand
: Define elasticity. What are the price elasticity of demand, price elasticity of supply, income elasticity of demand and cross elasticity of demand?
|
Compute contribution margin ratio and margin of safety ratio
: Prepare a CVP income statement for 2014 based on management's estimates. Compute the break-even point in (1) units and (2) dollars. Compute the contribution margin ratio and the margin of safety ratio.
|
Top edge at the surface of the water
: Determine each of the following as being either true or false. For a vertical rectangular floodgate, 4 m wide and 2 m high, with its top edge at the surface of the water, the force on the floodgate is
|
Write a code that will convert from ieee-754 floating-point
: Convert from decimal to binary. Convert from binary to decimal. Convert from decimal to IEEE-754 format. Write a code that will convert from IEEE-754 floating-point representation to decimal.
|
What about these data is limiting, and why
: What strategies might be employed to overcome these threats to validity and limitations?
|
Form of uncompetitive markets
: Market failure exists in the form of uncompetitive markets and those which negatively or positively affect people who are not participants as buyers or sellers. Provide an example of such a market and indicate how government policy might correct t..
|
Calculate the balances in the general ledger accounts
: Calculate the balances in the general ledger accounts. Use an Excel spreadsheet or a printing calculator to run the numbers several times. Don't use a hand-held calculator, as it's far too easy to make a mistake using it.
|
Describe a famous attack that leveraged it
: For this conference, explain what a specific vulnerability is, describe a famous attack that leveraged it (For example, the Morris worm leveraged the buffer overflow vulnerability), and how it can be prevented/minimized.
|