1's and 2's complement
TRANSCRIPT
NAME
CH.SHIRAZ
Presenting presentation to….
Sir Saleem
1’S AND 2’S COMPLEMENT
COMPLEMENT
A bit with opposite value to the given one is
know as Complement in
Computer Science
1’S COMPLEMENT
Subtraction of binary
numbers using the 1’s
complement method allows
subtraction only by addition.
To subtract a smaller number from a larger number, the 1’s complement method is as follow.
SUBTRACT (1010)2 FROM (1111) 2
Subtraction of a large number from
a smaller one by the 1’s complement
method involves the following steps
a)The answer is the 1’s complement
of the result and is opposite in sign.
There is no carry.
2’S COMPLEMENTThe 2’s complement of a
binary number can be
obtained by adding 1 to its 1’s
complement.
SUBTRACT (1010)2 FROM (1111) 2