Solution
One way to retrieve this information is to read the executable as a text file and look for a certain string.
Early on in the text, the two letters
PE appear followed by either an
L or a
d. If the character proceeding the
PE is an
L, the bitness of the executable is 32-bit, and if it is a
d, the bitness of the executable is 64-bit.
The following example VI takes in an executable and extracts its bitness using the method described above.