Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Assignment Number 1

Name: Prathamesh Sutone

Enrolment number: BT17ECE059

Why 1’s complement is not good and not used in the system?
Ans.:
 The 1’s complement of a binary number is another binary number obtained by
inverting all bits in it, transforming the 0 bit to 1 and the 1 bit to 0.
 One of the flaws with ones complements is that that 1′ s complement has two
representations of 0 (zero) 00000000, which is positive zero (+0) and 11111111,
which is negative zero (-0).
 Secondly , while adding numbers using 1′ s complement, we first do binary addition,
then add in an end-around carry value.
 But, 2′ s complement has only one value for zero, and doesn’t require carry values.
1's complement has no special usage for negative integers. 2's complement is
preffered over 1’s complement because it can be used in natural addition and
subtraction arithmetic without any need to change the bits.

Design mod 32 and mod 64 systems and perform the following


questions using the same.
1. 5 Bits
-5 and -7
 Addition:
Moving 7 steps anticlockwise from -5 we reach at 10100 (-12).
Ans.: -12 (10100)
 . Subtraction:
Moving 7 steps clockwise from -5 we reach at 00010 (2).
Ans.: 2 (00010)
9 and 6
 Addition:
Moving 6 steps clockwise from 9 we reach at 01111(15).
Ans.: 15

 Subtraction:
Moving 6 steps clockwise from 9 we reach at 00011 (3).

Ans.: 3 (00011)
-6 and +9
 Addition:
Moving 9 steps clockwise from -6 we reach at 00011 (3).
Ans.: 3 (00011)
 Subtraction:
Moving 9 steps anticlockwise from -6 we reach at 10001 (-15).
Ans.: -15 (10001)

2. 6 – bits
12 and 15
 Addition:
Moving 15 steps clockwise from 12 we reach at 011011 (27).
Ans.: 27 (011011)
 Subtraction:
Moving 15 steps anticlockwise from 12 we reach at 111101 (-3).
Ans.: -3 (111101)

-16 and 9
 Addition:
Moving 9 steps clockwise from -16 we reach at 111001 (-7).
Ans.: -7 (111001)
 Subtraction:
Moving 9 steps anticlockwise from -16 we reach at 100111 (-25).
Ans.: -25 (100111)
20 and -21
 Addition:
Moving 21 steps anticlockwise from 20 we reach at 111111 (-1).
Ans.: -1 (111111)
 Subtraction:
Moving 21 steps clockwise from 20 we reach at 101001 (41).
 Ans.: 41 (101001)

You might also like