//Example 24.8 clc disp("1''s compliment method") disp(" 1 0 0 0") disp(" 0 1 0 1 <-- 1''s complement") disp(" -------") disp(" 1 1 0 1") disp("No carry results and the answer is the 1''s complement of 1101 and opposite in sign, i.e. -0010.")