The right ear represents the litter number. So if it has a 3 notch and a 27 notch it would have come from the 30th litter.
The left ear represents the pig its self. If it has a 9 notch and a 3 notch it would be pig number 12.
So it would be the 12th pig born in the 30th litter.