Sets (changes to 1) the bit at the specified position in a number.
A new number with the bit at the specified position set to 1.
setBitHigh(0b1001, 1); // → 0b1011 (sets bit 1)setBitHigh(0b0111, 3); // → 0b1111 (sets bit 3)
The original number whose bit is to be set.
Zero-based bit position to set (0 = least-significant bit).
Generated using TypeDoc
Sets (changes to 1) the bit at the specified position in a number.
Returns
A new number with the bit at the specified position set to 1.
Example
Remarks