A computer is not "smart" it just does what it is told to do through binary code. The intelligence comes from the programmers who make the operating system for the computer.

Edit: Not really from the programmers of the operating system, more so the people who created the language in which the operating system was programmed in. With C++, you can make the system do anything as long as you have the skill to make it do so. With a language I guess you could make a computer have artificial intelligence, but not mental alertness.