<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="&amp;" module="max" category="Math">
	<digest>
		Bitwise intersection of two numbers
	</digest>
	<description>
		Performs a bit-by-bit AND of two numbers as expressed in binary. Outputs a number composed of all those bits which are 1 in both of the two numbers.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Math
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Set Left Operand, Trigger the Calculation
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				Set Right Operand
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Result = Left &amp; Right
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="initial-value" optional="1" type="int">
			<digest>
				Operand value
			</digest>
			<description>
				Sets an initial value to be AND-ed with a number received in the left inlet.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Perform the calculation with the most recent values
			</digest>
			<description>
				In left inlet: Performs the comparison with the numbers currently stored. If there is no argument, <o>&amp;</o> initially holds 0 for comparison.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Bitwise AND value, cause output
			</digest>
			<description>
				In left inlet: The number is compared, in binary form, with the number in the right inlet. The output is a number composed of those bits which are 1 in both numbers.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Bitwise AND value, cause output
			</digest>
			<description>
				Converted to <m>int</m>.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="comparison-number" optional="0" type="int" />
			</arglist>
			<digest>
				Replace right operand
			</digest>
			<description>
				In right inlet: The number is stored for comparison with a number received in the left inlet.
			</description>
		</method>
		<method name="set">
			<arglist>
				<arg name="set-input" optional="0" type="int" />
			</arglist>
			<digest>
				Set the incoming value without output
			</digest>
			<description>
				In left inlet: The word <m>set</m> followed by a number will set the input to the bitwise-and operation without causing output (a successive <m>bang</m> will output the result).
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="number" />
				<arg name="comparison-value" optional="0" type="number" />
			</arglist>
			<digest>
				Bitwise AND two numbers
			</digest>
			<description>
				In left inlet: Compares the first and second numbers bit-by-bit, and outputs a number composed of those bits which are 1 in both numbers.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="bitand.png" caption="Nonzero bits shared by both numbers........ Can be used as an odd/even detector" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="&amp;&amp;" />
		<seealso name="|" />
		<seealso name="||" />
		<seealso name="basicchapter19" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				The two numbers received in the inlets are compared, one bit at a time. If a bit is 1 in both numbers, it will be 1 in the output number, otherwise it will be 0 in the output number.
			</description>
		</entry>
	</misc>
</c74object>
