categoryBits/maskBits confuse me

The wiki gives you this simple example, but its not really explaining that much. And I just can't seem to get an idea of how they work. What i want to do, is this: I have 3 different kinds of shapes:

1. The player and clones of the player. Those should not collide with each other, but with everything else.
2. Walls/floor and platforms. Should act the same as the player, collide with everything but itself.
3. Moveable objects like crates, wich should collide with everything.

Seems simple, but i cant get it to work properly. Can someone help me with that?

Edit: Geez, I hate it, if I try something for hours and then if I open a thread about it somewhere, I solve the problem. Its quite simple, as it seems. "0xFFFF & ~0x0002" makes a shape not collide with 0x0002. I never worked with uint's that much and did'nt know that this works. 🙂

Original thread: https://box2d.org/forum/viewtopic.php?t=3680