首页
人工智能
编程教程
编程导航
编程百科
编程问答
编程博文
编程实例
硬件设备
网络运营
软件教程
移动数码
办公软件
操作系统
网络运维
为什么1 << 3 + 1 << 4 = 256?
编程问答
2022-06-12
问题描述
我认为它将等于1
python interpreter
解决方法
这是因为python的运算顺序,其中加法运算在左移运算符之前进行。该表达式等效于
(1<<(3+1))<<4
binary
binary
binary
bit
bit
bit-manipulation
boolean-algebra
python