Bit manipulation 这个位相关表达式有一个流行的名称吗?

Bit manipulation 这个位相关表达式有一个流行的名称吗?,bit-manipulation,Bit Manipulation,这个有流行的名字吗 #define ALL_BITS_SET(value, mask) ((value & mask) == mask) 信号屏蔽|位屏蔽|屏蔽是的,所有位设置。这只是一个简单的测试,检查值是否等于掩码表示的位组合。在Smalltalk中,我们早就有了这个整数方法 allMask: mask "Treat the argument as a bit mask. Answer whether all of the bits that are 1 in

这个有流行的名字吗

#define ALL_BITS_SET(value, mask) ((value & mask) == mask)

信号屏蔽|位屏蔽|屏蔽

是的,
所有位设置
。这只是一个简单的测试,检查
是否等于
掩码

表示的位组合。在Smalltalk中,我们早就有了这个整数方法

allMask: mask 
    "Treat the argument as a bit mask. Answer whether all of the bits that 
    are 1 in the argument are 1 in the receiver."

    ^mask = (self bitAnd: mask)

是的,在对集合进行等效操作之后,它被称为“contains”。

对位集合的引用非常好。当然,这里的contains意味着包含另一个集合,而不仅仅是一个元素(或单例)。它是标准语言库的一部分吗?@aka.nice它不是在
std::bitset
System.Collections.Specialized.BitVector32
中提供的,这些是我所知道的唯一标准库,所以我不知道。