Quantisation:
As mentioned above, all nuclei having nonzero spin angular momentum are associated with magnetic moment and hence may be assumed to be behaving as small bar magnets. However, you must remember that the nuclear spin magnet is a quantum particle unlike a small bar magnet and hence may take up only certain allowed orientations. A nucleus along with spin quantum number, I, when placed in an external magnetic field, can assume (2I + 1) orientations. Thus, a nucleus with I = ½, can take just two (2I + 1 = 2 × ½ + 1 = 1+ 1 = 2) orientations. The z-component of spin angular momentum, IZ is quantised and its value in the direction of the applied magnetic field is given as follows.
IZ = mI h
where mI is the quantum number for z-component of the spin angular momentum and it can take values of I, ... +I.