In a binary number, if each 1 is replaced by 0 and each 0 by 1, the resulting number is known as the

*one's complement*of the first number. In fact, both the numbers are complement of each other. If one of these numbers is positive, then the other number will be negative with the same magnitude. For example, (0101)2 represents (+5)10, whereas (1010)2 represents (-5)10 in this representation. This method is widely used for representing signed numbers. In this representation also, MSB is 0 for positive numbers and 1 for negative numbers.

__Exercise 1__**Find the one's complement of the following binary numbers.**

**0100111001****11011010**

*Solution:*

1) 1011000110

2) 00100101

__Exercise 2__**Represent the following numbers in one's complement form.**

**+7 and -7****+8 and -8****+15 and -15**

*Solution:*

1) (+7)10 = (0111)2 and (-7)10 = (1000)2

2) (+8)10 = (01000)2 and (-8)10 = (10111)2

3) (+15)10 = (01111)2 and (-15)10 = (10000)2