Changes

Swift Operators and Expressions

9 bytes added, 18:37, 2 December 2014
no edit summary
The Bitwise NOT is represented by the tilde character and has the effect of inverting all of the bits in a number. In other words, all the zeros become ones and all the ones become zeros. Taking our example 3 number, a Bitwise NOT operation has the following result:
<tt>00000011 NOT--------========11111100</tt>
The following Swift code, therefore, results in a value of -4: