Automatically switches to a 9v battery on power loss. The 7 segment shows a power level of 5-0 as the battery voltage drops from 9-4 volts. The dot on the 7 segment shows when the main power supply is active.
The voltage source on the left represents a 9v battery and you can see how it operates by changing its voltage. The supply on the right represents a 12v main supply.