You just could run a shell command "sysctl hw.cpu64bit_capable" for example
I believe that merely tells you if the hardware supports 64 bit. A 32 bit kernel could be running on a 64 bit architecture. The question was a little ambiguous. If by "System" the OP means OS then I'd use "uname", if by "System" they mean hardware I'd use "sysctl". I'm presuming the capitalization of the word "System" means software, and not hardware. Of course, I may be wrong...
would show the kernel version, for example on my 10.8.3 machine I'm running Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64
, a 32 bit OS would show i386 instead of X86_64