Skip to main content

Bit

Returns a bit in the binary representation of a number.

Syntax

bit(Integer, Integer)

Description

Given two integers n and i, returns the ii-th element of the binary representation of nn.

n=a020+a121++ai2i++ak2k

arithmetic.bit.calc.png