BELOW IS MY CODE FOR THE LAB, USE IT TO FINISH THE LAB
PHASE \#1 - DESCRIPTION: Develop a plan to design and finally implement a set of functions using C++ that the IEEE standard. Phase 1 will include the literature write up, description of the and a complete description of the functions plan: 1. Functions type void, or any data returning function 2. Type of data passed in to the functions (function parameters or arguments 3. Type of function parameters (value or reference). 4. Global variables if needed. 5. IEEE 754 double precision layout and its individual parts (sign, exponent, details. 6. The hexadecimal layout. 7. Hand work out two or three example from A to Z based on your team size. 8. Use your and your partner SIS ID numbers as examples EXAMPLE RUN: PLEASE ENTER A NUMBER TO DISPLAY THE IEEE 754 FLOATING POINT OPTIONS 10.25 PLEASE CHOOSE ONE OF THE FOLLOWING OPERATIONS: 1. DISPLAY THE SIGN BIT VALUE 2. DISPLAY THE INTEGER PART IN BOTH BASE-10 AND BINARY FORMATS 3. DISPLAY THE DECIMAL PART IN BOTH BASE-10 AND BINARY FORMATS 4. DISPLAY THE NUMBER ENTERED IN BOTH BASE-10 AND BINARY FORMATS 5. DISPLAY THE MANTISSA IN BINARY FORMAT 6. DISPLAY THE EXPONENT IN BOTH BASE-10 AND BINARY FORMAT 7. DISPLAY THE IEEE 754 DOUBLE PRECISION BINARY LAYOUT 8. DISPLAY THE IEEE 754 DOUBLE PRECISION HEX LAYOUT 9. SEND THE DETAILED SOLUTION TO AN EXTERNAL FILE 1: SIGN BIT IS ( 1) SINCE THE NUMBER ENTERED IS NEGATTVE. IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII /I II II \#include \#include> using namespace std; I/ global var. II prototypes void collect(double\& x ); double collect20; void sign_collector (double x, char\& s); void isolate(double, int\&, double\&); void display (char sign, int intpart, double decpart, string, string ); void inttobin(int intpart, string\& binarystring, int); void decimaltobinary (double decpart, string\& decimalbinary); void exponentval(string binarydata, int exponent); int main() \{ // declarations/ initialization double number =0.0; char sign; int intpart =0; double decpart =0.0; string integerbinary ="; string decimalbinary ="; int bits =8; string binarydata =; int exponent =0; // 1. ask the user to enter the value to convert to IEEE collect(number); // number =collect2(); /I 2. find the sign b sign_collector(number, sign); //3. function to isolate integer part from the decimal // 10.25 - integerpart =10, decimalpart =0.25 isolate(number, intpart, decpart); //4. convert intpart to binary inttobin(intpart, integerbinary, bits); //inttobin(intpart, binarystring, 8); // 5 function to convert the decimal part to binary decimaltobinary(decpart, decimalbinary); //6. calculating exponent binarydata = integerbinary +"."+ decimalbinary; exponentval(binarydata, exponent); II 7. after normlization (mantissa) II. conversion to hex 00000 00011 1010 1110E 1111F // display display(sign, intpart, decpart, integerbinary, decimalbinary); return 0; \} II II communicating via pass by reference void collect(double 8x ) f I/ 1. ask the user to enter the value to convert to IEEE cout "Please enter a value to convert to IEEE :" end; cinx; 3 III x; // 1. ask the user to enter the value to convert to IEEE cout "Please enter a value to convert to IEEE :" end; cin>; return x; \} IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII II a function to extract a number sign void sign_collector(double x, char \&s) \{ if (x>=0) s= 'O'; // 0 for positive else s=11;//1 for negative \} II a function that takes a double value and returns an integer and a double void isolate(double number, int \& intpart, double\& decpart) f number = abs(number); intpart =abs(( int ) number); // type cast decpart = abs(number intpart); 3 void inttobin(int intpart, string\& binarystring, int bits) \{ for (int i=0;i