This code is for a cache simulator project - I am trying to extract certain bits from a memory address. When I attempt to use int variables to do the bit shifting, I end up with
All integer literal values are int type, unless you specify a prefix such as e.g. 1ULL.
int
1ULL
That means that 1<<33 shifts a 32-bit signed value 33 steps. You need to do 1ULL << 33.
1<<33
1ULL << 33