title: Decimal Binary Conversion Without Using Arithmetic Operators
signature: decimalBinaryConversionWithoutUsingArithmeticOperators :: Integer -> String
  decimalBinaryConversionWithoutUsingArithmeticOperators n = 
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 :: String -> String -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> String -> String
  driver n expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (35) ("100011") )
  
      printf "TEST-1...%s\n" (driver (17) ("10001") )
  
      printf "TEST-2...%s\n" (driver (8) ("1000") )
  
      printf "TEST-3...%s\n" (driver (99) ("1100011") )
  
      printf "TEST-4...%s\n" (driver (57) ("111001") )
  
      printf "TEST-5...%s\n" (driver (39) ("100111") )
  
      printf "TEST-6...%s\n" (driver (99) ("1100011") )
  
      printf "TEST-7...%s\n" (driver (14) ("1110") )
  
      printf "TEST-8...%s\n" (driver (22) ("10110") )
  
      printf "TEST-9...%s\n" (driver (7) ("111") )
  
source_py: def decimal_binary_conversion_without_using_arithmetic_operators(n):
      if (n == 0):
          return '0'
      bin = ''
      while (n > 0):
          if ((n & 1) == 0):
              bin = ('0' + bin)
          else:
              bin = ('1' + bin)
          n = (n >> 1)
      return bin
source_cpp: string decimal_binary_conversion_without_using_arithmetic_operators(int n) {
    if ( n == 0 ) return "0";
    string bin = "";
    while ( n > 0 ) {
      bin = ( ( n & 1 ) == 0 ? '0' : '1' ) + bin;
      n >>= 1;
    }
    return bin;
  }