<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>Comments on: query regarding bit shift operations</title>
	<atom:link href="https://www.emblogic.com/blog/07/query-regarding-bit-shift-operations/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog/07/query-regarding-bit-shift-operations/</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Mon, 07 Oct 2013 04:00:03 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>By: saurabh.gulia</title>
		<link>https://www.emblogic.com/blog/07/query-regarding-bit-shift-operations/#comment-986</link>
		<dc:creator><![CDATA[saurabh.gulia]]></dc:creator>
		<pubDate>Sat, 14 Jul 2012 18:28:16 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=3739#comment-986</guid>
		<description><![CDATA[but if we take unsigned int then it is giving 255....
why??]]></description>
		<content:encoded><![CDATA[<p>but if we take unsigned int then it is giving 255&#8230;.<br />
why??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ashish.dahiya</title>
		<link>https://www.emblogic.com/blog/07/query-regarding-bit-shift-operations/#comment-922</link>
		<dc:creator><![CDATA[ashish.dahiya]]></dc:creator>
		<pubDate>Tue, 03 Jul 2012 11:14:02 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=3739#comment-922</guid>
		<description><![CDATA[hi,,,
we have i=255;
its bit pattern is
00000000 00000000 00000000 11111111
now applying only i&lt;&lt;24
00000000 00000000 11111111 00000000 (8) shift
00000000 11111111 00000000 00000000 (16) shift
11111111 00000000 00000000 00000000  (24) shift
now i=i&lt;&gt;24
in right shifting (we follow arithmetic shifting) in which if the leftmost bit is 1 then we will fill it with 0 .if leftmost bit is 1 then it is filled with 1;(this is exception in right shift while there is not such exception in left shifting).
on first 8bit right shifting we get
11111111 11111111 00000000 00000000
on 16 bit shifting we get
11111111 11111111 11111111 00000000
on 24 bit shifting
11111111 11111111 1111111 11111111
after shifting this is assigned to i 
i=i&gt;&gt;24;
so i becomes 
i=11111111 11111111 1111111 11111111
and in decimal form this is (-1).]]></description>
		<content:encoded><![CDATA[<p>hi,,,<br />
we have i=255;<br />
its bit pattern is<br />
00000000 00000000 00000000 11111111<br />
now applying only i&lt;&lt;24<br />
00000000 00000000 11111111 00000000 (8) shift<br />
00000000 11111111 00000000 00000000 (16) shift<br />
11111111 00000000 00000000 00000000  (24) shift<br />
now i=i&lt;&gt;24<br />
in right shifting (we follow arithmetic shifting) in which if the leftmost bit is 1 then we will fill it with 0 .if leftmost bit is 1 then it is filled with 1;(this is exception in right shift while there is not such exception in left shifting).<br />
on first 8bit right shifting we get<br />
11111111 11111111 00000000 00000000<br />
on 16 bit shifting we get<br />
11111111 11111111 11111111 00000000<br />
on 24 bit shifting<br />
11111111 11111111 1111111 11111111<br />
after shifting this is assigned to i<br />
i=i&gt;&gt;24;<br />
so i becomes<br />
i=11111111 11111111 1111111 11111111<br />
and in decimal form this is (-1).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kuldeep Dhanotia</title>
		<link>https://www.emblogic.com/blog/07/query-regarding-bit-shift-operations/#comment-903</link>
		<dc:creator><![CDATA[Kuldeep Dhanotia]]></dc:creator>
		<pubDate>Mon, 02 Jul 2012 11:58:56 +0000</pubDate>
		<guid isPermaLink="false">http://emblogic.org/blog/?p=3739#comment-903</guid>
		<description><![CDATA[u have taken int and it is four byte long take it as char then check the output.]]></description>
		<content:encoded><![CDATA[<p>u have taken int and it is four byte long take it as char then check the output.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
