【发布时间】:2021-08-16 06:42:00
【问题描述】:
位操作集包含BLSI - 此指令Extracts the lowest set bit from the source operand and set the corresponding bit in the destination register
您能否举个例子说明the lowest set bit 所指的内容(操作数的二进制表示中的最后一位?),执行的操作是什么,以及该操作在哪个上下文或哪种应用程序中使用?
【问题讨论】:
-
您是否尝试评估
(-x) & x的一些x值以查看发生了什么? catonmat.net/low-level-bit-hacks 解释了这个和其他比特黑客如何/为什么工作。 (例如,通过零和一进行传播。)
标签: assembly x86 bit-manipulation instruction-set bmi