function i4_not_test ( )

%*****************************************************************************80
%
%% I4_NOT_TEST tests i4_NOT.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 August 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'I4_NOT_TEST\n' );
  fprintf ( 1, '  I4_NOT returns the bitwise NOT of an integer I\n' );
  fprintf ( 1, '  with respect to some maximum value J.\n' );
  fprintf ( 1, '  MATLAB provides a BITCMP operator.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '       I       I4_NOT(255)  BITCMP(uint8)\n' );
  fprintf ( 1, '\n' );

  seed = 123456789;
  j = 255;

  for test = 1 : 10

    [ i, seed ] = i4_uniform_ab ( 0, 255, seed );
    k = i4_not ( i, j );
%
%  MATLAB:
%
%   l = bitcmp ( i, 'int8' )
%
%  Octave:
%
    l = bitcmp ( i, 8 );

    fprintf ( 1, '  %6d       %6d       %6d\n', i, k, l );

  end 

  return
end
