We introduce the algorithms for basis and decoding of quaternary lexicographic codes with minimum distance d = 3 for an arbitrary length n .