Computer code comprehension shares neural resources with formal logical inference in the fronto-parietal network
AbstractDespite the importance of programming to modern society, the cognitive and neural bases of code comprehension are largely unknown. Programming languages might ‘recycle’ neurocognitive mechanisms originally used for natural languages. Alternatively, comprehension of code could depend on fronto-parietal networks shared with other culturally derived symbol systems, such as formal logic and math. Expert programmers (average 11 years of programming experience) performed code comprehension and memory control tasks while undergoing fMRI. The same participants also performed language, math, formal logic, and executive control localizer tasks. A left-lateralized fronto-parietal network was recruited for code comprehension. Patterns of activity within this network distinguish between “for” loops and “if” conditional code functions. Code comprehension overlapped extensively with neural basis of formal logic and to a lesser degree math. Overlap with simpler executive processes and language was low, but laterality of language and code covaried across individuals. Cultural symbol systems, including code, depend on a distinctive fronto-parietal cortical network.