Chapter 7 ran.h


MPD78
10-06-2009, 06:21 AM
Hello all,

In the ran.h file there is a section in a line of code in the inline function, Ullong int64(), that I am curious to understand.

The 3rd line contants this section (w & 0xffffffff).

What does that do?

Thanks
Matt

davekw7x
10-06-2009, 07:29 AM
...What does that do...

The variable w is a 64-bit number.

When you perform a logical and operation with 0xffffffff, the result has the upper 32 bits equal to zero. So expressions using this result will see the lower 32 bits. of w

Regards,

Dave

MPD78
10-06-2009, 08:03 AM
Thanks Dave. That clears it up for me.

Matt