Toggle

From JargonWiki

Jump to: navigation, search
The Jargon File

Parts of this article are based on the Jargon File, v. 4.4.7,
a public domain document of hacker jargon.

Image:Glider-small.png
toggle
Usage: vt.


toggle: vt.

To change a bit from whatever state it is in to the other state; to change from 1 to 0 or from 0 to

  1. This comes from `toggle switches', such as standard light switches, though the word toggle actually refers to the mechanism that keeps the switch in the position to which it is flipped rather than to the fact that the switch has two positions. There are four things you can do to a bit: set it (force it to be 1), clear (or zero) it, leave it alone, or toggle it. (Mathematically, one would say that there are four distinct boolean-valued functions of one boolean argument, but saying that is much less fun than talking about toggling bits.)

Sources

Source: toggle, in The Jargon File, version 4.4.7.


Public Domain

This article is in the public domain and is not subject to copyright, trademark, or any other legal protection of intellectual property.
Any and all user contributions to this page are also immediately dedicated to the public domain.
Editors of this page must accede to these terms as special conditions of the standard editing privileges.

Image:Public_Domain_sm.png
Toolbox