title: Find Value Of Y Mod 2 Raised To Power X
signature: function findValueOfYMod2RaisedToPowerX(y, x) {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value) {
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual, expected){
      return convertToString(actual)===convertToString(expected);
  }
  
  function driver(y, x, expected){
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(y, x),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(57, 76, 57);
    console.log(`TEST-0...${result}`);
  
    result = driver(80, 46, 80);
    console.log(`TEST-1...${result}`);
  
    result = driver(84, 96, 84);
    console.log(`TEST-2...${result}`);
  
    result = driver(35, 16, 35);
    console.log(`TEST-3...${result}`);
  
    result = driver(3, 84, 3);
    console.log(`TEST-4...${result}`);
  
    result = driver(42, 79, 42);
    console.log(`TEST-5...${result}`);
  
    result = driver(7, 2, 3);
    console.log(`TEST-6...${result}`);
  
    result = driver(99, 83, 99);
    console.log(`TEST-7...${result}`);
  
    result = driver(13, 61, 13);
    console.log(`TEST-8...${result}`);
  
    result = driver(44, 8, 44);
    console.log(`TEST-9...${result}`);
  
    process.exit(0);
  };
  
  if (require.main === module) {
    main();
  }
source_py: def find_value_of_y_mod_2_raised_to_power_x(y, x):
      return (y % pow(2, x))
source_cpp: long long int find_value_of_y_mod_2_raised_to_power_x(long long int y, long long int x) {
    if ( log2 ( y ) < x ) return y;
    if ( x > 63 ) return y;
    return ( y % ( 1 << x ) );
  }