<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Muhammad Rizwan Asghar</title>
	<atom:link href="http://mrizwan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mrizwan.wordpress.com</link>
	<description>Palmchip.Network.Programmer</description>
	<lastBuildDate>Thu, 27 Nov 2008 17:14:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mrizwan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Muhammad Rizwan Asghar</title>
		<link>http://mrizwan.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mrizwan.wordpress.com/osd.xml" title="Muhammad Rizwan Asghar" />
	<atom:link rel='hub' href='http://mrizwan.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Sum of Digits</title>
		<link>http://mrizwan.wordpress.com/2007/06/22/sum-of-digits/</link>
		<comments>http://mrizwan.wordpress.com/2007/06/22/sum-of-digits/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 10:01:06 +0000</pubDate>
		<dc:creator>mrizwan</dc:creator>
				<category><![CDATA[C Language]]></category>
		<category><![CDATA[Smart Operations]]></category>

		<guid isPermaLink="false">http://mrizwan.wordpress.com/2007/06/22/sum-of-digits/</guid>
		<description><![CDATA[Following is a way to sum the digits into a single digit. &#160; e.g. let we have to sum the digits of number 234578. 2 + 3 + 4 + 5 + 7 + 8 = 29; sum it again until a single digit. 2 + 9 = 11; sum it again until a single [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrizwan.wordpress.com&amp;blog=869992&amp;post=12&amp;subd=mrizwan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following is a way to sum the digits into a single digit.</p>
<p class="MsoNormal">&nbsp;</p>
<p>e.g. let we have to sum the digits of number 234578.</p>
<p>2 + 3 + 4 + 5 + 7 + 8 = 29; sum it again until a single digit.</p>
<p>2 + 9 = 11; sum it again until a single digit.</p>
<p>1 + 1 = 2 ; it is final sum of digits.</p>
<p>so sum of digits of number 234578 is 2.</p>
<p class="MsoNormal">&nbsp;</p>
<p>Here is the code for sum of digits:</p>
<p class="MsoNormal">&nbsp;</p>
<p>For any given positive integers n;</p>
<p style="text-indent:0;">if (n != 0) {</p>
<p style="text-indent:0.5in;">if (n % 9 == 0) {</p>
<p style="margin-left:0.5in;text-indent:0.5in;">return 9;</p>
<p style="text-indent:0.5in;">}</p>
<p style="text-indent:0.5in;">return n % 9;</p>
<p style="text-indent:0;">}</p>
<p style="text-indent:0;">return 0;</p>
<p class="MsoNormal">&nbsp;</p>
<p>Piece of code will always return sum of digits.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mrizwan.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mrizwan.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrizwan.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrizwan.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrizwan.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrizwan.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrizwan.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrizwan.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrizwan.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrizwan.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrizwan.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrizwan.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrizwan.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrizwan.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrizwan.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrizwan.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrizwan.wordpress.com&amp;blog=869992&amp;post=12&amp;subd=mrizwan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrizwan.wordpress.com/2007/06/22/sum-of-digits/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f4b57b9ea58eccc3d326dc9bd06dd3d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mrizwan</media:title>
		</media:content>
	</item>
		<item>
		<title>Power of Two</title>
		<link>http://mrizwan.wordpress.com/2007/04/05/7/</link>
		<comments>http://mrizwan.wordpress.com/2007/04/05/7/#comments</comments>
		<pubDate>Thu, 05 Apr 2007 09:20:48 +0000</pubDate>
		<dc:creator>mrizwan</dc:creator>
				<category><![CDATA[C Language]]></category>
		<category><![CDATA[Smart Operations]]></category>

		<guid isPermaLink="false">http://mrizwan.wordpress.com/2007/04/05/7/</guid>
		<description><![CDATA[One best way to find whether an integer is power of two or not : For any given positive integer n; return n &#38; n - 1; Expression will return: zero; if n is power of 2, non-zero; otherwise.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrizwan.wordpress.com&amp;blog=869992&amp;post=7&amp;subd=mrizwan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One best way to find whether an integer is power of two or not :</p>
<p>For any given positive integer n;</p>
<p><code>return n &amp; n - 1;</code></p>
<p>Expression will return:</p>
<p>zero; if n is power of 2,</p>
<p>non-zero; otherwise.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mrizwan.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mrizwan.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrizwan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrizwan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrizwan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrizwan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrizwan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrizwan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrizwan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrizwan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrizwan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrizwan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrizwan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrizwan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrizwan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrizwan.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrizwan.wordpress.com&amp;blog=869992&amp;post=7&amp;subd=mrizwan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrizwan.wordpress.com/2007/04/05/7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f4b57b9ea58eccc3d326dc9bd06dd3d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mrizwan</media:title>
		</media:content>
	</item>
		<item>
		<title>Integers Comparison</title>
		<link>http://mrizwan.wordpress.com/2007/03/29/integers-comparison/</link>
		<comments>http://mrizwan.wordpress.com/2007/03/29/integers-comparison/#comments</comments>
		<pubDate>Thu, 29 Mar 2007 11:55:54 +0000</pubDate>
		<dc:creator>mrizwan</dc:creator>
				<category><![CDATA[C Language]]></category>
		<category><![CDATA[Smart Operations]]></category>

		<guid isPermaLink="false">http://mrizwan.wordpress.com/2007/03/29/integers-comparison/</guid>
		<description><![CDATA[Best way to compare equality of two integer variables without using comparison operator is: For any given integers a and b; return a ^ b; Expression will return: zero; if a and b are equal, non-zero; otherwise.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrizwan.wordpress.com&amp;blog=869992&amp;post=6&amp;subd=mrizwan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Best way to compare equality of two integer variables without using comparison operator is:</p>
<p>For any given integers a and b;</p>
<p><code>return a ^ b;</code></p>
<p>Expression will return:</p>
<p>zero; if a and b are equal,</p>
<p>non-zero; otherwise.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mrizwan.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mrizwan.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrizwan.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrizwan.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrizwan.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrizwan.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrizwan.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrizwan.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrizwan.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrizwan.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrizwan.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrizwan.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrizwan.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrizwan.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrizwan.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrizwan.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrizwan.wordpress.com&amp;blog=869992&amp;post=6&amp;subd=mrizwan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrizwan.wordpress.com/2007/03/29/integers-comparison/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f4b57b9ea58eccc3d326dc9bd06dd3d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mrizwan</media:title>
		</media:content>
	</item>
		<item>
		<title>Swapping Integer Variables</title>
		<link>http://mrizwan.wordpress.com/2007/03/22/swapping-integers/</link>
		<comments>http://mrizwan.wordpress.com/2007/03/22/swapping-integers/#comments</comments>
		<pubDate>Thu, 22 Mar 2007 07:48:31 +0000</pubDate>
		<dc:creator>mrizwan</dc:creator>
				<category><![CDATA[C Language]]></category>
		<category><![CDATA[Smart Operations]]></category>

		<guid isPermaLink="false">http://mrizwan.wordpress.com/2007/03/22/swapping-integers/</guid>
		<description><![CDATA[Two integer variables can be swapped in many different ways. One of the best way to swap is given below. For any given integers a and b; a ^= b ^= a ^= b;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrizwan.wordpress.com&amp;blog=869992&amp;post=5&amp;subd=mrizwan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Two integer variables can be swapped in many different ways.</p>
<p>One of the best way to swap is given below.</p>
<p>For any given integers a and b;</p>
<p><code>a ^= b ^= a ^= b;</code></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mrizwan.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mrizwan.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrizwan.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrizwan.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrizwan.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrizwan.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrizwan.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrizwan.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrizwan.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrizwan.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrizwan.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrizwan.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrizwan.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrizwan.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrizwan.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrizwan.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrizwan.wordpress.com&amp;blog=869992&amp;post=5&amp;subd=mrizwan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrizwan.wordpress.com/2007/03/22/swapping-integers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f4b57b9ea58eccc3d326dc9bd06dd3d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mrizwan</media:title>
		</media:content>
	</item>
		<item>
		<title>An Alternative Multiplication Operation</title>
		<link>http://mrizwan.wordpress.com/2007/03/21/an-alternative-multiplication-operation/</link>
		<comments>http://mrizwan.wordpress.com/2007/03/21/an-alternative-multiplication-operation/#comments</comments>
		<pubDate>Wed, 21 Mar 2007 09:37:59 +0000</pubDate>
		<dc:creator>mrizwan</dc:creator>
				<category><![CDATA[C Language]]></category>
		<category><![CDATA[Smart Operations]]></category>

		<guid isPermaLink="false">http://mrizwan.wordpress.com/2007/03/21/an-alternative-multiplication-operation/</guid>
		<description><![CDATA[Raheel Shahzad who was my senior at Palmchip and the best Pakistani programmer I have seen so far on acm site, has asked how to make faster the following expression. For any given integer n; n = n * 7; I come up with the follwoing solution. n = (n &#60;&#60; 3) - n; Limitation: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrizwan.wordpress.com&amp;blog=869992&amp;post=3&amp;subd=mrizwan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Raheel Shahzad who was my senior at Palmchip and the best Pakistani programmer I have seen so far on acm site, has asked how to make faster the following expression.</p>
<p>For any given integer n; <code>n = n * 7;</code></p>
<p>I come up with the follwoing solution.</p>
<p><code>n = (n &lt;&lt; 3) - n;</code></p>
<p>Limitation: n can overflow.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mrizwan.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mrizwan.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mrizwan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mrizwan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mrizwan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mrizwan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mrizwan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mrizwan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mrizwan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mrizwan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mrizwan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mrizwan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mrizwan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mrizwan.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mrizwan.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mrizwan.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mrizwan.wordpress.com&amp;blog=869992&amp;post=3&amp;subd=mrizwan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mrizwan.wordpress.com/2007/03/21/an-alternative-multiplication-operation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0f4b57b9ea58eccc3d326dc9bd06dd3d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mrizwan</media:title>
		</media:content>
	</item>
	</channel>
</rss>
