From WikiChip
Difference between revisions of "mirc/identifiers/$and"
< mirc‎ | identifiers

(Example)
Line 15: Line 15:
 
<source lang="mIRC">//echo -a $and(7,32)</source>
 
<source lang="mIRC">//echo -a $and(7,32)</source>
 
Would display "0", only bit which are both 1 gives 1, otherwise it gives 0
 
Would display "0", only bit which are both 1 gives 1, otherwise it gives 0
7 is in  binary: 000111
+
<pre>7 is in  binary: 000111
 
                 &           
 
                 &           
 
32 is in binary: 100000
 
32 is in binary: 100000
 
                  
 
                  
 
                 000000
 
                 000000
 +
</pre>
  
 
== Compatibility ==
 
== Compatibility ==

Revision as of 16:02, 10 October 2016

$and returns the AND operation of the two numbers, the numbers are decimal not binary.

Synopsis

$addtok(<A>,<B>)

Paramters

  • <A> - The first number
  • <B> - The second number

Properties

None

Example

//echo -a $and(7,32)

Would display "0", only bit which are both 1 gives 1, otherwise it gives 0

7 is in  binary: 000111
                 &           
32 is in binary: 100000
                
                 000000

Compatibility

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.


See Also

$not $or $xor $biton $bitoff $isbit