<?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: 一道位域笔试题</title>
	<atom:link href="http://blog.phio.me/2009/09/a-bitfield-problem/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.phio.me/2009/09/a-bitfield-problem/</link>
	<description>别想太多</description>
	<lastBuildDate>Tue, 04 Jan 2011 15:45:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: ignace</title>
		<link>http://blog.phio.me/2009/09/a-bitfield-problem/comment-page-1/#comment-169</link>
		<dc:creator>ignace</dc:creator>
		<pubDate>Thu, 26 Nov 2009 09:25:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.phio.me/?p=152#comment-169</guid>
		<description>你的解释应该是不正确的。x86是MSB0 (bit)的，但是是LSB (byte)的。所以，在内存里面, V的存放为:

Byte 0: 0110 0100
Byte 1: 0000 0000

根据i386 ABI,因为i386是LSB (byte), 16bit short 应该这么去解释
在寄存器里
0000 0000  0110 0100
[ byte 1 ] [byte 0 ]
MS                 LS
所以
s1= 0x100 4 (LS 低三位)
s2= 0x100 4 (LS 中间三位)
s3= 0x001 1 (byte0/byte1 组合起来)

对于MSB (byte) 来说 16 bit short 为 byte 0, byte 1
0110 0100 0000 0000
[byte 0 ] [ byte 1]
MS               LS

s1=011
s2=001
s3=000</description>
		<content:encoded><![CDATA[<p>你的解释应该是不正确的。x86是MSB0 (bit)的，但是是LSB (byte)的。所以，在内存里面, V的存放为:</p>
<p>Byte 0: 0110 0100<br />
Byte 1: 0000 0000</p>
<p>根据i386 ABI,因为i386是LSB (byte), 16bit short 应该这么去解释<br />
在寄存器里<br />
0000 0000  0110 0100<br />
[ byte 1 ] [byte 0 ]<br />
MS                 LS<br />
所以<br />
s1= 0&#215;100 4 (LS 低三位)<br />
s2= 0&#215;100 4 (LS 中间三位)<br />
s3= 0&#215;001 1 (byte0/byte1 组合起来)</p>
<p>对于MSB (byte) 来说 16 bit short 为 byte 0, byte 1<br />
0110 0100 0000 0000<br />
[byte 0 ] [ byte 1]<br />
MS               LS</p>
<p>s1=011<br />
s2=001<br />
s3=000</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phio</title>
		<link>http://blog.phio.me/2009/09/a-bitfield-problem/comment-page-1/#comment-168</link>
		<dc:creator>phio</dc:creator>
		<pubDate>Sat, 14 Nov 2009 14:44:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.phio.me/?p=152#comment-168</guid>
		<description>献丑献丑，欢迎Wei哥指教 :-)</description>
		<content:encoded><![CDATA[<p>献丑献丑，欢迎Wei哥指教 <img src='http://blog.phio.me/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zweily</title>
		<link>http://blog.phio.me/2009/09/a-bitfield-problem/comment-page-1/#comment-167</link>
		<dc:creator>zweily</dc:creator>
		<pubDate>Sat, 14 Nov 2009 14:34:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.phio.me/?p=152#comment-167</guid>
		<description>技术贴要支持的，而且这个考题，其实我们公司的笔试题里有一道类似的，嘿嘿</description>
		<content:encoded><![CDATA[<p>技术贴要支持的，而且这个考题，其实我们公司的笔试题里有一道类似的，嘿嘿</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phio</title>
		<link>http://blog.phio.me/2009/09/a-bitfield-problem/comment-page-1/#comment-166</link>
		<dc:creator>phio</dc:creator>
		<pubDate>Thu, 10 Sep 2009 14:22:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.phio.me/?p=152#comment-166</guid>
		<description>那看样子这篇帖子还是比较通俗易懂的了，哈哈哈</description>
		<content:encoded><![CDATA[<p>那看样子这篇帖子还是比较通俗易懂的了，哈哈哈</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lindt</title>
		<link>http://blog.phio.me/2009/09/a-bitfield-problem/comment-page-1/#comment-165</link>
		<dc:creator>Lindt</dc:creator>
		<pubDate>Thu, 10 Sep 2009 11:52:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.phio.me/?p=152#comment-165</guid>
		<description>这个sf其实应该留给果冻同学...
赞技术帖...偶居然也看懂了一些</description>
		<content:encoded><![CDATA[<p>这个sf其实应该留给果冻同学&#8230;<br />
赞技术帖&#8230;偶居然也看懂了一些</p>
]]></content:encoded>
	</item>
</channel>
</rss>

