Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Little Endian Conversion  (Read 10488 times)

0 Members and 1 Guest are viewing this topic.

reddevilggg

    Topic Starter


    Expert

    Thanked: 69
  • Experience: Beginner
  • OS: Windows 7
Little Endian Conversion
« 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 -

  • Convert Little Endian to Big Endian
  • Convert the hex into binary
  • Convert binary to decimal
  • Move the decimal point

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??
« Last Edit: February 08, 2011, 08:38:52 AM by reddevilggg »
11 cheers for binary !

reddevilggg

    Topic Starter


    Expert

    Thanked: 69
  • Experience: Beginner
  • OS: Windows 7
Re: Little Endian Conversion
« Reply #1 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!!
11 cheers for binary !

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Little Endian Conversion
« Reply #2 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!!

reddevilggg

    Topic Starter


    Expert

    Thanked: 69
  • Experience: Beginner
  • OS: Windows 7
Re: Little Endian Conversion
« Reply #3 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.

11 cheers for binary !

reddevilggg

    Topic Starter


    Expert

    Thanked: 69
  • Experience: Beginner
  • OS: Windows 7
Re: Little Endian Conversion
« Reply #4 on: February 09, 2011, 05:35:36 PM »

Update: Passed Test One - 85%
11 cheers for binary !

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Little Endian Conversion
« Reply #5 on: February 09, 2011, 05:43:45 PM »
Will you share the answers with us?
(Just asking.)  ;D

reddevilggg

    Topic Starter


    Expert

    Thanked: 69
  • Experience: Beginner
  • OS: Windows 7
Re: Little Endian Conversion
« Reply #6 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.
11 cheers for binary !