Ones Complement                                                                                    

In ones complement, you are expected to:

1.    convert the number to binary

2.       extend to the number of bit representation (for example, if the question says 8-bit representation, you ensure that you extend to 8 bits)

3.       flip the bits (that is, change the 1s to 0s and the 0s to 1s)

For example:-  Convert 9010 to its 8-bits ones complement representation.

1.        

Convert to binary         

 

Column Headings

26

25

24

23

22

21

20

64

32

16

8

4

2

1

 

1

0

1

1

0

1

0

 

 

 

 

 

 

Therefore, 9010 in decimal is 10110102

2

Right now the number is represented with 7 bits.  Therefore, only one bit needed to have an 8- bit representation.   Always extend on the left and NOT THE RIGHT.  Example, 3410 is the    same as 03410; 10012 is the same as 010012.  Get the point?
            010110102

 

3

Now flip the bits
            101001012


Therefore, the one's complement for 9010 is 101001012

 

 

Make a Free Website with Yola.