The two character suffix you see after the main model (ie. 747-4xx, in this case referring to the 'xx') is the customer number. Boeing assigns each customer who ORIGINALLY owned the plane a customer number, which is used to designate their aircraft. For example, a 777-200 of British Airways (whose customer code is '36') would be 777-236. When the airplane is sold to another customer later on, this suffix DOES NOT change. This suffix is applied when the main body has completed construction.
Airbus has a different system altogether. They assign based on improvements made on the main model ie. the A330-300HGW is designated A330-343X whilst the main model is designated A330-323 if I'm not wrong. ALL A340-300Es around regardless of who they belong to are designated A340-313X.
Hope that answered your question.