
22 Apr
2005
22 Apr
'05
7:10 p.m.
Steven Scholz wrote:
Hi there,
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?
Thanks,
Steven
Short answer: Yes.
Longer answer: It depends on the compiler, target processor, and optimization levels. Usually it will be a "shift by 8" (which may or may not actually be a shift -- see the PowerPC "Swiss Army Knife[tm]" instruction rlwimi).
gvb