Nepedia
Back to Discover
Advanced Reader
💻

Backslash

technology Maturity 11-13 Next article →

The backslash is a typographical mark used primarily in mathematics and computing. It serves as the mirror image of the common forward slash, also known as a solidus. While it may seem like a simple stroke, it is a vital tool in digital communication. It helps computers distinguish between literal text and special commands. Because of its many roles, people use various names for it. Some call it a hack, a whack, a reverse slash, or a slosh. Others use terms like backslant, backwhack, bash, or reverse solidus.

In the world of computer programming, the backslash often functions as an escape character. An escape character tells the computer to treat the following character in a special way. For example, in the C programming language, the sequence \n tells the computer to create a new line. Without the backslash, the computer would just see the letter 'n'. The backslash can also make a double quote appear as text rather than a command that ends a string. If a programmer needs to display an actual backslash, they must type two of them together: \\. This tells the computer that the second mark is a literal character rather than a command. In regular expression languages, the backslash can turn literal characters into metacharacters or vice versa.

Beyond programming, the backslash plays a key role in organizing computer files. In the MS-DOS 2.0 operating system released in 1983, the backslash was used to separate folders in a path. This was done to maintain compatibility with MS-DOS 1.0, where the forward slash was used for different commands. For instance, the forward slash was used as an option indicator in the command line. Microsoft eventually adopted the backslash as the standard convention for file paths. The Windows family of operating systems still follows this behavior today. While many modern systems accept both types of slashes, some individual Windows programs may only accept the backslash. Using the wrong slash can sometimes cause errors or even security lapses in certain software.

Teletype Wheatstone Perforator keyboard
Teletype Wheatstone Perforator keyboard

The history of the backslash begins in the 1930s. One of the first documented references appears in a 1937 maintenance manual from the Teletype Corporation. This manual included a photograph of a Kleinschmidt keyboard perforator, known as the WPE-3. In a later document from 1945, Teletype referred to the symbol as a "diagonal key."

Mappa Teletype ASR-33
Mappa Teletype ASR-33

In June 1960, IBM published an "Extended character set standard" that included the symbol at the code point 0x19. Later, in September 1961, an IBM researcher named Bob Bemer proposed adding several characters to the X3.2 standards committee. He described the backslash as a "reverse division operator." Bemer noted that the symbol was useful for creating logical operators in the ALGOL programming language. The committee adopted these changes into the draft of what would become the American Standard Code for Information Interchange, or ASCII. This historical development ensured the backslash became a permanent part of digital language.

In mathematics, the backslash symbol has specific meanings that differ from its use in computing. It is often used to represent the set difference between two groups. In certain contexts, it can also denote a right coset space. When describing computer algorithms, mathematicians sometimes define the backslash to represent integer division. This type of division results in an answer that rounds down to the nearest whole number. In specialized software like MATLAB and GNU Octave, the backslash is used specifically for left matrix divide. This is a distinct operation from the right matrix divide, which uses a forward slash.

Teletype Wheatstone Perforator keyboard
Teletype Wheatstone Perforator keyboard

One surprising aspect of the backslash is how it can appear as different symbols due to old encoding standards. In several Japanese encodings, such as ISO 646-JP and Shift JIS, the code point 0x5C is used for the yen sign (¥) instead of a backslash. Because this code point was used so extensively for the yen, many fonts, including MS Mincho, still display the backslash as a yen sign. This can lead to confusion when users look at filenames in MS-DOS environments. Similar issues occurred with other international encodings, where the backslash was replaced by characters like the Korean won (₩) or the German umlaut (Ö). Although modern Unicode has resolved these conflicts by giving every symbol its own unique code, these legacy systems still exist. This demonstrates how the history of early technology continues to affect how we see characters on our screens today.

733 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (2)
File:Teletype Wheatstone Perforator keyboard.jpg
Teletype Wheatstone Perforator keyboard.jpg
File:Mappa Teletype ASR-33.jpg
Mappa Teletype ASR-33.jpg
More to explore

✨ What else?

Related topics you might enjoy

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.