  n = 19;
  
  while ( 0 < n )
    if ( mod ( n, 2 ) == 0 )
      '0'                     <-- A simple way to print '0'
      n = n / 2;
    else
      '1'                     <-- or print '1'.
      n = ( n - 1 ) / 2;
    end
  end
