Navigation

Operators and Keywords

Function List:

C++ API

: C = bitset (A, n)
: C = bitset (A, n, val)

Set or reset bit(s) n of the unsigned integers in A.

val = 0 resets and val = 1 sets the bits. The least significant bit is n = 1. All variables must be the same size or scalars.

dec2bin (bitset (10, 1))
  ⇒ 1011

See also: bitand, bitor, bitxor, bitget, bitcmp, bitshift, intmax, flintmax.

Package: octave