With aid of pear if compass and ruler bisect a line of 12cm.

How about some English?

With the aid of compass and ruler bisect a line of 12 cm.

The length of the line does not matter for the construction.

Draw the line AB.
Open the compass to more than half the length of AB.
From A, draw an arc
From B, draw an arc

The two arcs (if long enough) will intersect above and below the line AB.

Draw line joining the two intersection points. It will intersect AB in the center. You have bisected AB.