📰 Newspapers

That key left of '1' on many keyboards is actually crucial for programmers

That key left of '1' on many keyboards is actually crucial for programmers

The humble tilde has many uses.

The humble tilde (~) symbol, which is located left of the "1" key, has a few notable uses. It can represent approximations, which is useful in mathematics and statistics, and is found as an accent over letters in languages like Spanish and Portuguese. You've probably spent some time hunting for it on a keyboard when spelling stuff like "mañana." However, its primary use on a computer keyboard is as a tool in programming languages C, C++ and Java, among many others.

This has actually been a handy little key going back decades. It first appeared on computer keyboards all the way back in 1965, back in the days of massive mainframes. It has since become a mainstay of modern keyboards. The meaning of the symbol depends entirely on the programming language, and even game developers find a variety of uses for it. Let's get into what coders are using the tilde for.

This is likely the most common use of the tilde symbol when it comes to programming, as this method is the same in Javascript, C, C++, Python and several other computing languages. The bitwise NOT operator (yes it's spelled that way) inverts all the bits of a binary number. This means that all zeroes become ones and all ones become zeroes. For instance, "0010" would become "1101."

In brief

The humble tilde (~) symbol, which is located left of the "1" key, has a few notable uses. It first appeared on computer keyboards all the way back in 1965, back in the days of massive mainframes. It has since become a mainstay of modern keyboards. This means that all zeroes become ones and all ones become zeroes.

This is the opening of the story, shared with credit to Engadget. The rest of the report — with every detail — continues on the publisher’s website.

Continue reading at Engadget ↗

Cookie settings

Choose which cookies we may use. You can change this at any time from Cookie settings in the footer. Details of each cookie are in the Cookie Policy.

Strictly necessary

Needed for sign-in, security, payments and remembering these choices. Always on.

Preferences

Remember settings such as dark mode.

Analytics & performance

Help us count visits, understand which pages, devices and countries our readers use, and measure how well the site performs – anonymous and aggregated.

Advertising & marketing

Lets advertising partners show and personalise adverts, measure impressions, clicks and visits, prevent ad fraud and pay us – this is how the free site is funded.

🔔 News notifications

Get headlines from NewsHub on this device — even when the site is closed.

You can switch this off at any time. Works on Android, Windows, Mac and Linux browsers; on iPhone/iPad add the site to your Home Screen first.