Click here to Skip to main content
15,909,952 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my code is :

x = x & 0xffff
x << 8

I don't know whether 0xffff is an address offset or hex number.
Posted
Updated 7-Sep-11 20:07pm
v2

The prefix '0x' indicates a hexadecimal number. Whether it refers to an address or any other quantity entirely depends on your code as it's only a way of representation.

C++
int number_of_apples = 0x13;                        /* 19 apples */
short int number_of_fields_on_checker_board = 0100; /* octal number for 64 */
void* pointer_to_nowhere = 546233512;               /* points to the address 546233512 */
 
Share this answer
 
v2
It is just a value (65535) in Hex.
 
Share this answer
 
offset is used to avoid the duplicate.
In your case, to avoid the duplicate of the address, for each value of x the hexa decimal value is 'AND' ed.
so that there is not chance of duplicating.
But i wonder y such a big hexa number you are using.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900