Explain the underlying principle and working of an electric generator by drawing a labelled diagram. What is the function of brushes?
Answer
An Electric Generator looks like
Principle of Electrical generator
The electrical generator works on the principle that
when a straight conductor is moved in a magnetic field,
then current is induced in the conductor.
Working of Electric Generator
Let's look at the working of an Electric Generator

Suppose axle is rotated clockwise, so coil is also rotated clockwise,
Side AB of Coil moves up and side CD Moves down
Applying Fleming's Right Hand Rule on side AB,
force is upwards, magnetic field is left to right,
So, current flows into the paper i.e. from A to B

And applying
Fleming's Right Hand Rule
on side
CD,
force is downwards, magnetic field is left to right,
So, current flows out of the paper i.e. from C to D

Hence, current flows into the Brush B
_{
2
}
, moves along galvanometer and finally enters B
_{
1
}
Hence, we say current flows from
B
_{
2
}
to B
_{
1
}
in the external circuit.

After
half a rotation,
Side CD Comes on left side and AB Comes on Right Side

Now, on left side CD comes down,
Applying Fleming's Right Hand Rule on side CD,
force is downwards, magnetic field is left to right,
So, current flows out of the paper i.e. from D to C

And on right side, AB comes up,
Applying Fleming's Right Hand Rule on side AB,
force is upwards, magnetic field is left to right,
So, current flows into the paper i.e. from A to B

Hence, our circuit is now DCBA,
and current moves in the opposite direction 
Hence, we say current flows from
B
_{
1
}
to B
_{
2
}
in the external circuit.

Thus, after every half rotation, direction of current changes.
Hence, Alternating Current is produced
Function of brushes
The function of brushes is that the brushes conduct current between stationary wires and moving parts of the electric generator.