4-Digit Display Error

Look carefully at the second sketch you posted. This line is the key one IMHO:

int8_t NumTab[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};//0~9,A,b,C,d,E,F