Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL MANUAL VERSIONS

Ignition 8
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata

This function is used by Ignition's Expression language.

Description

This function returns the bit value (an integer, 0 or 1) in the number at position position, according to its binary representation. The least significant bit in a number is position 0.

Syntax

getBit(number, position)

  • Parameters

int number - The number value to start with.

int position - The bit position to check.

  • Results

int - A 0 or 1, depending on the bit at the position of the integer specified.

Examples
Code Snippet
 getBit(0,0) //would return 0
Code Snippet
 getBit(1,0) //would return 1
Code Snippet
 getBit(8,2)  //would return 0