Question: using segger embbeded studio arm test skeleton code #include int main() { float number1; float number2; int comparison; number1=56; number2=12; comparison=bitwisedFloatCompare(number1,number2) ; // Compare two

using segger embbeded studio arm

using segger embbeded studio arm test skeleton code #include int main() {float number1; float number2; int comparison; number1=56; number2=12; comparison=bitwisedFloatCompare(number1,number2) ; // Compare

 test skeleton code #include int main() { float number1; float number2; int comparison; number1=56; number2=12; comparison=bitwisedFloatCompare(number1,number2) ; // Compare two floating point numbers if (comparison==1) printf(%f is greater than %f ,number1,number2); else if (comparison==-1) printf(%f is greater than %f ,number2,number1); else if (comparison==0) printf(Number are equal ); else printf(Error ); return 0; }

Computers which work with real arithmetic use a system called floating point. Suppose a real number x has the binary expansion x = Em x 2 where 15m number2, return -1 if number2 > number1 and should return 0 if the two numbers are equal. Please note the solution is constrained to be implemented using bitwise comparison of the two numbers. Question 2: Write a function named printFloatRepresentation(float number) that will print the floating point representation of a number using the format given below. (Sign bit) exponent in binary (assumed bit).significand For example if the number passed an argument is 71 your program should print (0) 10000101 _(1).00011100000000000000000 Similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 _(1).00011100000000000000000 The main function and function skeletons for the two functions are given in the attached C course. Complete the two functions mentioned in the question. Computers which work with real arithmetic use a system called floating point. Suppose a real number x has the binary expansion x = Em x 2 where 15m number2, return -1 if number2 > number1 and should return 0 if the two numbers are equal. Please note the solution is constrained to be implemented using bitwise comparison of the two numbers. Question 2: Write a function named printFloatRepresentation(float number) that will print the floating point representation of a number using the format given below. (Sign bit) exponent in binary (assumed bit).significand For example if the number passed an argument is 71 your program should print (0) 10000101 _(1).00011100000000000000000 Similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 _(1).00011100000000000000000 The main function and function skeletons for the two functions are given in the attached C course. Complete the two functions mentioned in the

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!