Tech News
← Home  ·  All topics

Bitwise Not

1 GoKawiil brief on this topic

Tilde key's bitwise NOT operator explained as core programming tool

The tilde (~) symbol, often located near the '1' key, functions in many programming languages—including JavaScript, C, C++, and Python—as the bitwise NOT operator. This operator inverts the bits of a binary number, turning zeroes into ones and vice versa, and is used for tasks like indexing files, finding missing string elements, and converting numbers to binary. A double tilde (~~) is also noted as a way to truncate decimals.