EVOLUTION-MANAGER
Edit File: bitFlip.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Binary Flip (Not) Operator</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for bitFlip {bitops}"><tr><td>bitFlip {bitops}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Binary Flip (Not) Operator</h2> <h3>Description</h3> <p>The binary flip (not) operator, <code>bitFlip(a, w)</code>, “flips every bit” of <code>a</code> up to the <code>w</code>-th bit. </p> <h3>Usage</h3> <pre> bitFlip(a, bitWidth=32) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>a</code></td> <td> <p>numeric vector.</p> </td></tr> <tr valign="top"><td><code>bitWidth</code></td> <td> <p>scalar integer between 0 and 32.</p> </td></tr> </table> <h3>Value</h3> <p>binary numeric vector of the same length as <code>a</code> masked with (2^<code>bitWidth</code>)-1. <code><a href="../../base/html/NA.html">NA</a></code> is returned for any value of <code>a</code> that is not finite or whose magnitude is greater or equal to <i>2^{32}</i>. </p> <h3>Author(s)</h3> <p>Steve Dutky</p> <h3>See Also</h3> <p><code><a href="bitShiftL.html">bitShiftL</a></code>, <code><a href="bitAnd.html">bitXor</a></code>, etc.</p> <h3>Examples</h3> <pre> stopifnot( bitFlip(-1) == 0, bitFlip(0 ) == 2^32 - 1, bitFlip(0, bitWidth=8) == 255 ) </pre> <hr /><div style="text-align: center;">[Package <em>bitops</em> version 1.0-6 <a href="00Index.html">Index</a>]</div> </body></html>