Calculator: Bit mask construction

Enter the labelled inputs to calculate: Value; Result ₁₆; Result ₂.

Value
112
Result ₁₆
0x00000070
Result ₂
00000000000000000000000001110000

How the calculation works

mask=(2ʷ−1)·2ˢ; s+w≤32

Use the displayed units and finite inputs. Results follow the stated mathematical model; zero denominators and undefined cases are rejected. Up to ten significant digits are displayed.

Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Frequently asked questions

How is the result calculated?

mask=(2ʷ−1)·2ˢ; s+w≤32

What assumptions apply?

Use the displayed units and finite inputs. Results follow the stated mathematical model; zero denominators and undefined cases are rejected. Up to ten significant digits are displayed.

How precise are the displayed results?

Numerical results show up to ten significant digits. Rounding does not improve the accuracy of the input measurements or the model. Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Also try:

Back to category →