You can use one of many available voltage regulator ICs. Try Mouse or Jameco or Digi-key for model numbers.
Zeners can be used but they are worse regulators than such ICs.
On the other hand, logic 5V and 3.3 V levels offer a window within which the systems work, so no tight regulation is often necessary.
Where your DC source generates lower than required voltage (like 4.7 V in a 5V system), you may need a DC/DC converter to get >5 V, then regulate.
- - - Updated - - -
In uncertain situations I would use comparators to get the nominal logic output from lower input. No regulated DC is needed for a comparator.