This textbook synthesizes neuroscience and cognitive science. Cognition and intelligence arise from neural circuits endowed with many feedback loops, which is difficult to understand by intuition alone. The book covers basic computational neuroscience required for discussions of brain mechanisms and computational principles of cognition.