Laws of Cricket 1980 Code - Law 26
1. Byes
If the ball, not having been called "wide" or "no ball" passes the striker without touching his bat or person, and any runs are obtained, the umpire shall signal "bye" and the run or runs shall be credited as such to the batting side.
2. Leg-Byes
If the ball, not having been called "wide" or "no ball" is unintentionally deflected by the striker's dress or person, except a hand holding the bat, and any runs are obtained the umpire shall signal "leg-bye" and the run or runs so scored shall be credited as such to the batting side.
Such leg-byes shall only be scored if, in the opinion of the umpire, the striker has:
a. attempted to play the ball with his bat, or
b. tried to avoid being hit by the ball.
3. Disallowance of Leg-Byes
In the case of a deflection by the striker's person, other than in 2(a) and (b) above, the umpire shall call and signal "dead ball" as soon as one run has been completed or when it is clear that a run is not being attempted or the ball has reached the boundary.
On the call and signal of "dead ball" the batsmen shall return to their original ends and no runs shall be allowed.
Reproduction of the Laws of Cricket is by kind permission of Marylebone Cricket Club