MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / test_bit

Method test_bit

python/lowlevelil.py:5335–5347  ·  view source on GitHub ↗

``test_bit`` returns an expression of size ``size`` that tells whether expression ``a`` has its bit with an index of the expression ``b`` is set :param int size: size in bytes :param ExpressionIndex a: an expression to be tested :param ExpressionIndex b: an expression for the index of th

(self, size: int, a: ExpressionIndex, b: ExpressionIndex, loc: Optional['ILSourceLocation'] = None)

Source from the content-addressed store, hash-verified

5333 return self.expr(LowLevelILOperation.LLIL_CMP_UGT, a, b, size=size, source_location=loc)
5334
5335 def test_bit(self, size: int, a: ExpressionIndex, b: ExpressionIndex, loc: Optional['ILSourceLocation'] = None) -> ExpressionIndex:
5336 """
5337 ``test_bit`` returns an expression of size ``size`` that tells whether expression ``a`` has its bit with an
5338 index of the expression ``b`` is set
5339
5340 :param int size: size in bytes
5341 :param ExpressionIndex a: an expression to be tested
5342 :param ExpressionIndex b: an expression for the index of the big
5343 :param ILSourceLocation loc: location of returned expression
5344 :return: the result expression.
5345 :rtype: ExpressionIndex
5346 """
5347 return self.expr(LowLevelILOperation.LLIL_TEST_BIT, a, b, size=size, source_location=loc)
5348
5349 def bool_to_int(self, size: int, a: ExpressionIndex, loc: Optional['ILSourceLocation'] = None) -> ExpressionIndex:
5350 """

Callers 1

set_p_valueMethod · 0.45

Calls 1

exprMethod · 0.95

Tested by

no test coverage detected