What is the difference between level shifter, voltage regulator and dc-dc converter? As I know, voltage regulator is used to produce constant output voltage from high voltage; level shifter is used to convert one voltage into another voltage; dc-dc converter is used to convert dc level into different level ? Is it correct ? If I want to convert 5V voltage supply to 2.5V, I need to use regulator, level shifter or dc-dc converter?
A level shifter is usually a part that converts digital signals from one logic standard to another. It might also be called a translator. For example, the MC14504B converts TTL logic signals to CMOS levels, and a MC10H607 converts PECL signals to TTL. A level shifter isn't meant to provide power, it can only source as much current as its target logic levels require.
The terms voltage regulator and dc-dc converter are somewhat overlapping. Classic linear regulators are almost always called regulators. Linear regulators can only be used to produce a lower voltage from a higher one. Switching supply circuits might be called regulators or dc-dc converters. (Purists might claim that the regulator is just one part of a dc-dc converter circuit. That is the regulator is what provides the feedback control, whereas the dc-dc converter is a complete circuit including external magnetics, switching transistors or diodes, etc.) Switching supply circuits include different types that are able to produce either lower or higher voltages from an input voltage.
To produce 2.5 V from 5 V, you can use either a linear regulator or a "buck" switching converter.
A level shifter is used between digital circuits in order to convert "high" and "low" as used by one of the circuits into "high" and "low" as used by the other. That both circuits usually use 0V for "low" is incidental.
A voltage regulator is used to take a possibly unstable voltage source of higher voltage and produce a smooth output voltage.
A DC-DC converter is used to provide one voltage given another as input. They usually have a voltage regulator in the output section.
To convert a 5V power supply into a 2.5V power supply you could use either a DC-DC converter or a voltage regulator; a level shifter would not be appropriate for this application.