pre><code class="language-swift">let x: UInt8 = 5        // 0b00000101
let notX = ~x           // 0b11111010</code></pre>

<p>Performing a bitwise NOT operation on <code>allZeros</code> returns a value with
every bit set to <code>1</code>.</p>

<pre><code class="language-swift">let allOnes = ~UInt8.allZeros   // 0b11111111</code></pre>

<p><strong>Complexity:</strong> O(1).</p>

    <h4>Declaration</h4>    
    <code class="language-swift">prefix func ~(x: Self) -&gt; Self</code>
    
    
</div></div>
</di