implement GETBIT and SETBIT