LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hex representation

Solved!
Go to solution

Hi guys,

 

I have a really simple problem I can't seem to figure out.  How does 0x9003 translate to (little endian) 0390 0200 1400 0000?  I understand the bit flopping for little vs big endian, just not the hex part.

 

Cheers,

Shivels

0 Kudos
Message 1 of 8
(3,768 Views)

Very few systems do little/big endian for bits, it is usually regulated to bytes.  If you flip the two bytes around, you will get the value you were looking for.

 

 

A

0 Kudos
Message 2 of 8
(3,759 Views)

Little endian/big endian does not do bit flopping. It's basically referring to whether you have the most significant byte first or the least significant byte first.

 

As to your question, what is 0390 0200 1400 0000 supposed to be? Where did you get all those extra bytes?

0 Kudos
Message 3 of 8
(3,756 Views)

Never heard of "bit flopping" for little / big endian. 

 

Here is how is it defined by our friends at Wikipedia:

http://en.wikipedia.org/wiki/Endianness

 

0 Kudos
Message 4 of 8
(3,747 Views)

Thanks for the fast responses.  So, what I meant by "flopping bits" was using the "Swap Word" and "Swap Bytes" subvi to convert a decimal value, such as 44.510 to 47414640.  Anyways, I'm trying to locate a "tag" inside a .jpeg read in as a binary file.  I download a vi from the forums that searches a .jpeg file read into LabVIEW as binary for the value 0390 0200 1400 0000.  This value represents 0x9003, which is the tag for "Date Created" attribute.  I am trying to search for 0x8825 which is the location of the GPS data inside the EXIF header.  

 

Cheers,

Shivels

0 Kudos
Message 5 of 8
(3,736 Views)

Oh, I assumed you were refering to bit endenness, which is rare.  But you are not.

 

What appears that you are getting is the correct value PLUS some other stuff.  The value you are looking for: 0x9003, the value you got 0x0390, do a byte flip and volia, they are the same. What the other stuff is, I do not know.  Try reading the instructions (if any) or try disecting the code.

 

 

A

0 Kudos
Message 6 of 8
(3,720 Views)
Solution
Accepted by topic author shivels

@shivels wrote:

 I am trying to search for 0x8825 ...  


So we know you have too many bytes. Just concentrate on the  0390, and lets assume the rest is just burden.

 

So, you want to find x8825. Have you searched for the byte swapped version of that number which is x2588 ?

 

 

Richard






0 Kudos
Message 7 of 8
(3,702 Views)

Thanks guys, I found x2588 in the string.  I can't believe I didn't just search for that with out all the other info.

 

Cheers,

Shivels

0 Kudos
Message 8 of 8
(3,687 Views)