Test files used to verify your program. Remember to test for special cases such as Overflow, Underflow, Normalized result, etc.

computer science

Description

In this assignment you will do a software implementation of the Floating Point Adder.

Assignment is to be done in CPP (can STL header files)

                    

Assume that each of the boxes numbered 1, 2, 3, and 4 require one clock cycle, and the

condition checks require zero time.

 

 

 

 

 

 

 

 

Inputs to the program will be:

1.    A text file with each line containing a pair of floating point numbers to be added, in binary representation (a string of ‘0’ and ‘1’ characters in the file). See sample below.

 

Sample Input File (each line contains the representation for 2 floating point numbers,

both 32 bits wide):

11001100110011001111110011001100 11001100110011001111110011001100

01001110110011001111110011001101 11001100110111001101110011001110

 

*Refer to conversion of binary to floating point from the text book

 

Outputs from the program will be:

1. A sequence of addition results, each line containing one result (a string of ‘0’ and ‘1’

characters) and the number of clock cycles required for performing the addition.

 

Sample Output File (just examples. These are not be the computed outputs for the above

input file):

11001110110011001111110011001101

01001110110011001111110011001101

 

 

Deliverables:

1. Software implementation of the floating point adder referred to above.

2. Test files used to verify your program. Remember to test for special cases such as

Overflow, Underflow, Normalized result, etc.

3. A document explaining the different test cases.

 

 

 

 

Note:

Marks will be awarded according to your design and the test cases you developed to

evaluate the design. Extensive testing is expected as a part of the Assignment.

 

Handle cases with input values being NaN or infinite, you may not show result for invalid inputs. But you can display cycles taken to recognize them as invalid.

 

 

 

 

 

 

 

Reference material:

Chapter 3.5 ( pg no: 196)

ComputerOrganizationAndDesign5thEdition by david Patterson and john hennessy  : TEXT BOOK

https://ict.iitk.ac.in/wp-content/uploads/CS422-Computer-Architecture-ComputerOrganizationAndDesign5thEdition2014.pdf


Related Questions in computer science category