Question: floating point number systems 2. Implement the following algorithm for converting a decimal number to its binary equiva- lent r=anan-1...00)2 Step 1: X0 = z;
floating point number systems 2. Implement the following algorithm for converting a decimal number to its binary equiva- lent r=anan-1...00)2 Step 1: X0 = z; j := 0 Step 2: while x, 70, do a; := remainder of integer division 2/2 X}+1= quotient of integer division 2/2 j;=j +1 end while The Matlab functions rem, mod, and floor may be useful. Make sure your algorithm prints the result out in the correct order. Apply the algorithm to convert the numbers x = 34 and x=2006 into binary
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
