To provide reliable communication in data transmission, ability of correcting errors is of prime importance. This paper intends to suggest an easy algorithm to detect and correct errors in transmission codes using the well-known Karnaugh map. Referring to past research done and proving new theorems and also using a suggested simple technique taking advantage of the easy concept of Karnaugh map, we offer an algorithm to reduce the number of occupied squares in the map and therefore, reduce substantially the execution time for placing data bits in Karnaugh map. Based on earlier papers, we first propose an algorithm for correction of two simultaneous errors in a code. Then, defining specifications for empty squares of the map, we limit the choices for selection of new squares. In addition, burst errors in sending codes is discussed, and systematically code words for correcting them will be made.