bits and for bits

Performs bitwise and for integers.

Signature

> bits and (target)

Parameters

  • target: target integer to perform bit and

Input/output types:

inputoutput
intint
list<int>list<int>

Examples

Apply bits and to two numbers

> 2 | bits and 2
2

Apply logical and to a list of numbers

> [4 3 2] | bits and 2
╭───┬───╮
│ 00 │
│ 12 │
│ 22 │
╰───┴───╯

Tips: Command bits and was not included in the official binaries by default, you have to build it with --features=extra flag