You must have heard that floating point numbers are stored in
computers specified in
IEEE-754 standard:
1 bit for sign (+ or -)
8 bits for exponent (with bias 127)
23 bits for mantissa (the leading 1 need not be stored)
You may use online tool like
IEEE-754
Floating Point Converter to help you understand the meaning of each
bit. Discuss with your neighbors about why a floating number is
represented in that bit pattern.
Write a C++ program to dump the bit patterns for 4 bytes in a float.