Methods for controlling machines using physiological signals have been the focus of much research over the last decades. One natural approach is to use brain signals for decoding subject-driven cognitive states. However, brain-based decoding approaches often require costly, challenging to handle, and uncomfortable devices inadequate for daily use. We propose an alternative method to decode cognitive states based on heart rate (HR). Although HR is capable of classifying general physiological conditions (e.g., level of physical activities, stress, some diseases), it is less clear if HR signals can discriminate cognitive states. To answer this question, we submitted 25 subjects (mean age +- standard deviation, 30.2+- 4.9 y.o.) to four cognitive tasks: (i) resting quietly, (ii) remembering their day's events, (iii) singing lyrics, and (iv) subtracting numbers. We collected the electrocardiogram twice for each individual, separated by approximately one week. We used an inexpensive commercially available chest sensor band to collect the HR. We trained a support vector machine to classify the cognitive tasks using data collected on day one. Then we validated it in the dataset collected on day two. Our results show classification accuracy higher than expected at random (p < 0.001). Therefore, we conclude that we can use HR to help decode cognitive states. Because we can easily monitor the HR using a wearable sensor, HR is potentially helpful for human-machine interface applications in daily conditions.