![]() |
| ||
| Floating point in Assembly Can someone suggest me a method to convert a floating point number into binary using assembly? for example 5.5 would be 000..101.1 but how would you go on about this in assembly? |
| ||
| Re: Floating point in Assembly |
| ||
| Re: Floating point in Assembly ye ye.. but how would you go on about doing that in assembly? i mean.. u can convert a floating point to a binary by continuously diving the remainder by 2, and 'saving' the quotient of the division whether its 1 or 0, and form the binary. The problem that arises with this solution is that only 8 registers are provided, so that would lead to only allowing you to display a binary of 8 bits long (only). |
| ||
| Re: Floating point in Assembly It's already stored in binary, so you just take the mantissa and output a string of 0 and 1. Assuming you've done this exercise for int, then then this step at least is no different. You then use the exponent to work out where the radix point . goes. |
| All times are GMT -4. The time now is 2:44 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC