he prevalence of dementia is currently increasing worldwide. This syndrome produces a deteriorationin cognitive function that cannot be reverted. However, an early diagnosis can be crucial for slowing itsprogress. The Clock Drawing Test (CDT) is a widely used paper-and-pencil test for cognitive assessmentin which an individual has to manually draw a clock on a paper. There are a lot of scoring systems forthis test and most of them depend on the subjective assessment of the expert. This study proposes acomputer-aided diagnosis (CAD) system based on artificial intelligence (AI) methods to analyze the CDTand obtain an automatic diagnosis of cognitive impairment (CI). This system employs a preprocessingpipeline in which the clock is detected, centered and binarized to decrease the computational burden.Then, the resulting image is fed into a Convolutional Neural Network (CNN) to identify the informativepatterns within the CDT drawings that are relevant for the assessment of the patient’s cognitive status.Performance is evaluated in a real context where patients with CI and controls have been classified byclinical experts in a balanced sample size of 3282 drawings. The proposed method provides an accuracyof 75.65% in the binary case-control classification task, with an AUC of 0.83. These results are indeedrelevant considering the use of the classic version of the CDT. The large size of the sample suggests thatthe method proposed has a high reliability to be used in clinical contexts and demonstrates the suitabilityof CAD systems in the CDT assessment process. Explainable artificial intelligence (XAI) methods areapplied to identify the most relevant regions during classification. Finding these patterns is extremelyhelpful to understand the brain damage caused by CI. A validation method using resubstitution withupper bound correction in a machine learning approach is also discusse