Nowadays there is an increasing interest in carbon-free fuels such as ammonia and hydrogen. Those fuels, on one hand, allow to drastically reduce CO2 emissions, helping to comply with the increasingly stringent emission regulations, and, on the other hand, could lead to possible advantages in performances if blended with conventional fuels. In this regard, this work focuses on the 1D numerical study of an internal combustion engine supplied with different fuels: pure gasoline, and blends of methane-hydrogen and ammonia-hydrogen. The analyses are carried out with reference to a downsized turbocharged two-cylinder engine working in an operating point representative of engine operations along WLTC, namely 1800 rpm and 9.4 bar of BMEP. To evaluate the potential of methane-hydrogen and ammonia-hydrogen blends, a parametric study is performed. The varied parameters are air/fuel proportions (from 1 up to 2) and the hydrogen fraction over the total fuel. Hydrogen volume percentages up to 60% are considered both in the case of methane-hydrogen and ammonia-hydrogen blends. Model predictive capabilities are enhanced through a refined treatment of the laminar flame speed and chemistry of the end gas to improve the description of the combustion process and knock phenomenon, respectively. After the model validation under pure gasoline supply, numerical analyses allowed to estimate the benefits and drawbacks of considered alternative fuels in terms of efficiency, carbon monoxide, and pollutant emissions.