a method for detecting a pn pattern for a remote loopback test in a communication system includes the following first through fifth steps . the first step receives a first n - bit pattern which is a part of the pn pattern . the second step leftwardly shifts n bits of the first n - bit pattern by a first number of bits , so that a second n - bit pattern is generated . the third step executes an exclusive - or operation on the n bits of the first n - bit pattern and n bits of the second n - bit pattern , so that a third n - bit pattern is generated . the fourth step rightwardly shifts n bits of the third n - bit pattern by a second number of bits , so that a fourth n - bit pattern is generated . the fifth step executes an exclusive - or operation on the n bits of the third n - bit patterns and n bits of the fourth n - bit patterns , so that a fifth n - bit pattern is generated . the fifth n - bit pattern is a sixth n - bit pattern which is received after the first n - bit pattern . the first through fifth are repeatedly carried out each time n bits of the first n - bit pattern are received at the first step until a pattern detection signal is generated to activate the loopback test procedure when the fifth n - bit pattern and the sixth n - bit pattern become identical for a number of times .