title: Compute Modulus Division By A Power Of 2 Number
signature: function compute_modulus_division_by_a_power_of_2_number(n, d)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(n, d, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n, d), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(54, 59, 50);
      @printf("TEST-0...%s\n",result);
      
      result = driver(39, 84, 3);
      @printf("TEST-1...%s\n",result);
      
      result = driver(35, 81, 0);
      @printf("TEST-2...%s\n",result);
      
      result = driver(9, 60, 9);
      @printf("TEST-3...%s\n",result);
      
      result = driver(62, 68, 2);
      @printf("TEST-4...%s\n",result);
      
      result = driver(16, 16, 0);
      @printf("TEST-5...%s\n",result);
      
      result = driver(93, 96, 93);
      @printf("TEST-6...%s\n",result);
      
      result = driver(32, 38, 32);
      @printf("TEST-7...%s\n",result);
      
      result = driver(39, 62, 37);
      @printf("TEST-8...%s\n",result);
      
      result = driver(63, 16, 15);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
source_py: def compute_modulus_division_by_a_power_of_2_number(n, d):
      return (n & (d - 1))
source_cpp: unsigned int compute_modulus_division_by_a_power_of_2_number(unsigned int n, unsigned int d) {
    return ( n & ( d - 1 ) );
  }