bitwise question - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

bitwise question

Hi

I have a question if anyone could help me understand this a little better, I have the following in my code.

[code]
HIWORD(A) ((WORD)(((DWORD)(A)) >> 16)& 0xFFFF))
[/code]

i understand what the bitwise operator 'and' is doing but what i don't understand is why it's being used here, why is the compassion needed?

Thanks
Sign In or Register to comment.