method and apparatus for recovering a clock and data from a data signal . one method of the invention includes receiving the data signal having a first data rate , receiving the clock signal having a first clock frequency , alternating between a first level and a second level , wherein the first data rate is twice the first clock frequency . a first signal is generated by passing the data signal when the clock signal is at the first level , and storing the data signal when the clock signal is at the second level . a second signal is generated by passing the data signal when the clock signal is at the second level , and storing the data signal when the clock signal is at the first level . a third signal is generated by passing the first signal when the clock signal is at the second level , and storing the first signal when the clock signal is at the first level . a fourth signal is generated by passing the second signal when the clock signal is at the first level , and storing the second signal when the clock signal is at the second level . an error signal is generated by taking the exclusive - or of the first signal and the second signal , and a reference signal is generated by taking the exclusive - or of the third signal and the fourth signal .