Question: Only acceptable In java, please don't write in any other language except java, don't use something like Integer.toString(n,8). use this type of coding instead //

Only acceptable In java, please don't write in any other language except java, don't use something like Integer.toString(n,8). use this type of coding instead

// convert decimal number to binar
private static String get_binary(String number){ int decimal = 0; for(int i=0;i0){ if(decimal%2==1) binary = "1" + binary; else binary = "0" + binary; decimal /= 2; } return binary; }

Write a program using any language that converts a floating-point number to the simple model of the floating-point representation. The simple model uses 1 bit for sign, 5 bits for exponents and 8 bits for significant. -1.0001 * 10^2. sign = 1, expo 2 in binary, signoficant 0001 in binary

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!