It is not quite clear what you want to achieve but there are some possible errors.
Here -5 is not binary 1101:
else exp[index] = -5;
-5 is hex 0xFFFB. So the lowest 4 bits are 1011.
The loop to shift the nibbles (4 bit values) into the quad part should probably shift first:
for (index = 0; index < sizeof(exp) / sizeof(short); index++)
{
uiCode.QuadPart <<= 4;
uiCode.QuadPart |= (exp[index] & 0x000f);
}
Otherwise the lowest four bits will be always zero and the upper bits may get shifted out.
Finally a tip. Arrays can be initialised upon definition:
short exp[10] = { 1, 0, -2, 0, -1, 0, 2, 0, 0, 1 };