Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我想将小写字母转换为大写字母。显然,我需要清楚地这样做:
所以是这样的:
01101100
变成这样:
01001100
我们是否有类似 bitclearing 的功能,以便我们可以清除字节内的位?一个浪费的例子将不胜感激。
Perform a bitwise conjunction with a suitable mask, as usual:
(i32.and (i32.const 0x6c) (i32.const 0xdf))
where 0x6c is your value, and 0xdf is the bit mask 11011111.
0x6c
0xdf
11011111