Compartilhar via


Funções canônicas bit a bit

Entity SQL inclui funções canônicas bit a bit.

Observações

A tabela a seguir mostra as funções canônicas do Entity SQL bit a bit. Essas funções retornarão Null se a entrada Null for fornecida. O tipo de retorno das funções é o mesmo que os tipos de argumento. Os argumentos devem ser do mesmo tipo, se a função tiver mais de um argumento. Para executar operações bit a bit por tipos diferentes, você precisará converter explicitamente o mesmo tipo.

Função Descrição
BitWiseAnd ( value1 , value2 ) Retorna a conjunção bit a bit de value1 e value2 como o tipo de value1 e value2.

argumentos

Um Byte, Int16, Int32 e Int64.

Exemplo

-- The following example returns 1.

BitWiseAnd(1,3)
BitWiseNot ( value ) Retorna a negação bit a bit de value.

argumentos

Um Byte, Int16, Int32 e Int64.

Exemplo

-- The following example returns -4.

BitWiseNot(3)
BitWiseOr ( value1 , value2 ) Retorna a disjunção bit a bit de value1 e value2 como o tipo de value1 e value2.

argumentos

Um Byte, Int16, Int32 e Int64.

Exemplo

-- The following example returns 3.

BitWiseOr(1,3)
BitWiseXor ( value1 , value2 ) Retorna a disjunção exclusiva bit a bit de value1 e value2 como o tipo de value1 e value2.

argumentos

Um Byte, Int16, Int32 e Int64.

Exemplo

-- The following example returns 2.

BitWiseXor (1,3)

Consulte também