The actual major and minor device IDs are values masked from of the raw device ID. For details on the actual calculations used to determine the major or minor IDs see the actual source in kern_conf.c.