Differential encoding of data is required for some modulation schemes such as duobinary and differential phase shift keying. Both these modulation schemes are now being considered for optical links at high data rates such as 10 Gbps and 40 Gbps. This paper describes how a differential encoder can be implemented using high-speed logic parts from Inphi.