Jump to content

About bitwise operators


terryds

Recommended Posts

Map out their truth tables:

 

For the first one $a ^ $b

A B Ouput0 0 00 1 11 0 11 1 0

For the second one: $a & ~$b

A B Output0 0 00 1 01 0 11 1 0

The XOR operation is actually equivalent to $a & ~$b | ~$a & $b

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...