def _getMemoryBit(cpu, bitbase, bitoffset):
assert bitbase.type == '<STR_LIT>'<EOL>assert bitbase.size >= bitoffset.size<EOL>addr = bitbase.address()<EOL>offt = Operators.SEXTEND(bitoffset.read(), bitoffset.size, bitbase.size)<EOL>offt_is_neg = offt >= (<NUM_LIT:1> << (bitbase.size - <NUM_LIT:1>))<EOL>offt_in_bytes = offt // <NUM_LIT:8><EOL>bitpos = offt % <NUM_LIT:8><EOL>new_addr = addr + Operators.ITEBV(bitbase.size, offt_is_neg, -offt_in_bytes, offt_in_bytes)<EOL>return (new_addr, bitpos)<EOL>
Calculate address and bit offset given a base address and a bit offset
            relative to that address (in the form of asm operands)