David
Farruggio

MathGenie

bitset

Set bit at specific location

Syntax and Description

bitset(A,bit) returns the value of A with position bit set to 1 (on).
bitset(A,bit,V) returns A with position bit set to the value of V.
  • If V is zero, then the bit position bit is set to 0 (off).
  • If V is nonzero, then the bit position bit is set to 1 (on).
bitset(A,bit,V,assumedtype) assumes that A is of assumedtype. Assumed types are:
  • 1 = uint64
  • 2 = uint32
  • 3 = uint16
  • 4 = uint8
  • 5 = int64
  • 6 = int32
  • 7 = int16
  • 8 = int8

Back to functions