<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Assigment operator | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/assigment-operator/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sat, 10 Dec 2022 04:46:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>Operators in C++ Part III</title>
		<link>https://studentprojects.in/software-development/cpp/c-tutorials-cpp/operators-in-c-part-iii/</link>
					<comments>https://studentprojects.in/software-development/cpp/c-tutorials-cpp/operators-in-c-part-iii/#respond</comments>
		
		<dc:creator><![CDATA[Shubhajna Rai]]></dc:creator>
		<pubDate>Mon, 12 Dec 2022 07:53:00 +0000</pubDate>
				<category><![CDATA[C++ Tutorials]]></category>
		<category><![CDATA[operators in c]]></category>
		<category><![CDATA[bitwise operator]]></category>
		<category><![CDATA[Assigment operator]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=9831</guid>

					<description><![CDATA[<p>Bitwise Operators At the bit level, operations are carried out using a bitwise operator. They translate our input values into binary format, process them using the appropriate operator, and output the results. Operator Description &#38; Bitwise AND &#124; Bitwise OR ^ Bitwise XOR ~ Bitwise Complement &#62;&#62; Shift Right Operator &#60;&#60; Shift Left Operator Output:</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/c-tutorials-cpp/operators-in-c-part-iii/">Operators in C++ Part III</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<h3>Bitwise Operators</h3>



<p>At the bit level, operations are carried out using a bitwise operator. They translate our input values into binary format, process them using the appropriate operator, and output the results.</p>



<figure class="wp-block-table"><table><tbody><tr><td>Operator</td><td>Description</td></tr><tr><td>&amp;</td><td>Bitwise AND</td></tr><tr><td>|</td><td>Bitwise OR</td></tr><tr><td>^</td><td>Bitwise XOR</td></tr><tr><td>~</td><td>Bitwise Complement</td></tr><tr><td>&gt;&gt;</td><td>Shift Right Operator</td></tr><tr><td>&lt;&lt;</td><td>Shift Left Operator</td></tr></tbody></table></figure>



<pre class="wp-block-code"><code lang="cpp" class="language-cpp">#include &lt;iostream&gt;
using namespace std;
 
int main()
{
    int a = 13; //1101
    int b = 5;  //101
    cout &lt;&lt; "The value of a &amp; b is " &lt;&lt; (a &amp; b) &lt;&lt; endl;
    cout &lt;&lt; "The value of a | b is " &lt;&lt; (a | b) &lt;&lt; endl;
    cout &lt;&lt; "The value of a ^ b is " &lt;&lt; (a ^ b) &lt;&lt; endl;
    cout &lt;&lt; "The value of ~a is " &lt;&lt; (~a) &lt;&lt; endl;
    cout &lt;&lt; "The value of a &gt;&gt; 2 is " &lt;&lt; (a &gt;&gt; 2) &lt;&lt; endl;
    cout &lt;&lt; "The value of a &lt;&lt; 2 is " &lt;&lt; (a &lt;&lt; 2) &lt;&lt; endl;
}
</code></pre>



<p>Output:</p>



<pre class="wp-block-code"><code lang="cpp" class="language-cpp">The value of a &amp; b is 5
The value of a | b is 13
The value of a ^ b is 8
The value of ~a is -14
The value of a &gt;&gt; 2 is 3
The value of a &lt;&lt; 2 is 52</code></pre>



<h3>Assignment Operators</h3>



<p>Values are assigned using assignment operators. They will be incorporated into nearly every programme we create.</p>



<pre class="wp-block-code"><code lang="cpp" class="language-cpp">int a = 0;
int b = 1;</code></pre>



<figure class="wp-block-table"><table><tbody><tr><td>Operator</td><td>Description</td></tr><tr><td>=</td><td>It assigns the right side operand value to the left side operand.</td></tr><tr><td>+=</td><td>It adds the right operand to the left operand and assigns the result to the left operand.</td></tr><tr><td>-=</td><td>It subtracts the right operand from the left operand and assigns the result to the left operand.</td></tr><tr><td>*=</td><td>It multiplies the right operand with the left operand and assigns the result to the left operand.</td></tr><tr><td>/=</td><td>It divides the left operand with the right operand and assigns the result to the left operand.</td></tr></tbody></table></figure>



<h3>Inherent Operator Priority and Associativity</h3>



<p><strong>Operator priority</strong></p>



<p>It assists us in solving an equation by allowing us to distinguish which operator comes before another. Think about the phrase a+b*c. Given that the precedence of the multiplication operator is higher than the precedence of the addition operator, multiplication between a and b will now be completed before the addition operation.</p>



<p><strong>Associativity of operators</strong></p>



<p>When two or more operators with the same precedence are combined in an expression, it aids in solving the expression. It aids in determining whether to begin solving the expression comprising operators with the same precedence from the left to the right or vice versa.</p><p>The post <a href="https://studentprojects.in/software-development/cpp/c-tutorials-cpp/operators-in-c-part-iii/">Operators in C++ Part III</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/cpp/c-tutorials-cpp/operators-in-c-part-iii/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
