The generation of random numbers has many uses (mostly in statistics, for random sampling, and simulation). Before modern computing, researchers requiring random numbers would either generate them through various means (dice, cards, roulette wheels, etc.) or use existing random number tables.
Yawning, swallowing or chewing helps open the small canal (Eustachian tube) which connects your middle ear in the inner side of the ear drum, and equalizes the pressure with the outer side and causes the sensation of ears popping when swallowing.
When the tube is not opening and closing normally it is called Eustachian Tube Dysfunction. This can cause a crackling noise in the ear when you swallow and can even cause some pressure feeling in the ear. The cause of ETD can vary. The most common cause is a sinus infection or allergies. Once these clear, the ETD should clear as well, and the crackling noise should stop.