bitFlip                package:bitops                R Documentation

_B_i_n_a_r_y _F_l_i_p (_N_o_t) _O_p_e_r_a_t_o_r

_D_e_s_c_r_i_p_t_i_o_n:

     ...

_U_s_a_g_e:

     bitFlip(a, bitWidth=32)

_A_r_g_u_m_e_n_t_s:

       a: numeric vector.

bitWidth: 

     {scalar integer between 0 and 32}

_V_a_l_u_e:

     binary numeric vector of the same length as 'a' masked with
     (2**'bitWidth')-1. NA is returned for any value of 'a' that is not
     finite or whose magnitude is greater or equal to 2**32.

_A_u_t_h_o_r(_s):

     Steve Dutky <sdutky@terpalum.umd.edu>

_E_x_a_m_p_l_e_s:

       bitFlip(-1) == 0
       bitFlip(0) == 4294967295
       bitFlip(0,bitWidth=8) == 255

