M-ary encoding allows for digital signals with multiple possible conditions or voltage levels through the use of multiple binary variables. The number of conditions possible is represented by M, while the number of bits needed to produce those conditions is given by the logarithmic relationship N = log2M. M-ary PSK and M-ary QAM are two common types of M-ary encoding. M-ary PSK varies the phase of a carrier signal, while M-ary QAM varies both the amplitude and phase, allowing for greater power efficiency but identical bandwidth efficiency as M-ary PSK. Both modulation schemes use a constellation diagram to represent the multiple symbol states.