2

Below I've attached an image pertaining to the following question. I am parsing the volume boot record for a FAT32 partition and was stuck for many hours until I figured out WinHex has a Data Interpreter. When I click on 0Bh it shows a 16 bit interpretation which equals 512.

My question is, how does the system get 512 out of this. Does it read the bytes per sector in Big Endian or something similar? I'm simply confused on this one... The picture shows the VBR in WinHex.

https://i.stack.imgur.com/uCGIS.png

Nick
  • 487
  • 1
  • 4
  • 21
  • 00 02 is low endian interpreted as (0 + 2*256) – Aki Suihkonen Nov 05 '12 at 07:47
  • Why is it 2*256? And how am I supposed to know this and how does WinHex know to do this? – Nick Nov 05 '12 at 07:58
  • 1
    It's 2*256 for the same reason as 1234 = 1*1000 + 2*200 + 3*30 + 4. The 'base' of a byte is 256. Base of a single bit is 2 and base of a hex digit is 16. 1234 in base of 100 would be 12*100 + 34. 'Low endian' ie. "reversed" compared to integer representation in natural languages is one of two most common design choices made for integer representation in computers. – Aki Suihkonen Nov 05 '12 at 08:24
  • Thanks, I think this will become more clear in the weeks to come. – Nick Nov 05 '12 at 19:07
  • Did you get the answer to the question? – briankip Feb 13 '16 at 16:40

1 Answers1

0

The values are in little endian, thus 00,02 is 0200 the bytes are reversed, thus 02 comes first then 00.

0x0200 in base 10 is 512.

briankip
  • 2,502
  • 2
  • 23
  • 26