Metamath Proof Explorer


Definition df-bits

Description: Define the binary bits of an integer. The expression M e. ( bitsN ) means that the M -th bit of N is 1 (and its negation means the bit is 0). (Contributed by Mario Carneiro, 4-Sep-2016)

Ref Expression
Assertion df-bits bits = n m 0 | ¬ 2 n 2 m

Detailed syntax breakdown

Step Hyp Ref Expression
0 cbits class bits
1 vn setvar n
2 cz class
3 vm setvar m
4 cn0 class 0
5 c2 class 2
6 cdvds class
7 cfl class .
8 1 cv setvar n
9 cdiv class ÷
10 cexp class ^
11 3 cv setvar m
12 5 11 10 co class 2 m
13 8 12 9 co class n 2 m
14 13 7 cfv class n 2 m
15 5 14 6 wbr wff 2 n 2 m
16 15 wn wff ¬ 2 n 2 m
17 16 3 4 crab class m 0 | ¬ 2 n 2 m
18 1 2 17 cmpt class n m 0 | ¬ 2 n 2 m
19 0 18 wceq wff bits = n m 0 | ¬ 2 n 2 m