PHP Compiler Testing
Bitwise Operations

A decimal number can be represented as a sequence of bits. To illustrate:

6 = 00000110

23 = 00010111

From the bitwise representation of numbers, we can calculate the bitwise ANDbitwise OR and bitwise XOR. Using the example above:

bitwise_and(6, 23) 00000110

 

bitwise_or(6, 23) 00010111

 

bitwise_xor(6, 23) 00010001