Check the Active-Time and Charge Arithmetic
Check the Active-Time and Charge Arithmetic
Ada re-derives this chapter’s own numbers step by step, at full precision
ADA · CALCULATION AUDIT
Check the Active-Time and Charge Arithmetic
On an FPU-less core a software floating-point multiply costs about 50 cycles, while the same work in fixed-point costs about 3 cycles. The chapter pushes both through a 16 MHz core drawing 1.5 mA while active — a 10,000-multiply burst and a 1,000-tap filter running at 100 samples/s — on the claim that fewer cycles simply mean a shorter awake window. This audit checks that step: do those cycle counts really turn into the active-time and charge savings the chapter claims?
Companion to the chapter Fixed-Point Arithmetic — every number here comes from that chapter.
Ada: The energy claim is only credible if the cycle counts become time and charge with the units carried through. These checks use only the chapter's existing 16 MHz clock, 1.5 mA active current, 10000-operation burst, 1000-tap filter, 100 samples/s rate, 50-cycle software-float cost, and 3-cycle fixed-point cost.
See the relationship before changing it
The figure reads from left to right. The blue card is cycles per multiply. The middle card applies this page's rule. The green card is burst active time. Walk the arrows once: set the input, apply the rule, then read the result with its unit.
The retained audit below checks several chapter fixtures. This model keeps those stated values fixed and changes only cycles per multiply, so the numeric fixture does not switch without explanation.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 50 cycles.
- 2
Name the relationship. time = 10,000 multiplies x cycles / 16,000,000 Hz x 1,000
- 3
Substitute with units. 10,000 x 50 / 16,000,000 x 1,000 = 31.25 ms
- 4
Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.
Predict, then change cycles per multiply
Try Predict the direction of time = 10,000 multiplies x cycles / 16,000,000 Hz x 1,000. Test another cycles per multiply, then compare burst active time.
Observe Fewer processor cycles shorten the awake window for the same ten-thousand-operation burst. Reset cycles per multiply to 50 and compare burst active time.
Explain Fewer processor cycles shorten the awake window for the same ten-thousand-operation burst.
Check yourself
What should you do before trusting a moved-control result?
What does this small model leave out?
Ready: use the stated baseline inputs, then compare each displayed result.
- Burst active time: float
10000 x 50 / 16000000 = 0.03125 s = 31.25 ms; fixed10000 x 3 / 16000000 = 0.001875 s = 1.875 ms. - Burst charge: float
1.5 mA x 0.03125 s = 0.046875 mA-s; fixed1.5 mA x 0.001875 s = 0.0028125 mA-s. - Once-per-second saving:
0.046875 - 0.0028125 = 0.0440625 mA-s/s, so the average-current saving is0.0440625 mAand the daily charge saving is0.0440625 x 24 = 1.0575 mAh/day. - Filter duty cycle: float
1000 x 50 = 50000 cyclesand50000 / 16000000 = 3.125 ms/sample; fixed1000 x 3 = 3000 cyclesand3000 / 16000000 = 0.1875 ms/sample. - Filter daily compute charge: at 100 samples/s, float duty is
100 x 3.125 ms = 0.3125 s/s, so1.5 x 0.3125 x 24 = 11.25 mAh/day; fixed duty is100 x 0.1875 ms = 0.01875 s/s, so1.5 x 0.01875 x 24 = 0.675 mAh/day.
Every number above is taken from the chapter’s own material and re-derived step by step.