That's correct. "Both . . . not" expresses two possibilities: "both . . . not" as in neither of the two, and "both . . . not" as in only one:"Both Peter and Tom are not doctors" (which means either Peter or Tom is a doctor).
#1 Both are not doctors. (Neither is a doctor)
#2 Both are not doctors. (Only one is a doctor)