For example, the byte type 5 is 00000101 in the memory. After bitwise inversion, it is 11111010
When you output this number again, it becomes 250
Bitwise inversion means 1 changes to 0, and 0 changes to 1
First of all, you need to know that most of the computers we use now are 32-bit machines, so integers are all 4 bytes
Then look at the result of bitwise negation:
00000000 00000000 00000000 00000101 This is 5
00000000 00000000 00000000 00000000 This is 0
11111111 11111111 11111111 11111111 This is -1
11111111 11111111 11111111 11111110 This is -2
11111111 11111111 11111111 11111101 This is -3
11111111 11111111 11111111 11111100 This is -4
11111111 11111111 11111111 11111011 This is -5
11111111 11111111 11111111 11111010 This is the result of the negation of 5 -6
Do you understand?