What are those codes at the end of patent number?

These codes are called “kind codes” and are used to identify the type of patent publication, i.e., the kind of document. Kind Codes appear on the printed document to the right of the patent number. Understanding the Kind Code can help you understand the history of the patent. For example, a patent with a B1 Kind Code was not published when it was a patent application; a patent with Kind Code of B2 was published as an application, etc.