Cmp, And, Or and Inv Or

The KCalc Handbook
Prev | Chapter 3. Comments on Specific Functions | Next

# 3.4. Cmp, And, Or and Inv Or

The Cmp, And and Or functions perform bitwise logical operations and therefore appear more meaningful if the Base is set to Hex, Oct or Bin rather than Dec. In the following examples Base is set to Bin.

Cmp performs a 1's complement (inverts the bits).

  `101 Cmp` gives 111...111010

And does a logical AND.

  `101 And 110 =` gives 100

Or does the logical OR.

  `101 Or 110 =` gives 111

Inv Or performs the logical XOR (exclusive OR) operation.

  `101 Inv Or 110 =` gives 11

Prev | Home | Next
Lsh and Inv Lsh | Up | Questions and Answers