How to interpret the value of a binary field within a file?

I opened a file in Notepad++.
The file has a field titled "Image Size" with a field type of Binary and is located in positions 47 - 50.
When I inspect this field via the VS2010 debugger, the values are as follows.
This field represents "Check Image Size". What would the value for the Image Size be based on the following positional  values within the field?

Position           Values

[46]                   0                    
[47]                   0
[48]                   53
[49]                   8
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

13576 = (53 * 256) + 8
Your complete equation would be
[49] + ([48]*256) + ([47]*65536) + ([46]*16777216)

Most programming languages have a very simple way to get this without the math, just read it as a 32-bit integer
Bob LearnedCommented:
For C#, you can use the BitConverter class.

BitConverter.ToInt32 Method

 Byte[] bytes1 = { 0xEC, 0x00, 0x00, 0x00 };
      Console.WriteLine("{0}--> 0x{1:X4} ({1:N0})", FormatBytes(bytes1),
                                      BitConverter.ToInt32(bytes1, 0));

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.