From 2d429e75ce69e77f8c95490ac03881ec9aa0354a Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Mon, 25 Oct 2010 21:15:28 -0400 Subject: arduino language reference nearing completion, properly CC-BY-SA 3.0 attributed --- source/arduino/bit.rst | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'source/arduino/bit.rst') diff --git a/source/arduino/bit.rst b/source/arduino/bit.rst index f8241a5..b74ad3d 100644 --- a/source/arduino/bit.rst +++ b/source/arduino/bit.rst @@ -6,37 +6,40 @@ bit() Description ----------- -Computes the value of the specified bit (bit 0 is 1, bit 1 is 2, -bit 2 is 4, etc.). - +(Macro) Computes the value of an (unsigned) integer with the specified +bit set (``bit(0)`` is 1, ``bit(1)`` is 2, ``bit(2)`` is 4, then 8, +16, 32, etc.). Syntax ------ -bit(n) - +``bit(n)`` Parameters ---------- -n: the bit whose value to compute +* **n** the bit to set. + +Value +----- +The value of an integer with the given bit set. -Returns -------- -the value of the bit +Arduino Compatibility +--------------------- +The Maple implementation of bit is compatible with Arduino. See also -------- -- `bitRead `_\ () -- `bitWrite `_\ () -- `bitSet `_\ () -- `bitClear `_\ () +- :ref:`arduino-bitread` +- :ref:`arduino-bitwrite` +- :ref:`arduino-bitset` +- :ref:`arduino-bitclear` -- cgit v1.2.3