<?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: Gray code to Binary conversion for PSK and PAM</title>
	<atom:link href="http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/</link>
	<description>Signal Processing for Communication</description>
	<lastBuildDate>Fri, 10 Feb 2012 01:03:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Krishna Sankar</title>
		<link>http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/#comment-56097</link>
		<dc:creator>Krishna Sankar</dc:creator>
		<pubDate>Sun, 22 May 2011 21:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.dsplog.com/?p=151#comment-56097</guid>
		<description>@shanu: you might want to check dec2bin() function in matlab</description>
		<content:encoded><![CDATA[<p>@shanu: you might want to check dec2bin() function in matlab</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shanu</title>
		<link>http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/#comment-55694</link>
		<dc:creator>shanu</dc:creator>
		<pubDate>Thu, 19 May 2011 06:17:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.dsplog.com/?p=151#comment-55694</guid>
		<description>i want a c program for converting a digital signal into binary format??????? pls help me</description>
		<content:encoded><![CDATA[<p>i want a c program for converting a digital signal into binary format??????? pls help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krishna Sankar</title>
		<link>http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/#comment-36151</link>
		<dc:creator>Krishna Sankar</dc:creator>
		<pubDate>Sun, 05 Sep 2010 01:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dsplog.com/?p=151#comment-36151</guid>
		<description>@sneha: What is kmaps?</description>
		<content:encoded><![CDATA[<p>@sneha: What is kmaps?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sneha</title>
		<link>http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/#comment-35803</link>
		<dc:creator>sneha</dc:creator>
		<pubDate>Wed, 01 Sep 2010 05:44:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.dsplog.com/?p=151#comment-35803</guid>
		<description>i want conversion of gray code to binary code using kmaps???????if this is thereplz tel me???not there den tel me d reason</description>
		<content:encoded><![CDATA[<p>i want conversion of gray code to binary code using kmaps???????if this is thereplz tel me???not there den tel me d reason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krishna Sankar</title>
		<link>http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/#comment-34108</link>
		<dc:creator>Krishna Sankar</dc:creator>
		<pubDate>Fri, 30 Jul 2010 01:36:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.dsplog.com/?p=151#comment-34108</guid>
		<description>@Bob: Thanks much. :)
I will try to digest and get back, for any clarifications...</description>
		<content:encoded><![CDATA[<p>@Bob: Thanks much. <img src='http://www.dsplog.com/db-install/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I will try to digest and get back, for any clarifications&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/#comment-34097</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Thu, 29 Jul 2010 21:12:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.dsplog.com/?p=151#comment-34097</guid>
		<description>Since you ask how it works, here is an explanation:

Notation: A single letter represents an 8 bit value
A single letter followed by a digit represents one bit in that 8 bit value.
Bits are numbered from right to left, so bit n has the value 2^n.

Start with the binary value b.
b=b7;b6;b5;b4;b3;b2;b1;b0

Compute its gray code, g = b ^ ( b &gt;&gt; 1 )
g=g7;g6;g5;g4;g3;g2;g1;g0
[0] g7=b7; g6=b7^b6; g5=b6^b5; g4=b5^b4; g3=b4^b3; g2=b3^b2; g1=b2^b1; g0=b1^b0

Now recover the original binary value from g in three steps
[1] x = g ^ (g &gt;&gt; 4)
x=x7;x6;x5;x4;x3;x2;x1;x0
x7=g7; x6=g6; x5=g5; x4=g4 x3=g3^g7 x2=g2^g6 x1=g1^g5; x0=g0^g4

[2] y = x ^ (x &gt;&gt; 2)
y=y7;y6;y5;y4;y3;y2;y1;y0
y7=x7; y6=x6; y5=x5^x7; y4=x4^x6; y3=x3^x5; y2=x2^x4; y1=x1^x3; y0=x0^x2

substitute eqn [1] into eqn [2]
[2a] y7=g7; y6=g6; y5=g5^g7; y4=g4^g6; y3=g3^g7^g5; y2=g2^g6^g4; y1=g1^g5^g3^g7; y0=g0^g4^g2^g6

[3] z = y ^ (y &gt;&gt; 1)
z7=y7; z6=y6^y7; z5=y5^y6; z4=y4^y5; z3=y3^y4; z2=y2^y3; z1=y1^y2; z0=y0^y1

Substitute eqn [2a] into eqn [3]
[3a] z7=g7; z6=g6^g7; z5=g5^g7^g6; z4=g4^g6^g5^g7; z3=g3^g7^g5^g4^g6; z2=g2^g6^g4^g3^g7^g5; z1=g1^g5^g3^g7^g2^g6^g4; z0=g0^g4^g2^g6^g1^g5^g3^g7

Substitute eqn [0] into eqn [3a]
[3b] z7=b7;
     z6=b7^b6^b7;
     z5=b6^b5^b7^b7^b6;
     z4=b5^b4^b7^b6^b6^b5^b7;
     z3=b4^b3^b7^b6^b5^b5^b4^b7^b6;
     z2=b3^b2^b7^b6^b5^b4^b4^b3^b7^b6^b5;
     z1=b2^b1^b6^b5^b4^b3^b7^b3^b2^b7^b6^b5^b4;
     z0=b1^b0^b5^b4^b3^b2^b7^b6^b2^b1^b6^b5^b4^b3^b7

Rearrange the bits on the right
[3c] z7=b7;
     z6=b6^b7^b7;
     z5=b5^b6^b6^b7^b7;
     z4=b4^b5^b5^b6^b6^b7^b7;
     z3=b3^b4^b4^b5^b5^b6^b6^b7^b7;
     z2=b2^b3^b3^b4^b4^b5^b5^b6^b6^b7^b7;
     z1=b1^b3^b3^b2^b2^b4^b4^b5^b5^b6^b6^b7^b7;
     z0=b0^b1^b1^b2^b2^b3^b3^b4^b4^b5^b5^b6^b6^b7^b7

Now, because x^x=0 and y^0=y, we can just remove each identical pair
[3c] z7=b7;
     z6=b6;
     z5=b5;
     z4=b4;
     z3=b3;
     z2=b2;
     z1=b1;
     z0=b0;

And that&#039;s how it works.</description>
		<content:encoded><![CDATA[<p>Since you ask how it works, here is an explanation:</p>
<p>Notation: A single letter represents an 8 bit value<br />
A single letter followed by a digit represents one bit in that 8 bit value.<br />
Bits are numbered from right to left, so bit n has the value 2^n.</p>
<p>Start with the binary value b.<br />
b=b7;b6;b5;b4;b3;b2;b1;b0</p>
<p>Compute its gray code, g = b ^ ( b &gt;&gt; 1 )<br />
g=g7;g6;g5;g4;g3;g2;g1;g0<br />
[0] g7=b7; g6=b7^b6; g5=b6^b5; g4=b5^b4; g3=b4^b3; g2=b3^b2; g1=b2^b1; g0=b1^b0</p>
<p>Now recover the original binary value from g in three steps<br />
[1] x = g ^ (g &gt;&gt; 4)<br />
x=x7;x6;x5;x4;x3;x2;x1;x0<br />
x7=g7; x6=g6; x5=g5; x4=g4 x3=g3^g7 x2=g2^g6 x1=g1^g5; x0=g0^g4</p>
<p>[2] y = x ^ (x &gt;&gt; 2)<br />
y=y7;y6;y5;y4;y3;y2;y1;y0<br />
y7=x7; y6=x6; y5=x5^x7; y4=x4^x6; y3=x3^x5; y2=x2^x4; y1=x1^x3; y0=x0^x2</p>
<p>substitute eqn [1] into eqn [2]<br />
[2a] y7=g7; y6=g6; y5=g5^g7; y4=g4^g6; y3=g3^g7^g5; y2=g2^g6^g4; y1=g1^g5^g3^g7; y0=g0^g4^g2^g6</p>
<p>[3] z = y ^ (y &gt;&gt; 1)<br />
z7=y7; z6=y6^y7; z5=y5^y6; z4=y4^y5; z3=y3^y4; z2=y2^y3; z1=y1^y2; z0=y0^y1</p>
<p>Substitute eqn [2a] into eqn [3]<br />
[3a] z7=g7; z6=g6^g7; z5=g5^g7^g6; z4=g4^g6^g5^g7; z3=g3^g7^g5^g4^g6; z2=g2^g6^g4^g3^g7^g5; z1=g1^g5^g3^g7^g2^g6^g4; z0=g0^g4^g2^g6^g1^g5^g3^g7</p>
<p>Substitute eqn [0] into eqn [3a]<br />
[3b] z7=b7;<br />
     z6=b7^b6^b7;<br />
     z5=b6^b5^b7^b7^b6;<br />
     z4=b5^b4^b7^b6^b6^b5^b7;<br />
     z3=b4^b3^b7^b6^b5^b5^b4^b7^b6;<br />
     z2=b3^b2^b7^b6^b5^b4^b4^b3^b7^b6^b5;<br />
     z1=b2^b1^b6^b5^b4^b3^b7^b3^b2^b7^b6^b5^b4;<br />
     z0=b1^b0^b5^b4^b3^b2^b7^b6^b2^b1^b6^b5^b4^b3^b7</p>
<p>Rearrange the bits on the right<br />
[3c] z7=b7;<br />
     z6=b6^b7^b7;<br />
     z5=b5^b6^b6^b7^b7;<br />
     z4=b4^b5^b5^b6^b6^b7^b7;<br />
     z3=b3^b4^b4^b5^b5^b6^b6^b7^b7;<br />
     z2=b2^b3^b3^b4^b4^b5^b5^b6^b6^b7^b7;<br />
     z1=b1^b3^b3^b2^b2^b4^b4^b5^b5^b6^b6^b7^b7;<br />
     z0=b0^b1^b1^b2^b2^b3^b3^b4^b4^b5^b5^b6^b6^b7^b7</p>
<p>Now, because x^x=0 and y^0=y, we can just remove each identical pair<br />
[3c] z7=b7;<br />
     z6=b6;<br />
     z5=b5;<br />
     z4=b4;<br />
     z3=b3;<br />
     z2=b2;<br />
     z1=b1;<br />
     z0=b0;</p>
<p>And that&#8217;s how it works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krishna Sankar</title>
		<link>http://www.dsplog.com/2008/05/12/gray-code-to-binary-conversion-for-psk-pam/#comment-24711</link>
		<dc:creator>Krishna Sankar</dc:creator>
		<pubDate>Sat, 03 Apr 2010 23:43:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.dsplog.com/?p=151#comment-24711</guid>
		<description>@rayan2: It does the same thing? How does that work?</description>
		<content:encoded><![CDATA[<p>@rayan2: It does the same thing? How does that work?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.dsplog.com @ 2012-02-11 01:02:17 -->
