Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

6) a) Convert the following 2 numbers to binary, octal and hex. 2.875, 0.1796875

ID: 3603570 • Letter: 6

Question

6) a) Convert the following 2 numbers to binary, octal and hex.

2.875, 0.1796875

When done, convert the following to a float representation

by the definition in class. In other words, I want an 8 digit hex

number representation using the 4 byte float specification

defined in class.  

b) Do the same for a) given they are negative values.

c) Convert the float representations of the following into

the decimal number given the definition in class.

59999901, 59999902, A66667FE

Note: This doesn't require a program, however, I want you to write a

simple function that outputs the answers you did by hand with "cout".

Explanation / Answer

Here you go.

int main()
{
cout<<"The answer for a is in Binary "<<"10.111"<<" in octal "<< "2.7 "<<"In Hex "<<"2.E"<<endl;

cout<<"The answer for b is in Binary "<<"0.0010111"<<" in octal "<< "0.134 "<<"In Hex "<<"0.2E"<<endl;

cout<<"The answer for 2 a is in Binary "<<"-10.111"<<" in octal "<< "-2.7 "<<"In Hex "<<"-2.E"<<endl;

cout<<"The answer for b is in Binary "<<"-0.0010111"<<" in octal "<< "-0.134 "<<"In Hex "<<"-0.2E"<<endl;

}

The part c is not clear in terms of what is stated and comment the reply so i can answer it accordingly.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote