Bitwise permissions calculation