An integrated circuit includes an input/output pad, a driver circuit connected to the input/output pad, and a receiver circuit connected to the input/output pad, and a code generator. The driver circuit is configured to output an output signal to an external device through the input/output pad. The receiver circuit is configured to receive an input signal from the external device through the input/output pad. The code generator is configured to generate a termination code of the external device in response to a signal output from the receiver circuit.