An [m] error at bit i causes bits i,i + 1,..., and i + m - 1 (or up to the end of the word) to be in error, inflicting m consecutive errors. The most practical cases are when m = 2 which is referred to as adjacent errors and when m = n (the length of the word) in which an error causes the rest of the bit stream to be complemented (or in error). An [m] t-ec/d-ed code denotes a code which is able to correct any t [m] errors and detect any d [m] errors. In this paper, a new distance measure (similar to the Hamming distance) is defined from which the necessary and sufficient conditions for [m] t-ec/d-ed codes are obtained. To design such codes, a simple transformation between the t-ec/d-ed and [m] t-ec/d-ed codes is introduced and a one-to-one map is established. The advantage of this map is two-fold. Firstly, all the well-known t-ec/d-ed codes can be used as [m] codes and secondly the well-developed encoder/decoder circuits for the t-ec/d-ed codes along with a few XOR gates can be used to realize the [m] t-ec/d-ed codes.