%% Negative Numbers Using Two's Complement
% Find the 8-bit representation of a negative number.

A = -29;
b = bitget(A,8:-1:1,'int8')

% Copyright 2012 The MathWorks, Inc.