A communication device has a transmission device 17 and a reception device 19. The transmission device 17 calculates a DC balance value of input data, compares the DC balance value and a cumulative value thereof, and compares the sign of the DC balance value and the sign of the cumulative value. When the signs are the same sign, the transmission device generates intermediate data by exchanging a first value and a second value with each other for all the bits of the input data, and generates predetermined information indicating that all the bits have been inverted. When the signs are different signs, the transmission device performs a process of setting the input data as the intermediate data and transmits the intermediate data by a serial signal. The reception device 19 generates output data by exchanging the first value and the second value with each other for all the bits of the received data when the predetermined information is generated, and sets the received data which is received as the output data when the predetermined information is not generated.