BEL (ASCII)
   HOME

TheInfoList



OR:

A bell character (sometimes bell code) is a device
control code In computing and telecommunications, a control character or non-printing character (NPC) is a code point in a character set that does not represent a written character or symbol. They are used as in-band signaling to cause effects other than ...
originally sent to ring a small electromechanical bell on tickers and other
teleprinter A teleprinter (teletypewriter, teletype or TTY) is an electromechanical device that can be used to send and receive typed messages through various communications channels, in both point-to-point (telecommunications), point-to-point and point- ...
s and teletypewriters to alert operators at the other end of the line, often of an incoming message. Though tickers punched the bell codes into their tapes, printers generally do not print a character when the bell code is received. Bell codes are usually represented by the label "BEL". They have been used since 1870 (initially in the
Baudot code The Baudot code () is an early character encoding for telegraphy invented by Émile Baudot in the 1870s. It was the predecessor to the International Telegraph Alphabet No. 2 (ITA2), the most common teleprinter code in use before ASCII. Each ch ...
). To maintain
backward compatibility In telecommunications and computing, backward compatibility (or backwards compatibility) is a property of an operating system, software, real-world product, or technology that allows for interoperability with an older legacy system, or with Input ...
, video display
terminal Terminal may refer to: Computing Hardware * Computer terminal, a set of primary input and output devices for a computer * Terminal (electronics), a device for joining electrical circuits together ** Battery terminal, electrical contact used to ...
s (VDTs) that replaced teletypewriters included speakers or buzzers to perform the same function, as did the personal computers that followed. Modern
terminal emulator A terminal emulator, or terminal application, is a computer program that emulates a video terminal within some other display architecture. Though typically synonymous with a shell or text terminal, the term ''terminal'' covers all remote term ...
s often integrate the warnings to the
desktop environment In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphi ...
(e.g., the
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
Terminal Terminal may refer to: Computing Hardware * Computer terminal, a set of primary input and output devices for a computer * Terminal (electronics), a device for joining electrical circuits together ** Battery terminal, electrical contact used to ...
will play the system warning sound) and also often offer a silent ''visual bell'' feature that flashes the terminal window briefly.


Representations

In
ASCII ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
the bell character's value is 7 and is named "BELL" or "BEL".
Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
does not give names to control characters but has assigned it the alias "ALERT" and abbreviation "BEL." It can sometimes be typed as and displayed as in
caret notation Caret notation is a notation for control characters in ASCII. The notation assigns to control-code 1, sequentially through the alphabet to assigned to control-code 26 (0x1A). For the control-codes outside of the range 1–26, the ...
. Unicode also includes characters for the visual representation of the character: and . In the 5-bit Baudot codes, BEL is represented by the number 11 (0x0B) when in "figures" mode. The code is used in
EBCDIC Extended Binary Coded Decimal Interchange Code (EBCDIC; ) is an eight- bit character encoding used mainly on IBM mainframe and IBM midrange computer operating systems. It descended from the code used with punched cards and the corresponding si ...
. In the programming language C (created in 1972), and in many languages influenced by it such as
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (prog ...
, the bell character can be placed in a string or character constant with \a. 'a' stands for "alert" or "audible" and was chosen because \b was already used for the
backspace Backspace (, ⌫) is the keyboard key that in typewriters originally pushed the carriage one position backwards, and in modern computer systems typically moves the display cursor one position backwards,The meaning of "backwards" depends on the dir ...
character.


Usage

On
Unix-like A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
systems, or on
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
or
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, a user can cause the equivalent of ringing the bell to happen by typing at the
command prompt A command-line interface (CLI) is a means of interacting with software via commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user-friendly alternativ ...
the command: echo ^G where the is produced by holding down and typing . On Unix the user may need to type + first to "quote" the . On POSIX systems, one may also use: printf '\a' and in the Bash shell, one may use ANSI-C quoting:ANSI-C quoting
/ref> echo $'\a' An alternative is to use the
tput In computing, tput is a standard Unix operating system command which makes use of terminal capabilities. Depending on the system, ''tput'' uses the terminfo or termcap database, as well as looking into the environment for the terminal type. ...
command, which as a part of the ncurses library is available on most Unix/Linux operating systems: tput bel A program can get the same result by printing the BEL character to a terminal. On modern systems this may not make a noise; it may instead make a visual indication such as flashing the screen, or do nothing at all.


See also

*
C0 and C1 control codes The C0 and C1 control code or control character sets define control codes for use in text by computer systems that use ASCII and derivatives of ASCII. The codes represent additional information about the text, such as the position of a cursor, ...
(
ISO 646 ISO/IEC 646 ''Information technology — ISO 7-bit coded character set for information interchange'', is an International Organization for Standardization, ISO/International Electrotechnical Commission, IEC standard in the ...
)


References


ATIS Telcom Glossary

Free On-Line Dictionary of Computing, 'bell'
{{DEFAULTSORT:Bell Character Control characters