Quantum-dot cellular automata (QCA) technology is another new technology in the field of nanoelectronics and quantum. With the help of this technology, basic to advanced digital circuits can be designed and implemented with low energy consumption and small area. Therefore, in this paper, a new design for a four- and eight-bit Linear feedback shift register (LFSR) or random counter, as well as a rising-edge-sensitive D flip-flop with the least possible number of cells and the smallest area, was presented. This paper first designs the proposed D flip-flop with 24 cells and an area of 0.01𝜇𝑚2, so that with the help of this flip-flop it can design four and eight-bit LFSR. This flip-flop is one of the most optimal and suitable designs in terms of area and number of cells. Then, in the second step, a four-bit LFSR with 144 cells and an area of 0.2𝜇𝑚2 was designed with the help of the proposed flip-flop in the most optimal possible state. Also, in the third step, an eight-bit LFSR with 281 cells and an area of 0.4𝜇𝑚2 has been implemented for the first time in QCA technology, which is among the best possible designs. All the designs and simulations of this article were done in QCADesigner version 2.0.3 software and with QCAPro software, the energy consumption of the proposed circuits.