There is no longer writing, direct listing program is no longer written.
#include void main () {INT K, T; int G = 0x13; // Generate polynomial coefficient (here the generated polynomial is 4 times, so there are 5 factors, 10011, use hex Standby) CIN >> T; // input information code, the information here is selected, if to be longer, change the following red number, corresponding to add) T = T << 4; // Information left shift 4 digits k = T; g = g << 6; int i = 0; for (; i <7;) {if (t <0x400) // indicates that the first bit is 0, so to continue to left Move {t = t << 1; i ;} else t = t ^ g;} t = t >> 7; // a lower step is to restore K = K ^ t; cout << "T:" << HEX << t << endl; cout << "Result:" << HEX << k << endl;}