# Logic and bits

`and`, `or` and `not` are the logical operators
([Expressions and operators](expressions-and-operators.md)).
Exclusive or on `Bool` is `!=`. There are no other logic gates; any other
gate is a one-line function:

```jadpo
function nand(a: Bool, b: Bool) -> Bool {
    return not (a and b)
}
```

There are no bitwise operations on `Int` or `Bytes`: no and, or, xor,
not or shifts. Hold flags as a `Set` of an enum instead. Bit-packed data,
such as a device's payloads, is decoded by the provider package that
knows the device's format.
