ClickHouse/docs/zh/query_language/functions/bit_functions.md

30 lines
871 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 位操作函数 {#wei-cao-zuo-han-shu}
位操作函数适用于UInt8UInt16UInt32UInt64Int8Int16Int32Int64Float32或Float64中的任何类型。
结果类型是一个整数其位数等于其参数的最大位。如果至少有一个参数为有符数字则结果为有符数字。如果参数是浮点数则将其强制转换为Int64。
## bitAnd(a, b) {#bitanda-b}
## bitOr(a, b) {#bitora-b}
## bitXor(a, b) {#bitxora-b}
## bitNot(a) {#bitnota}
## bitShiftLeft(a, b) {#bitshiftlefta-b}
## bitShiftRight(a, b) {#bitshiftrighta-b}
## bitRotateLeft(a, b) {#bitrotatelefta-b}
## bitRotateRight(a, b) {#bitrotaterighta-b}
## bitTest(a, b) {#bittesta-b}
## bitTestAll(a, b) {#bittestalla-b}
## bitTestAny(a, b) {#bittestanya-b}
[来源文章](https://clickhouse.tech/docs/en/query_language/functions/bit_functions/) <!--hide-->