Lingo Dictionary > A-C > bitAnd() |
![]() ![]() ![]() |
bitAnd()
Syntax
bitAnd(
integer1
,
integer2
)
Description
Function; converts the two specified integers to 32-bit binary numbers and returns a binary number whose digits are 1's in the positions where both numbers had a 1, and 0's in every other position. The result is the new binary number, which Lingo displays as a base 10 integer.
Integer |
Binary number (abbreviated) |
---|---|
6 |
00110 |
7 |
00111 |
Result |
|
6 |
00110 |
Example
This statement compares the binary versions of the integers 6 and 7 and returns the result as an integer:
put bitAnd(6, 7) -- 6
See also
![]() ![]() ![]() |