Given a non-negative integer n and a divisor d that is a power of two, compute n mod d without using the modulo operator. For power-of-two divisors the remainder is simply the low bits of n.
Input: A JSON object {"n": <non-negative integer>, "d": <power of two>}.
Output: Return n mod d.
Input: {"n":19,"d":8}
Output: 3
Explanation: 19 mod 8 = 3, and 19 & 7 = 3.Input: {"n":100,"d":16}
Output: 4
Explanation: 100 mod 16 = 4, and 100 & 15 = 4.0 <= n <= 10^12d is a power of two, 1 <= d <= 2^20