Hi, I know what binary is and what the bitwise operators do. But, what are the advantages of using bit manipulations? I also see 'if(x << y)' things. Can you show me examples?
Normal variable in pawn (called cell) has 32 bits. Without using bit flags you can't access any part smaller than 8 bits at once (and to get 8, you have to use packed strings). With bit operations you can access any bit you want. https://sampforum.blast.hk/showthread.php?tid=216730 - take a look at "bit-flags in enums", that's real world example.