If you want to learn about how CRDTs work, I suggest starting with the readme from aphyr's meangirls repo.
Afterwards, either check out the riak dt source code or A comprehensive study of CRDTs depending on if you like to read papers or jump straight to source code examples.