Reference no: EM133273049
Data Structures and Advanced Programming
Programming Project - Assembly Language program
Write an ARM assembly program ieee.s to assign the hexadecimal equivalent for IEEE 32 bit format of a decimal number in variable ie and extract the sign bit , the exponents and the fraction part in the function mask.(Review floating point conversions and formats before doing this program). Using the extracted bits convert IEEE format to TNS format.
Tandem Non-Stop Series (TNS) are super reliable and widely used supercomputers, which are used as servers in banks, financial institutions, military, etc. A single precision floating- point number is as 1 sign bit, next 22 bits for fraction and last 9 bits for exponent. The bias is 256.
And IEEE standard 754 single presented as 1 sign bit, next 8 bit for exponent and last 23 bits for fraction. The bias is 127.
Example
IEEE Representation of 14.25(Decimal),41640000(Hex) TNS Representation of 14.25(Decimal),64000103(Hex)
Format of program with example:
-3.75 has the IEEE 32-bit format as below 11000000011100000000000000000000
The hex equivalent will be 0xc0700000; store that in variable ie.
In Function masking
R1= 10000000000000000000000000000000
After shifting R1 sign bit= 00000000000000000000000000000001 = 110 0r 0x1 R2= 01000000000000000000000000000000
After shifting R2, exponent= 00000000000000000000000010000000 = 12810 or 0x80
R3= 00000000011100000000000000000000 = 0x700000
R3 will have the fraction part In Function convert
Convert the IEEE format to TNS format (given above) and move the result to R5 In main
Call functions masking and convert
Well documented code a) Name, date, time spent on program, and comments.
You will turn in ieee.s