The CAS number is assigned by the Chemical Abstracts Service, a division of the American Chemical Society. Each substance is given a unique number in a sequence format (e.g., 58-08-2). The assignment involves a thorough review of the substance's chemical structure and properties to ensure accuracy and uniqueness.