%% Complement of a Negative Integer

A = int8(-11);
cmp = bitcmp(A)

%
% You can see the complement operation when the numbers are shown in binary.

original = bitget(A,8:-1:1)
complement = bitget(bitcmp(A),8:-1:1)

% Copyright 2012 The MathWorks, Inc.