The following JavaScript code detects whether the visitor is using a mobile device and whether it's a 32-bit or 64-bit OS that is used:
// DETECT MOBILE DEVICE
PF = navigator.platform;
UA = navigator.userAgent;
DEVICE = navigator.userAgent + " " + navigator.platform;
MOBILE = /PHONE|MOBILE|TABLET|IPOD|IPAD|BLACKBERRY|LUMIA|ANDROID|WEBOS|PLAYBOOK|BB10|MINI|CRMO|OPERA MINI|OPERA MOBI|PALM|WINDOWS CE|XOOM|SCH-I800|KINDLE/i.test(DEVICE) | 0;
// DETECT 64-BIT CPU
X64 = /X86_64|X86-64|WIN64|X64|AMD64|WOW64|IA64|SPARC64|PPC64/i.test(DEVICE) | 0;