Abstract A hallmark of topological insulators is topologically protected edge states, which are determined by topological invariants defined under Bloch functions. Of course, not all edge states are stable, and they are independent of topological invariants. And in a recent study, it was found that even stable protected gapless edge states cannot be explained by topological invariants in two-dimensional (2D) systems. Motivated by this idea, we carried out a thorough study in one-dimensional (1D) spin-$\frac{1}{2}$-like noninteracting periodic systems and found that all edge states can be explained by the most compactly supported Wannier-type functions (MCWTFs). All the answers are contained in the flat-band Hamiltonian defined by MCWTFs. Edge states can be obtained by solving special equations using the parameters of MCWTFs. Symmetries are the special solutions of these equations, and we have proved the relationship between zero-energy edge states and symmetry analytically in partial cases, which was only a well-known result in the past. By solving the equations, we also find that not all zero-energy edge states are determined by symmetry, which is beyond the current framework. Through numerical verification, we show that these zero-energy edge states, like those protected by symmetry, are not affected by the energy spectrum of the system, so they are only related to the Bloch functions. We also derive special properties of zero-energy edge states protected by chiral symmetry from the perspective of MCWTFs, which are consistent with the previous literature. Finally, we do a test in the 2D case and find the connection between the Chern number and the Wannier functions. Our results show that compared with topological invariants, the origin of the edge state can be understood more comprehensively from the perspective of Wannier functions.