
25 Apr
2005
25 Apr
'05
5:13 p.m.
Hi
I just wondered if the code
return (dtt_read(sensor, DTT_READ_TEMP) / 256);
would be result in a "shift by 8" or and interger division?
I believe that would depend on compiler, compiler optimization options and processor architecture. AFAIK, gcc will even replace multiplication with shift/add/subtract sequences on 486 (that does have multiply opcode) because it will be faster.
Sergei Sharonov