Rather easy.
The number of combinations available in 24 bits is 2^24-1 = 16777215
The number of combinations of nnnnAA is 6760000 (in reality this is a slight simplication in view of the availability of shorter registrations), but the maths does not pose a problem. Talk to an avionics man about how the tail number is programmed into a GTX330 if you want further evidence.
2D