BIT
|
Syntax: |
BIT(<Number>,<Start-Position>,<End-Position>)
|
||||||
|
Meaning: |
Returns the value of a single bit or of
several bits of the number <Number>. The number of bits is specified by
<Start-Position> and <End-Position>. <Start-Position> must be <=
<End-Position> otherwise BIT returns -1. Attention:
The bits are counted from right to left beginning with 0. |
||||||
|
Parameter: |
|
||||||
|
Sample: |
The
bits of number 89 are: 1 0 1 1 0 0 1 BIT(89,0,0)
returns 1 BIT(89,1,1)
returns 0 BIT(89,2,2)
returns 0 BIT(89,3,3)
returns 1 BIT(89,4,4)
returns 1 BIT(89,5,5)
returns 0 BIT(89,6,6)
returns 1 BIT(89,1,4)
returns 12: This is the value of bits 1 to 4: 1 1 0 0 |
||||||
|
See also: |
|