Results 1 to 18 of 18

Thread: [RESOLVED] Reading Bytes (Little Endian/Big Endian)

Threaded View

  1. #12
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Reading Bytes (Little Endian/Big Endian)

    Quote Originally Posted by Mal1t1a View Post
    I don't think so. It's a bin file.
    So? What do you think is happening when you apply a unicode encoder to a file not encoded with unicode?

    Code:
    Using the big-endian and little-endian methods, the number 0x12345678 would be stored as shown in the following table.
    
    
    Byte order  Byte 0  Byte 1  Byte 2  Byte 3  
    Big-endian
                 0x12    0x34     0x56    0x78
     
    Little-endian
                 0x78    0x56     0x34    0x12
    If using integers, read four bytes and "OR" them into an integer( = 0) in the appropriate place.
    Last edited by dbasnett; Apr 14th, 2010 at 12:53 PM.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width