It should be noted that although some of the cocaine in crack is more potent due to the hcl base having been knocked off of it (where the name freebasing comes from), in practice since it is used with its carrier (namely baking soda and presumably hcl) the resultant mixture is actually most likely of decreased potency as compared to pure cocaine hcl, but due to having disconnected the hcl from the cocaine it is suitable for smoking. In the case of freebasing cocaine with ammonia the situation is different, in that the ammonia is, I believe, evaporated prior to the product being smoked, and I believe you can actually filter or evaporate off the disconnected hcl and then be left with truly the purest form of cocaine molecule.
That is a rough understanding of the matter as I am not a chemist, but it is pretty close to that.
A carrier is a material that acts as a substrate for a pharmaceutical, such that the carrier + substance can be treated as a singular drug even as they are a mixture. For example, LSD on blotter paper makes use of the blotter paper as its carrier. Hash in brownies makes use of the brownies as its carrier. Powders dissolved in liquid for injection or oral administration make use of the liquid as their carrier. It is very common for medicine to make use of binding material as a carrier and to be pressed into a pill form. Marijuana plant material is a carrier for THC/CBD and other cannibinoids. Tobacco is a carrier for nicotine, and beer is a carrier for alcohol.
So, when you mix baking soda with cocaine hcl and boil it, you are left with cocaine, cocaine hcl, perhaps hcl (not sure), and baking soda, with only cocaine hcl and cocaine being psychoactive.
Potency is the measure essentially of the smallest amount of a substance that produces a therapeutic response. So, LSD is very potent because it is taken at doses measured in micrograms, whereas ketamine is less potent as it is oftentimes taken at doses of hundreds of milligrams. Closely related to potency is efficacy, which is the strongest response that a substance can produce regardless of dose. A closely related concept is a therapeutic index, which is the difference between the smallest amount of a substance that produces a therapeutic response and the amount of the substance needed to produce a toxic effect. Therapeutic index is one of numerous measures of how dangerous a substance is.
Many people are unaware of this, but a given drug name (e.g. 2c-b) is oftentimes not a single given chemical molecule (i.e. it could be 2c-b hbr, 2c-b hcl, or perhaps numerous other things). Many drugs have numerous molecules that fall under their umbrella. One example of how this can manifest is regarding enantiomers. For example, ketamine is a stereoisomer, having the enantiomer s-ketamine and the enantiomer r-ketamine, which are also called isomers of ketamine. A mixture of stereoisomers is called a racemic. So, ketamine is not any given molecule, but rather is at least two distinct molecules. It may be possible to further break it down as well; however, I am uncertain. Another way that a drug can be the same but different is regarding the base it has. For example, 2c-b is actually a shorthand for either 2c-b hcl or 2c-b hbr. 2c-b hcl is actually more potent than 2c-b hbr because the hbr adds more weight to each molecule than the hcl does. The hcl or hbr is called the base. This results in two different chemical molecules that are both validly called 2c-b. THC has numerous forms as well, delta-9-tetrahydrocannabinol being the most well known, but there is also at least delta-8-tetrahydrocannabinol. I am a bit unclear on the matter though, and it looks like THC may have very many unique molecular expressions.
When you have cocaine hcl, the weight of the substance is partially the weight of cocaine and partially the weight of the hcl base. So, when you remove the hcl base and have just cocaine (via a process called freebasing), the potency is increased as compared to cocaine hcl, because the hcl doesn't to my knowledge modify the psychoactive properties and just adds weight. Since the weight of the molecule is increased by the hcl without it providing any additional psychoactive effect, the potency of the substance is less than that of cocaine with the hcl knocked off of it, as the weight of the hcl is knocked off but the psychoactive effect per molecule of cocaine remains the same. So, freebasing cocaine hcl results in the more potent cocaine, but if you do so with baking soda you actually end up with a mixture of cocaine and a carrier of baking soda, and the total weight of the carrier baking soda plus the freebased cocaine in it (and possibly hcl, not sure if it sticks around or not) could be more than the total weight of the cocaine hcl in the first place, such that the mixture is actually less potent unless you filter the freebased cocaine from the carrier. Typically people simply freebase cocaine in this manner to be able to smoke it though.
So, that is a little introduction to pharmacology and chemistry. You should double check it yourself as I am by no means a professional in these areas; however, I believe that what I said is accurate.