Question: Part III BONUS: Float-to-Binary Conversion (5 marks) Write an R function that converts any decimal number to its IEEE-754 32-bit floating point binary representation.

Part III BONUS: Float-to-Binary Conversion (5 marks) Write an R function that converts any decimal number to its IEEE-754 32-bit floating point binary representation. . Your function must accept a decimal number as input and . Must output the sign bit, the normalized mantissa and the biased exponent as binary strings of 1s and Os without spaces between the binary digits. Attached below is some sample output: > Input: -103.5 IEEE-754, 32-bit floating point number representation: > Sign 1 10011110000000000000000 > Mantissa (23 bits) >Exponent (8 bits) 10000101 "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." - Martin Fowler
Step by Step Solution
There are 3 Steps involved in it
Answer hex2bin dictx 04bformatxxsplit for x in range16 bin2hex di... View full answer
Get step-by-step solutions from verified subject matter experts
