ProcessAffinityMask is a setting which gets routed directly to the operating system.
In your case marcost your CPU is a quad core with hyper threading, meaning that you have 4 physical cores in total where each simulates an additional core.
Your core's numbers hence are:
1 = physical core no. 1, thread 1
2 = physical core no. 1, thread 2
3 = physical core no. 2, thread 1
4 = physical core no. 2, thread 2
5 = physical core no. 3, thread 1
6 = physical core no. 3, thread 2
7 = physical core no. 4, thread 1
8 = physical core no. 4, thread 2
Per default the "thread 2" cores will be parked unless there's heavy CPU load with more than 4 threads in parallel.
This means if you'd like to use the first 3 (physical) cores you have to use core no. 1, 3 and 5 (in resource monitor, which is zero-based, this means core 0, 2 and 4).
Writing this down in binary format gets you this result:
Core 0 = 1 (physical core no.1, thread 1: Use this core)
Core 1 = 0 (physical core no.1, thread 2: Don't use this core)
Core 2 = 1
Core 3 = 0
Core 4 = 1
Core 5 = 0
Core 6 = 0
Core 7 = 0
Now write down the "0"s and "1"s in reverse order and you get this:
00010101
This is the binary value of your ProcessAffinityMask setting, in decimal this is
21
You can do the same with any number of cores. E.g. if you happen to have a hexa-core system with hyperthreading, this would mean you have 12 cores in total.
Let's say you don't wanna let IL-2 hog the hyper threading (which means it should only use physical cores) and you wanna keep core no.0 free for the OS, then you get this binary setting:
010101010100
This is decimal 1364, which is the value you'd have to assign to ProcessAffinityMask to get that effect.
Best regards - Mike