4 ms·
I am not a programmer, but it seems to me the logical thing to do would be to operate on the binary values of 1 and 2. Since 1d = 01b and 2d = 10b... 1 AND 2
by unlimitedbacon 13y ago
I am not a programmer, but it seems to me the logical thing to do would be to operate on the binary values of 1 and 2.
Since 1d = 01b and 2d = 10b...
1 AND 2 = 01 AND 10 = 00 = 0
1 OR 2 = 01 OR 10 = 11 = 3
- chewxy 13y agoThat's kinda what binary logical operations are for. Typically AND is denoted by the symbol '&', and OR is denoted by the symbol '|'