Oilfields have large amounts of old well-logging data, some of which were possibly lost or distorted for borehole situation, limiting the use of well-logging in formation evaluation. Machine-learning algorithms provide possibility to complete or correct bad quality logging, even to generate new loggings. We took 50 wells in the Ordos Basin, a prolific hydrocarbon production basin, as an example to complete and generate well- loggings. We applied three algorithms, such as random forest (RF), extreme gradient boosting (XGBoost), and deep neural network (DNN) algorithm, for well-logging curve completion experiments. We generated resistivity loggings including deep investigate lateral resistivity log (RILD) and medium investigate lateral resistivity log (RILM) using four loggings, e.g. the spontaneous potential (SP), gamma ray (GR), acoustic log (AC), and electrical resistivity log (R4). After data preprocessing, we used training data sets and validation data sets, accounting for 90% and 10% of all database, respectively, to complete and generate well-logs. The results reveal that the XGBoost algorithm has a better effect on well-log completion if the parameters used are sufficiently optimized with experience, whereas the DNN algorithm has great advantages if large sufficient amounts of well-log data sets are available in the training sets. In this experiment, the accuracy of results by RF algorithm is better than those by XGBoost algorithm because the optimized parameters are difficult to guarantee without experience, and better than that, by DNN algorithms in which the input number of wells is less than 300 and may not be sufficient. In addition, RF algorithm has wider expansibility, higher efficiency, lower computation requirements, and better generalization ability. Our work provides a better understanding of the conditions and function of the application of different machine-learning algorithms to well-logging completion and generation.