title: Compute Modulus Division By A Power Of 2 Number
signature: fun computeModulusDivisionByAPowerOf2Number(n: Int, d: Int): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, d: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n, d), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(54, 59, 50)
      println("TEST-0...${result}")
      
      result = driver(39, 84, 3)
      println("TEST-1...${result}")
      
      result = driver(35, 81, 0)
      println("TEST-2...${result}")
      
      result = driver(9, 60, 9)
      println("TEST-3...${result}")
      
      result = driver(62, 68, 2)
      println("TEST-4...${result}")
      
      result = driver(16, 16, 0)
      println("TEST-5...${result}")
      
      result = driver(93, 96, 93)
      println("TEST-6...${result}")
      
      result = driver(32, 38, 32)
      println("TEST-7...${result}")
      
      result = driver(39, 62, 37)
      println("TEST-8...${result}")
      
      result = driver(63, 16, 15)
      println("TEST-9...${result}")
      
          
  }
  
  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 ) );
  }