Skip to content
ezeioDocs
  1. Reference
  2. Script reference
  3. Bits

GetCellBit

Helper function to read the state of a single bit in a cell.

Description#

GetCellBit( value, bitno )

Get the state of a single bit in the cell value

Parameters#

value 32-bit cell value
bitno The bit number (0-indexed)

Return value#

Returns the state of the bit (1 or 0)

Example usage#

   new value = 9;  // (9 = binary 1001)
   new b;
 
   b = GetBit( value, 3 );
 
   // b is now 1

Last updated Apr 10, 2024