The compl (num) function

The compl function returns the bitwise complement of numbers specified as an argument. In the complement operation, it converts 0 to 1 and 1 to 0:

0 complement = 1

1 complement = 0

The following complement operation on decimal 5 shows how the compl() function works:

5 = 101

5's complement = 010 which is decimal 2

The usage of a negative argument in any bit-manipulating function is not allowed.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.103.5