The automatic external defibrillator (AED) should carry out the diagnosis of the patient in a cardiac emergency when medical professionals are not present. The decision about defibrillation should be made without the help of first responder. To fulfill these requirements special algorithms are needed. In this article the structure of such an algorithm and also hardware implementation problems are described.