function ubvec2 = ubvec_complement1 ( n, ubvec1 )

%*****************************************************************************80
%
%% ubvec_complement1() computes the one's complement of an unsigned binary vector.
%
%  Discussion:
%
%    A UBVEC is a vector of N binary digits.
%
%    A UBVEC can be interpreted as a binary representation of an
%    unsigned integer, with the first entry being the coefficient of
%    2^(N-1) and the last entry the coefficient of 1.
%
%    UBVEC   #
%    -----  --
%    00000   0
%    00001   1
%    00010   2
%    10000  16
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 November 2015
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the length of the vectors.
%
%    integer UBVEC1(N), the vector to be complemented.
%
%  Output:
%
%    integer UBVEC2(N), the complemented vector.
%
  ubvec2(1:n) = 1 - ubvec1(1:n);

  return
end
