For me DoInvert calculates the XOR between ('1'==BitString[i]) and CRC
Can someone help me with this?
11-23-2012, 03:15 AM
char CRC declared "CRC" as a "character variable". The  specifies that 8 digits are to be allocated to its memory.
So for instance if your code later said "cin >> CRC" to which the user would define CRC, only the first 8 characters that were input would be used to define CRC's value.
DoInvert = ('1'==BitString[i]) ^ CRC;
DoInvert is exactly what it sounds like. It does the inverse of what is requested.
('1'==BitString[i]) is checking whether the variable "1" (which must have been declared as a variable earlier) is equal to BitString (also likely declared earlier)
^ CRC is a mathematical function. It is the inverse of XOR. Hence why DoInvert calculates the XOR between the given values.