NOVELTY - Producing (M1) hydrocarbon fuels from biomass involves converting at least a portion of the biomass into 4-9C medium-chain fatty acids (MCFAs) or carboxylic acids; reacting at least a portion of the MCFAs or carboxylic acids in a ketonization reactor to produce ketonization product; and reacting at least a portion of the ketonization product in hydrodeoxygenation reactor to remove all oxygen and produce hydrodeoxygenation product comprising n-paraffins.    USE - For converting biomass into medium-chain fatty acids or carboxylic acids and hydrocarbon fuels e.g. transportation fuels or drop-in fuels particularly diesel or jet fuel (Claimed).    ADVANTAGE - The method enables selective conversion of MCFAs (e.g. recovered from mixed culture fermentation) into hydrocarbon biofuels. For shorter chain fatty acids (acetic and propionic), extensive oligomerization to elongate the carbon chain is necessary and production of diesel is difficult since the oligomerization reaction has difficulty generating molecules that are long enough to meet the diesel specifications. In addition, some of the catalysts for the oligomerization process may be easily poisoned by sulfur and nitrogen impurities. The process starts with MCFAs and is able to obtain the proper carbon length from the ketonization step without the need of oligomerization, thus making it easy to produce diesel and jet fuel. The process of ketonization followed by hydrogenolysis to convert MCFAs into hydrocarbons produces higher yields compared to processes that used short-chain fatty acids because oxygen, which needs to be removed, is a smaller percentage of the MCFAs compared to the short-chain fatty acids. The process is not limited by sulfur or nitrogen poisons because the first step after ketonization is hydrotreating to hydrodeoxygenate the ketones, which removes sulfur and nitrogen impurities. The process of hydrogenating the MCFAs to convert them to alcohols, followed by dehydration and dimerization/trimerization to convert them into hydrocarbons uses more hydrogen than the process that employs ketonization, but results in higher yields because it avoids the loss of CO2 that occurs during the ketonization process.    DETAILED DESCRIPTION - Producing (M1) hydrocarbon fuels from biomass involves converting at least a portion of the biomass into 4-9C medium-chain fatty acids (MCFAs) or carboxylic acids; reacting at least a portion of the MCFAs or carboxylic acids in a ketonization reactor to produce ketonization product; and reacting at least a portion of the ketonization product in hydrodeoxygenation reactor to remove all oxygen and produce hydrodeoxygenation product comprising n-paraffins. INDEPENDENT CLAIMS are included for the following    (1) a method (M2) for producing hydrocarbon fuels from biomass involving converting at least a portion of the biomass into fatty acids or carboxylic acids by means of fermentation; and reacting at least a portion of the fatty acids or carboxylic acids to remove all oxygen and produce n-paraffins by means of catalytic hydrodeoxygenation and/or decarboxylation; and    (2) a method (M3) for producing hydrocarbon fuels from biomass involving converting at least a portion of the biomass into 4-9C MCFAs or carboxylic acids; reacting at least a portion of the MCFAs or carboxylic acids in a hydrogenation reactor to produce alcohols; and reacting at least a portion of the alcohols in dimerization or trimerization reactor to remove substantially all oxygen and produce olefins and to dimerize and trimerize such olefins to produce dimerization/trimerization product comprising n-paraffins.