My Project
Functions
iFloat.c File Reference

You will modify this file and implement nine functions. More...

#include "Debug.h"
#include "iFloat.h"

Functions

const char * getBinary (iFloat_t value)
 
iFloat_t floatGetSign (iFloat_t x)
 
iFloat_t floatGetExp (iFloat_t x)
 
iFloat_t floatGetVal (iFloat_t x)
 
void floatGetAll (iFloat_t x, iFloat_t *sign, iFloat_t *exp, iFloat_t *val)
 
iFloat_t floatLeftMost1 (iFloat_t bits)
 
iFloat_t floatAbs (iFloat_t x)
 
iFloat_t floatNegate (iFloat_t x)
 
iFloat_t floatAdd (iFloat_t x, iFloat_t y)
 
iFloat_t floatSub (iFloat_t x, iFloat_t y)
 

Detailed Description

Your implementation of the functions defined in iFloat.h. You may add other function if you find it helpful. Added function should be declared static to indicate they are only used within this file.

Author
Your name goes here

Function Documentation

iFloat_t floatAbs ( iFloat_t  x)
Todo:
Implement based on documentation contained in iFloat.h
iFloat_t floatAdd ( iFloat_t  x,
iFloat_t  y 
)
Todo:
Implement based on documentation contained in iFloat.h
void floatGetAll ( iFloat_t  x,
iFloat_t *  sign,
iFloat_t *  exp,
iFloat_t *  val 
)
Todo:
Implement based on documentation contained in iFloat.h
iFloat_t floatGetExp ( iFloat_t  x)
Todo:
Implement based on documentation contained in iFloat.h
iFloat_t floatGetSign ( iFloat_t  x)
Todo:
Implement based on documentation contained in iFloat.h
iFloat_t floatGetVal ( iFloat_t  x)
Todo:
Implement based on documentation contained in iFloat.h
iFloat_t floatLeftMost1 ( iFloat_t  bits)
Todo:
Implement based on documentation contained in iFloat.h
iFloat_t floatNegate ( iFloat_t  x)
Todo:
Implement based on documentation contained in iFloat.h
iFloat_t floatSub ( iFloat_t  x,
iFloat_t  y 
)
Todo:
Implement based on documentation contained in iFloat.h
const char* getBinary ( iFloat_t  value)

Get a 16/32 bit binary representation of a value.

Parameters
valuethe value to be converted to binary
Returns
a string of bits with a separator every four characters