可能重复: 如何在C中设置,清除和切换单个位? 删除最低位
n是一个正整数.如何解除最右边的设置位?
n
Say n= 7=> n = 0111.我想0110作为输出.是否有任何简单的按位攻击来实现目标?
7
0110
c c++ algorithm math bit-manipulation
algorithm ×1
bit-manipulation ×1
c ×1
c++ ×1
math ×1