blob: e6eebe405dab740434ef886dbd0e60b930a2fc68 (
plain)
1
2
3
4
5
6
7
8
9
10
|
//Example 24.7
clc
disp("1''s compliment method")
disp(" 1 1 1 1")
disp(" 0 1 0 1 <-- 1''s complement")
disp(" ---------")
disp(" (1) 1 1 0 1 <-- carry")
disp(" 1 <-- add carry")
disp(" ---------")
disp(" 0 1 0 1")
|