<?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="bitand~" module="msp" category="MSP Operators">
	<digest>
		Bitwise and-operation of floating point signals
	</digest>
	<description>
		Use the <o>bitand~</o> object to perform a bitwise intersection (a bitwise &quot;and&quot;) on two incoming floating-point signals as either raw 32-bit data or as integer values. The output is a floating-point signal composed of those bits which are 1 in both numbers.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			MSP
		</metadata>
		<metadata name="tag">
			MSP Operators
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="signal">
			<digest>
				(signal) Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="signal/int">
			<digest>
				(signal/int) Bitwise mask
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="signal">
			<digest>
				(signal) Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="bitmask" optional="1" type="int">
			<digest>
				Bitmask to be used by the <o>bitand~</o> object
			</digest>
			<description>
				Sets the bitmask to be used by the <o>bitand~</o> object. The default is <m>0</m>. An integer value can be used as a bitmask regardless of the mode; the binary representation of this integer is the bitmask.
			</description>
		</objarg>
		<objarg name="operational-mode" optional="1" type="int">
			<digest>
				Floating-point value processing mode setting
			</digest>
			<description>
				Specifies whether the floating-point signal or floating-point values will be processed as raw 32-bit floating-point values or converted to integer values for the bitwise operation. The modes of operation are listed below:
				<br />
				<br />
				0: Treat both floating-point signal inputs as raw 32-bit values (default).
				<br />
				1: Convert both floating-point signal inputs to integer values.
				<br />
				2: Treat the floating-point signal in the left inlet as a raw 32-bit value
				<br />
				3: Convert the floating-point signal in the left inlet to an integer and treat the right input as a raw 32-bit value.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="bitmask" optional="0" type="int" />
			</arglist>
			<digest>
				Use an integer value as a bitmask
			</digest>
			<description>
				In right inlet: An integer value can be used as a bitmask when supplied to the right inlet of the <o>bitand~</o> object, provided that the proper mode is set.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="bitmask" optional="0" type="float" />
			</arglist>
			<digest>
				Use a floating-point value as a bitmask
			</digest>
			<description>
				In right inlet: A floating-point value can be used as a bitmask when supplied to the right inlet of the <o>bitand~</o> object, provided that the proper mode is set.
			</description>
		</method>
		<method name="bits">
			<arglist>
				<arg name="bitmask" optional="0" type="list" />
			</arglist>
			<digest>
				Define a bitmask
			</digest>
			<description>
				In left inlet: The word <m>bits</m>, followed by a list containing 32 ones or zeros, specifies a bitmask to be used by <o>bitand~</o>. Alternately, a bitmask value can be set by using an int value in the right inlet.
			</description>
		</method>
		<method name="mode">
			<arglist>
				<arg name="behavioral-flag" optional="0" type="int" />
			</arglist>
			<digest>
				Specify processing mode for floating signal/floating-point values
			</digest>
			<description>
				In left inlet: The word <m>mode</m>, followed by a zero or one, specifies whether the floating signal or floating-point values will be processed as a raw 32-bit floating-point value or converted to an integer value for the bitwise operation. The modes of operation are:
				<br />
				<br />
				0: Treat both floating-point signal inputs as raw 32-bit values (default).
				<br />
				1: Convert both floating-point signal inputs to integer values.
				<br />
				2: Treat the floating-point signal in the left inlet as a raw 32-bit value and treat the value in the right inlet as an integer.
				<br />
				3 - Convert the floating-point signal in the left inlet to an integer and treat the right input as a raw 32-bit value.
				<br />
				<br />
				Note: If you convert the floating-point signal input to an integer and then convert it back, the resulting floating-point value will retain only 24 bits of integer resolution.
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				Function depends on inlet
			</digest>
			<description>
				In left inlet: The floating-point signal is compared, in binary form, with the floating-point signal in the right inlet. The signal can be treated as either a floating-point signal or as an integer.
				<br />
				In right inlet: The floating-point signal to be compared with the signal in the left inlet. The signal can be treated as either a floating-point signal or as an integer.
				<br />
				The raw floating-point signal bit values are expressed in the following form:
				<br />
				&lt;1 sign bit&gt; &lt;8 exponent bits&gt; &lt;23 mantissa bits&gt;
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="bitand~.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="bitshift~" />
		<seealso name="bitor~" />
		<seealso name="bitxor~" />
		<seealso name="bitnot~" />
	</seealsolist>
	<misc name="Output">
		<entry name="signal">
			<description>
				The two floating-point signals or ints received in the inlets are compared, one bit at a time. If a bit is <m>1</m> in both numbers, it will be <m>1</m> in the output number, otherwise it will be <m>0</m> in the output floating-point signal.
			</description>
		</entry>
	</misc>
</c74object>
