• Problem With Subtraction
    I am trying to do a straight forward subtraction and am getting the wrong result every time. The code is as simple as if(SetPoint>PulseCountLast) { error = SetPoint-PulseCountLast; } All three...
  • Problem With Subtraction
    I am trying to do a straight forward subtraction and am getting the wrong result every time. The code is as simple as if(SetPoint>PulseCountLast) { error = SetPoint-PulseCountLast; } All three...
  • 40 bit subtraction
    Can anyone please give me some hints as to how to go about subtracting one 40 bit number from another? At the start of a process I read a 5 byte counter from external hardware and store it. At the end...
  • Unsigned short subtraction
    I don't know what the ANSI/ISO C standard says about this, but I would expect the if block in the example below to be executed when a is 0 and b is 65535: /* a and b are unsigned short (16 bits)...
  • Unsigned short subtraction
    I don't know what the ANSI/ISO C standard says about this, but I would expect the if block in the example below to be executed when a is 0 and b is 65535: /* a and b are unsigned short (16 bits)...