This table describes the bit functions supplied in free-form RPG.
| BITAND | BITOR | BITXOR | BITNOT | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
If the bits in the same position in all the input parameters are 1, BITAND will return 1 in that position. |
If any bit is 1 in at least one input parameter, BITOR will return 1 in that position. |
If any bit is 1 in only one input parameter, BITXOR will return 1 in that position. |
Each 1 in the input parameter is returned as 0 and each 0 is returned as 1. |
||||||||||||||||||||||
|
|
|
|
||||||||||||||||||||||
BITAND takes two or more input parameters and returns a value. The parameters and return value are either character or numeric
(integer or signed numeric). |
BITOR takes two or more input parameters and returns a value. The parameters and return value are either character or numeric
(integer or signed numeric). |
BITXOR takes two input parameters and returns a value. The parameters and return value are either character or numeric
(integer or signed numeric). |
BITNOT takes one input parameter and returns a value. The parameter and return value are either character or numeric
(integer or signed numeric). |