Mental functions that compare and process information retrieved from both short-term and long-term memory.