The present invention relates to a device (102b,104b) for generating a
polar code N of length N and dimension K on the basis of a
transformation matrix G N of size N*N, wherein the
transformation matrix G N is based on a first matrix G N r of size N r x N r , and on a second matrix G Nd of size N d x N d , wherein N=Nr.Nd, and wherein the
polar code xN is given by xN=uN.GN, wherein uN=(u0,...,uN-1)is a vector of size N, ui ,i=0,... N 1, corresponding to an information bit if i belongs to I, I being a set of K information bit indices, and ui=0, if i belongs to F, F being a set of N K frozen bit indices. The device (102b,104b) comprises a processor (102c,104c) configured to generate a reliability vector v GNr=[v1,... v Nr ], wherein v i represents a reliability of an i-th input bit of a code generated by the first matrix GNr, generate a
distance spectrum vector d GNd=[d1,..., dNd ] of a code generated by the second matrix G Nd , wherein d j represents a
minimum distance of the code generated by the second matrix GNd of dimension j, determine the set of K information bit indices I on the basis of the reliability vector v GNr and of the
distance spectrum vector dGN, and generate thepolar code c N on the basis of the set of K information bit indices I.