In the UK for the moment the computer at Swanwick assigns the SSR code according to the Uk SSR Code Assignment Plan. That plan is published in the UK Air Pilot ENR 1.6 available on line. In the not too distant future the code will be assigned by a computer in Europe.