Confusion in "mask bits"
When you bitwise AND a number in this format with 7F800000 you get:

    SEEEEEEEEMMMMMMMMMMMMMMMMMMMMMMM
AND 01111111100000000000000000000000

  = 0EEEEEEEE00000000000000000000000


Everything gets set to 0 except the exponent. Yes, it is necessary for the correct answer to have 8 ones, but it is also necessary that they are in the correct positions. 00007F80 would not be correct because it would result in:

    SEEEEEEEEMMMMMMMMMMMMMMMMMMMMMMM
AND 00000000000000000111111110000000

  = 00000000000000000MMMMMMMM0000000