a) Battery allows the computer to know what time it is and what the installed options are by always supplying a little power to those components even when the computer is turned off.
b) Clock is used to tell the CPU and the other components when to execute their instructions and perform tasks. The clock synchronizes all the actions in the computer. The "ticks" of a computer clock are every 10 billionth of a second apart on the modern machines. The time of day and the date a derived from the clock signals.