To solve this you need to remember few points which are set by IEEE standards for special values.

When E=0 and M=0 then it indicates the number is Zero.

When E=0 and M !=0, it's a denormalized no.

When E=255 and M=0, it means infinity

When E=255 and M !=0, it stands for Not a Number (NaN)

So basically when all bits are 1 in E then you know it's a special value.

When E=0 and M=0 then it indicates the number is Zero.

When E=0 and M !=0, it's a denormalized no.

When E=255 and M=0, it means infinity

When E=255 and M !=0, it stands for Not a Number (NaN)

So basically when all bits are 1 in E then you know it's a special value.