 A code is uniquely decodable if its extension is non-singular (see above).Whether a given code is uniquely decodable can be decided with the Sardinas–Patterson algorithm.A code is a prefix code if no target bit string in the mapping is a prefix of the target bit string of a different source symbol in the same mapping.