#include<iostream>
int main()
{
    int a=1;
    int b=8;
    std::cout<<(~a)<<'\n';
    std::cout<<(a<<1)<<'\n';
    std::cout<<(a<<1|1)<<'\n';
    std::cout<<(b>>3&1)<<'\n';//看b的最后一位是0还是1
    std::cout<<(b&-b)<<'\n';//求lowbit
    return 0;
}

 

 posted on 2023-01-08 21:56  ruoye123456  阅读(27)  评论(0)    收藏  举报