title: Compute Modulus Division By A Power Of 2 Number
signature: computeModulusDivisionByAPowerOf2Number :: Integer -> Integer -> Integer
  computeModulusDivisionByAPowerOf2Number n d = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Integer -> Integer -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Integer -> Integer -> String
  driver n d expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n d) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (54) (59) (50) )
  
      printf "TEST-1...%s\n" (driver (39) (84) (3) )
  
      printf "TEST-2...%s\n" (driver (35) (81) (0) )
  
      printf "TEST-3...%s\n" (driver (9) (60) (9) )
  
      printf "TEST-4...%s\n" (driver (62) (68) (2) )
  
      printf "TEST-5...%s\n" (driver (16) (16) (0) )
  
      printf "TEST-6...%s\n" (driver (93) (96) (93) )
  
      printf "TEST-7...%s\n" (driver (32) (38) (32) )
  
      printf "TEST-8...%s\n" (driver (39) (62) (37) )
  
      printf "TEST-9...%s\n" (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 ) );
  }