考虑将以下文档插入集合中
switches
:
以下update()
操作将expdata
字段更新为
and
当前值NumberInt(13)
(即1101
)和
NumberInt(10)
(即1010
)之间按位运算的结果:
按位and
运算得出整数8(即1000
):
并且更新后的文档具有以下值expdata
:
所述mongo
外壳的显示器NumberInt(8)
作为8
。
考虑将以下文档插入集合中
switches
:
以下update()
操作将expdata
字段更新为
or
当前值NumberLong(3)
(即0011
)和
NumberInt(5)
(即0101
)之间按位运算的结果:
按位or
运算得出整数7(即0111
):
并且更新后的文档具有以下值expdata
: