Computer Hope

Other => Other => Topic started by: reddevilggg on February 08, 2011, 07:58:07 AM

Title: Little Endian Conversion
Post by: reddevilggg on February 08, 2011, 07:58:07 AM
I'm trying to learn how to convert Little Endian single string floating point to decimal. Everything i have found on the internet just points towards using programs, but i need to do it using maths with no calculator.

Without any information to go on the only thing that i've found that seems to work is this -


For example -

To convert 10 B1 07 B4 to decimal

To Big Endian = B4 07 B1 10

Into binary = 10110100000001111011000100010000

Into decimal = 3020402960

move decimal point = 3.020402960 x 10^9

Is it a simple as that??

Can anyone confirm this for me??
Title: Re: Little Endian Conversion
Post by: reddevilggg on February 08, 2011, 10:41:24 AM

Feel free to ignore my above post, it's absolutely rubbish and i'm talking utter twaddle!!
Title: Re: Little Endian Conversion
Post by: Geek-9pm on February 08, 2011, 02:53:04 PM
http://en.wikipedia.org/wiki/Endianness
Quote
Well-known processors that use the big-endian format include Motorola
Intel based systems use the little kind. The base address has the lower part of a number. But floating point has its own rules.
You need to understand fully the loading point stuff. Which kind?
Quote
The term floating point refers to the fact that the radix point (decimal point, or, more commonly in computers, binary point) can "float"; that is, it can be placed anywhere relative to the significant digits of the number. This position is indicated separately in the internal representation, and floating-point representation can thus be thought of as a computer realization of scientific notation. Over the years, several different floating-point representations have been used in computers; however, for the last ten years the most commonly encountered representation is that defined by the IEEE 754 Standard.
http://en.wikipedia.org/wiki/Floating_point

Feel free to ignore my above post, it's absolutely rubbish and i'm talking utter twaddle!!
Title: Re: Little Endian Conversion
Post by: reddevilggg on February 08, 2011, 03:21:56 PM

Thanks, but i dont really need to know the 'whys and where fors' for my forth coming test.

I just want to know how to work it out, a formula, but i think i've cracked it. I just stupidly over looked the obvious. A few days ago a learnt how to convert decimal to Little Endian, all i had to do basically was the same in reverse.

I think the answer to - To convert 10 B1 07 B4 to decimal is 1.263727e7

Just need practice.

Title: Re: Little Endian Conversion
Post by: reddevilggg on February 09, 2011, 05:35:36 PM

Update: Passed Test One - 85%
Title: Re: Little Endian Conversion
Post by: Geek-9pm on February 09, 2011, 05:43:45 PM
Will you share the answers with us?
(Just asking.)  ;D
Title: Re: Little Endian Conversion
Post by: reddevilggg on February 09, 2011, 05:59:45 PM

Cant remember the questions to be honest!  :)

There was some binary addition, twos compliment, logic gates and truth tables, hex addition, octal addition, converting binary to hex and to dec and vice versa.

It was easier than i thought. Just shows that you can't beat revision and preparation.