Many thanks for the reply. I have noticed (for example) that the US Military codes that I have received over the last few days all start with a limited range of characters, likewise for the UK Military codes. This would seem to be intentional then?
The US system is relatively straightforward.
Civil Mode S codes are allocated in the range A00001 (N1) to ADF7C7 (N99999). That accounts for 915,399 codes out of the USA's allocation of 1,048,576 codes (A00000 isn't used), and the remaining ones from ADF7C8 onwards are available for use by the military.
The UK's system is broadly similar, except that codes aren't pre-allocated to registrations. The allocation is 400000 to 43FFFF, with civil codes starting at 400400 and the highest allocated code so far being 406179. Military codes start at around 43C000, and around 3,000 or so have been allocated. Beyond the military block is a relatively recent allocation for the Isle of Man with (I believe) a range of 500 codes in the 43Exxx range. The thousand or so codes in the range 400000 to 4003FF are mostly reserved for Bermuda and the Cayman Islands, other than a few test/military codes at the very beginning of the sequence.
HTH, any other questions please ask.