0 has an even number of bits, so, the answer is yes.
Test:
// compiled with Open Watcom C/C++ 1.9
#include <stdio.h>
unsigned parity(unsigned v)
{
unsigned p = 0;
__asm
{
mov eax, v
or eax, eax
pushf
pop eax
shr eax, 2
and eax, 1
mov p, eax
}
return p;
}
int main(void)
{
unsigned i;
for (i = 0; i < 8; i++)
printf("PF(%u) = %u\n", i, parity(i));
return 0;
}
Output:
PF(0) = 1
PF(1) = 0
PF(2) = 0
PF(3) = 1
PF(4) = 0
PF(5) = 1
PF(6) = 1
PF(7) = 0