def write_bit(self, value, bit_num, address):
bit_mask = get_bit_mask(bit_num)<EOL>old_byte = self.read(address)<EOL>if value:<EOL><INDENT>new_byte = old_byte | bit_mask<EOL><DEDENT>else:<EOL><INDENT>new_byte = old_byte & ~bit_mask<EOL><DEDENT>self.write(new_byte, address)<EOL>
Writes the value given to the bit in the address specified.

        :param value: The value to write.
        :type value: int
        :param bit_num: The bit number to write to.
        :type bit_num: int
        :param address: The address to write to.
        :type address: int