Some newer cars have a microprocessor that reads the variable resistor in the tank and communicates that reading to another microprocessor in the dashboard. Carmakers can tinker with the gauge movement a little -- they can compensate for the shape of the tank by comparing the float position to a calibration curve. This curve correlates the position of the float with the volume of fuel left in the tank. This allows the gauge to read more accurately, especially in cars with complicated gas-tank shapes.
Systems like this can also trigger a fuel light that signals when fuel is getting low. Most of these lights come on while there are still a couple of gallons of gas left in the tank, giving you plenty of time to stop for fuel.
The microprocessor can also provide some damping to the needle movement. When you go around a turn, or up a hill, the fuel can slosh to one side of the tank and quickly change the float position. If the needle were to respond quickly to all of these changes, it would be bouncing all over the place. Instead, software calculates a moving average of the last several readings of the float position. This means that changes in needle position occur more slowly. You may have noticed this when filling up your car -- you'll finish filling the tank long before the needle reaches full.
While fuel gauges are far from exact, they err on the conservative side.
For more information on fuel gauges and related topics, check out the links on the next page.