$and returns the AND operation of the two numbers, the numbers are decimal not binary.
- <A> - The first number
- <B> - The second number
Only bits which are both 1 return 1, otherwise the bit is 0
//var %n1 14 | var %n2 27 | echo -a $base(%n1,10,2,8) | echo -a $base(%n2,10,2,8) | echo -a $str(-,8) | echo -a $base($and(%n1,%n2),10,2,8) ; returns: 00001110 00011011 -------- 00001010 $and returns the answer as a decimal number, so the answer 10 is the decimal representation of binary 1010.
Added: mIRC v5.61
Added on: 23 Sep 1999
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.