<?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="bitshift~" module="msp" category="MSP Operators">
	<digest>
		Bit shifting for floating point signals
	</digest>
	<description>
		Use the <o>bitshift~</o> object to perform bitwise operations on a floating point signal as bits or as an integer.
	</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">
			<digest>
			</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="number-of-bits/direction-of-shift" optional="1" type="int">
			<digest>
				Number of bits to be shifted
			</digest>
			<description>
				Sets the number of bits to be shifted on the incoming floating-point signal. Positive shift values correspond to left shifting that number of bits, negative shift values correspond to right shifting that number of bits.
			</description>
		</objarg>
		<objarg name="operational-mode" optional="1" type="int">
			<digest>
				Processing mode for floating signal/floating-point values
			</digest>
			<description>
				Specifies whether the floating-point signal or floating-point value will be processed as a raw 32-bit floating-point value or converted to an integer value for bit shifting. The modes of operation are listed below.
				<br />
				<br />
				0: Treat floating-point signal input as a raw 32-bit value (default).
				<br />
				1: Convert the floating-point signal input to an integer value.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="operational-mode" optional="0" type="int" />
			</arglist>
			<digest>
				Sets the operational mode of the <o>bitshift~</o> object as described by the <m>mode</m> message
			</digest>
			<description>
				Sets the operational mode of the <o>bitshift~</o> object as described by the <m>mode</m> message.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="operational-mode (0 or 1)" optional="0" type="float" />
			</arglist>
			<digest>
				Performs the same function as <m>int</m> 
			</digest>
			<description>
				Performs the same function as <m>int</m>.
			</description>
		</method>
		<method name="mode">
			<arglist>
				<arg name="operational-mode" 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 value will be processed as a raw 32-bit floating-point value or converted to an integer value for bit shifting. The modes of operation are:
				<br />
				<br />
				Mode Descriptions:
				<br />
				0 - Treat floating-point signal input as a raw 32-bit value (default).
				<br />
				1 - Convert the floating-point signal input to an integer value.
				<br />
				Note: If you convert the floating-point signal input to an int and then convert it back, the resulting floating-point value will retain only 24 bits of integer resolution.
			</description>
		</method>
		<method name="shift">
			<arglist>
				<arg name="number-of-bits/direction-of-shift" optional="0" type="int" />
			</arglist>
			<digest>
				In left inlet: The word <m>shift</m>, followed by a positive or negative number, specifies the number of bits to be shifted on the incoming floating-point signal. Positive number values correspond to left shifting that number of bits (i.e., Left shifting a number n places is the same as dividing it by 2n)
			</digest>
			<description>
				In left inlet: The word <m>shift</m>, followed by a positive or negative number, specifies the number of bits to be shifted on the incoming floating-point signal. Positive number values correspond to left shifting that number of bits (i.e., Left shifting a number n places is the same as dividing it by 2n). Negative numbers correspond to right shifting that number of bits (i.e., Right shifting a number n places is the same as dividing it by 2n).
			</description>
		</method>
		<method name="signal">
			<arglist />
			<digest>
				The <o>bitshift~</o> object performs bit shifting on a floating-point signal as either raw 32-bit data or as an integer value
			</digest>
			<description>
				The <o>bitshift~</o> object performs bit shifting on a floating-point signal as either raw 32-bit data or as an integer value.
				<br />
				Floating-point signal bit values are expressed in the following form: &lt;1 sign bit&gt; &lt;8 exponent bits&gt; &lt;23 mantissa bits&gt;
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="bitshift~.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="bitand~" />
		<seealso name="bitor~" />
		<seealso name="bitxor~" />
		<seealso name="bitnot~" />
	</seealsolist>
	<discussion>
		Note that if you are converting the floats to ints and back that single precision floating point values only retain 24 bits of integer resolution. The floating point bits from left to right are &lt;1 sign bit&gt; &lt;8 exponent bits&gt; &lt;23 mantissa bits&gt;. Positive shift values correspond to left shifting that number of bits, negative shift values correspond to right shifting that number of bits.
	</discussion>
	<misc name="Output">
		<entry name="signal">
			<description>
				The resulting bit shifted floating-point signal.
			</description>
		</entry>
	</misc>
</c74object>
