Most of the answers to such questions are in the documentation.
As an extension of the ANSI / ISO standard, SQL92 MySQL allows you to specify the number of characters of an integer displayed to the user, if necessary. This optional indication of the number of characters to be output is used to left-up the output values that contain characters less than the specified column width, but does not place restrictions on the range of values that can be stored in a column, or on the number of digits that can be displayed for values which number of characters exceeds the width of this column. If the optional attribute ZEROFILL is additionally specified, the free positions by default are filled with zeros. For example, for a column declared as INT (5) ZEROFILL, the value 4 is extracted as 00004.
It should be noted that if a value is stored in a column for integers with the number of characters exceeding a predetermined column width, problems may arise when MySQL will generate temporary tables for some complex links, as in such cases MySQL assumes that the data really fit into the column available width.
http://phpclub.ru/mysql/doc/numeric-types.html