title: Compute Modulus Division By A Power Of 2 Number
signature: def computeModulusDivisionByAPowerOf2Number(n: Int, d: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, d: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n, d),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        54, 59, 
        50    
      )}")   
  
  
      println(s"TEST-1...${driver(
        39, 84, 
        3    
      )}")   
  
  
      println(s"TEST-2...${driver(
        35, 81, 
        0    
      )}")   
  
  
      println(s"TEST-3...${driver(
        9, 60, 
        9    
      )}")   
  
  
      println(s"TEST-4...${driver(
        62, 68, 
        2    
      )}")   
  
  
      println(s"TEST-5...${driver(
        16, 16, 
        0    
      )}")   
  
  
      println(s"TEST-6...${driver(
        93, 96, 
        93    
      )}")   
  
  
      println(s"TEST-7...${driver(
        32, 38, 
        32    
      )}")   
  
  
      println(s"TEST-8...${driver(
        39, 62, 
        37    
      )}")   
  
  
      println(s"TEST-9...${driver(
        63, 16, 
        15    
      )}")   
  
  }
  
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 ) );
  }