def bani(registers, opcodes):
    """bani (bitwise AND immediate) stores into register C the result of the
    bitwise AND of register A and value B."""
    test_result = registers[opcodes[1]] & opcodes[2]
    return test_result