title: Compute Modulus Division By A Power Of 2 Number
signature: compute_modulus_division_by_a_power_of_2_number <- function(n, d) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, d, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n, d), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          54L, 59L, 
          50L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          39L, 84L, 
          3L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          35L, 81L, 
          0L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          9L, 60L, 
          9L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          62L, 68L, 
          2L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          16L, 16L, 
          0L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          93L, 96L, 
          93L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          32L, 38L, 
          32L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          39L, 62L, 
          37L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          63L, 16L, 
          15L
      )))
  
  }
  
  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 ) );
  }