mame does it by xor'ing the two values & the result together then anding with 16. as the half carry is 32 it then shifts the result left by 1.smf