This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Bit ====== ==== bit(value, bitno) ==== Returns the status of the given bit in an integer value === Description === <code>bit(19, 1)</code> Returns the value of bit 1 (the second bit) in the value 19. 19 (decimal) written as binary is ''10011''. Thus, bit 4, 1 and 0 are set. Bit 0 is the first from the right. === Parameters === | ''value'' | The input value (64 bit integer) | | ''bitno'' | The bit number to return | === Return value === Returns 1 if the bit is set. 0 if the bit is not set. === Example usage === <code>bit(211, 5) // returns 0 bit(211, 4) // returns 1 </code> [Available in firmware 201008 and newer] ezeio2/expref/bit.txt Last modified: 2020-10-09 01:07by andreh Log In