11 lines
2.2 KiB
HTML
11 lines
2.2 KiB
HTML
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>toggle</title><link rel="stylesheet" href="../../jargon.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.61.0"/><link rel="home" href="../index.html" title="The Jargon File"/><link rel="up" href="../T.html" title="T"/><link rel="previous" href="TOFU.html" title="TOFU"/><link rel="next" href="tool.html" title="tool"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">toggle</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="TOFU.html">Prev</a> </td><th width="60%" align="center">T</th><td width="20%" align="right"> <a accesskey="n" href="tool.html">Next</a></td></tr></table><hr/></div><dt><a id="toggle"/><dt xmlns="" id="toggle"><b>toggle</b>: <span xmlns="http://www.w3.org/1999/xhtml" class="grammar">vt.</span></dt></dt><dd><p> To change a <a href="../B/bit.html"><i class="glossterm">bit</i></a> from whatever state it is in
|
||
to the other state; to change from 1 to 0 or from 0 to </p></dd><dd><p> 1. This comes from ‘toggle switches’, such as standard
|
||
light switches, though the word <span class="firstterm">toggle</span> 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.)</p></dd><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="TOFU.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="../T.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="tool.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">TOFU </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> tool</td></tr></table></div></body></html>
|