function l4vec = i4_to_l4vec ( i4, n )

%*****************************************************************************80
%
%% I4_TO_L4VEC() converts an I4 into an L4VEC.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 November 2015
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer I4, the integer.
%
%    Input, integer N, the dimension of the vector.
%
%    Output, integer L4VEC(N), the vector of logical values.
%
  l4vec(1:n) = 0;

  for i = n : -1 : 1
    l4vec(i) = mod ( i4, 2 );
    i4 = floor ( i4 / 2 );
  end

  return
end
