bit(
BIT
)

The bit( function converts a bit number (1 to 64) into a number (1, 2, 4, 8, 16, etc.)


Parameters

This function has one parameter:

bit – bit number from 1 to 64.


Description

This function converts a bit number (1 to 32) into a number (1, 2, 4, 8, 16, etc.)

bit(1) ☞ 1
bit(3) ☞ 2
bit(3) ☞ 4
bit(4) ☞ 8
bit(12) ☞ 2048
bit(31) ☞ 1073741824
bit(50) ☞ 562949953421312

Note: This function is equivalent to:

?(bitnum=64,hex("8000000000000000"),fix(2^(bitnum-1)))

See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now supports up to 64 bits (instead of 32).