How to do the following operations in 1CF and 2CF arithmetics;
in binary.
(a) Addition of (+125) + (−37) in 1CF and 2CF arithmetics
(b) Subtraction of (−125) − (−37) in 1CF and 2CF arithmetics
show the operations, the operands, and the results in binary,
and tell whether there is overflow or not for each
operation
(a) Addition of (+125) + (−37) in 1CF and 2CF arithmetics
Answer:-----------
By Using 1's complement :----------------
(+125)10 = (1111101)2
(−37)10 = (-0100101)2
(1111101)2 =======> 0 1111101
(-0100101)2
======> 1 1011010 (taking 1's
complement)
=================> 1 01010111
=================> ----------- +1 (carry)
=================> 0 1011000
=================> (+88)10
By Using 2's complement :----------------
(+125)10 = (1111101)2
(−37)10 = (-100101)2
(1111101)2 =======> 0 1111101
(-0100101)2
======> 1 1011011 (taking 2's
complement)
=================> 1 01011000
=================> 0 1011000 ( carry is
discarded)
=================> (+88)10
Get Answers For Free
Most questions answered within 1 hours.