# Tilde key serves distinct roles across programming languages

- URL: https://talkfuse.com/story/that-key-left-of-1-on-many-keyboards-is-actually-crucial-for-programmers/
- Published: 2026-11-14T19:30:00+00:00
- Updated: 2026-11-14T20:12:41+00:00
- Original publisher: Engadget
- Original article: https://www.engadget.com/2309616/that-key-left-of-1-on-many-keyboards-is-actually-crucial-for-programmers/
- Topics: Gadgets

## Key points

- The tilde has been on computer keyboards since 1965.
- It can flip binary digits in several programming languages.
- It also helps manage memory and select CSS elements.

## Summary

The tilde key, usually found to the left of “1”, has several roles in programming, with its meaning varying by language. It matters because programmers use it for operations such as manipulating binary values, managing memory and selecting elements in web interfaces.

The symbol has been part of computer keyboards since 1965. In languages including JavaScript, C, C++, and Python, a single tilde can act as a bitwise NOT operator, flipping each binary digit; a double tilde is sometimes used to truncate decimals. In C++ and C#, a tilde before a class name denotes a destructor that cleans up resources, while CSS uses it to select matching sibling elements that follow another element.

---
Summarised by TalkFuse (https://talkfuse.com/). Quote the original publisher for the reporting and link this page for the summary and discussion.
