These floats won't do! We found some ancient arcane computers with lots of neat data but it is in weird floating point formats that C doesn't support! What will we do? I know, we crowd source the solution and test the students on their ability to

computer science

Description

These floats won't do! We found some ancient arcane computers with lots of neat data but it is in weird floating point formats that C doesn't support! What will we do? I know, we crowd source the solution and test the students on their ability to address arbitrary floating point formats!


You are to develop a system for calculating arbitrary floating point numbers. We have distributed to you a tarball containing the assignment definition. It contains starter header and .c files that describe what kind of floating point number you are dealing with. You must operate on floating point numbers with these constraints.


Your floating point numbers will have at least 2 bits of exponent and at least 1 bit of mantissa/fraction/significand. They will have a size of 16 or 32 bits. This will be called MyFloat. You will implement MyFloa


You will implement: 

Q1: Binary floating point representation of your MyFloat. 

Q2: Binary floating point operations for MyFloat such as addition, subtraction, multiplication, and division. 

Q3: String input and output of floating point numbers represented by MyFloat and to be represented by MyFloat. 

Q4: Binary floating point operations for MyFloat such as addition, subtraction, multiplication, and division without the help of any floating point routines. 

Q5: A working Makefile that builds and tests your solutions. 


Floating point numbers will be defined by a floating point definition that will describe: * Size (16 or 32 bits) * Sign bit (always 1 sign bit) * Exponent (2 or more bits) * Mantissa (1 or more bits) 


Related Questions in computer science category