[OT] Hexadecimal Bitmask

A

Amy L.

I understand how to calculate and use binary bitmasks. However, I am having
a hard time figuring out how to work with Hexadecimal Bitmasks. I figured
it would be the same thing as doing a binary bitmask (i.e. 16^0, 16^1, 16^2,
...., 16^n). For example I figured the decimal number 124 would represent
7C00 in terms of a hex bitmask? Is that right or wrong?

Thanks
Amy,
 
N

Nick Malik [Microsoft]

Hex is a numbering system. The most significant digit is on the left, the
least is on the right. 124 = 7C, not 7C00.

If you are trying to be big-endian, realize that the compiler will handle
the representation in binary for you, so there is no reason to code the byte
order that way.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top