MSDN 站点上的十六进制注释

发布于 2024-12-11 14:38:45 字数 359 浏览 8 评论 0原文

我无法理解 MSDN 站点上的十六进制注释

在以下 MSDN 站点上:DDS 文件规范

dwFlags 处有一个表格。 dwFlags 是一个 DWORD(4 字节或 0x00000000)

问题:值(例如)0x800000 的十六进制注释让我感到困惑,我必须翻转(32 位中的哪一位)?

请“翻译”源的值列(仅 8 个值)

I fail to understand the hex annotation at the MSDN site

On the following MSDN site: DDS file spec

there is a table at dwFlags. dwFlags is a DWORD (4 Bytes or 0x00000000)

Question: The hex annotations for a value (e.g.) 0x800000 are confusing me, which bit (of the 32) do I have to flip?

Please 'translate' the value coloumn of the source (just 8 values)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

习惯成性 2024-12-18 14:38:45

0x800000 与二进制的 100000000000000000000000 相同。

 1000 0000 0000 0000 0000 0000
 ^  ^    ...       ^    ^    ^
23 20    ...       8    4    0   = bit position

所以这是第 23 位。

对于 dwFlags 来说这意味着:

0x1      = 1
0x2      = 10
0x4      = 100
0x8      = 1000
0x1000   = 1000000000000
0x20000  = 100000000000000000
0x80000  = 10000000000000000000
0x800000 = 100000000000000000000000

0x800000 is the same as 100000000000000000000000 in binary.

 1000 0000 0000 0000 0000 0000
 ^  ^    ...       ^    ^    ^
23 20    ...       8    4    0   = bit position

So it's the 23rd bit.

For dwFlags does this mean:

0x1      = 1
0x2      = 10
0x4      = 100
0x8      = 1000
0x1000   = 1000000000000
0x20000  = 100000000000000000
0x80000  = 10000000000000000000
0x800000 = 100000000000000000000000
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文