Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Digital '0' or '1'

  1. Apr 5, 2012 #1


    User Avatar
    Gold Member

    I wanna see if I got it right.

    In truth tables we only have '0' or '1'...each representing a different voltage, I presume. So far correct?

    Now, a machine only understands "electrical pulse" or "no electrical pulse"... So, the higher voltage is "electrical pulse"...that would be '1'...and the lower voltage, represented by '0', is "no electrical pulse".

    Did I get it all correct?
  2. jcsd
  3. Apr 5, 2012 #2
    That would work. That is just one way it is done. I don't know if calling it absense of pulse is exactly the most conventional way to think about it though. Its better to think of it as "high voltage level" and "low voltage level", at least that's the more common perspective in digital electronics. There are many more possibilities. Remember the 0 and 1 are abstract representations of information.
  4. Apr 5, 2012 #3


    User Avatar
    Science Advisor
    Gold Member

    You are basically correct but keep in mind that it is not necessarily a 'pulse'. A pulse is generally thought of going from off to on and then back off. Or, the opposite, starting at on, then going off and back on again. I would say it is generally best to think in terms of 0 and 1. An input to a microcontroller that tells if a door is open for instance would most likely be a steady state. Door open, voltage present on input of microcontroller. Door closed, no voltage present. No pulse, just a steady state based on door postion. Of course, this is not to say that some digital circuits will not read pulses, but I won't confuse you with any more info right now.
  5. Apr 5, 2012 #4

    jim hardy

    User Avatar
    Science Advisor
    Gold Member


    most logic circuitry uses constant levels instead of pulses.
    In my day it was zero volts and 15 volts , then they went to zero and 5 volts for the seventies, nowadays i think it's zero and 3 volts because that's a handy battery voltage.

    Next we have to assign our logical "zero"(false) and logical "one"(true) to the two voltage levels we are using.
    You'd think logical zero would be zero volts but, doggone it , there's "low true" and "high true" logic. So a logical "zero" might be 3 or 5 volts , or it might be zero volts depending on the equipment and logic family.

    You have to read the datasheets carefully.

    Sorry to be so vague. It seems terribly awkward at first but like any language your brain wraps around it with practice.

    When looking at drawings it's pretty safe to assume that a signal with a line above its name is "low true", that is zero volts is logical 1 (true) .
    If you're lucky the designers named their signals somewhat mnemonically. For example [itex] {PSON}[/itex] could be a line that's driven high to turn Power Supply ON, [itex]\overline{PSON}[/itex] a line that's driven low to turn Power Supply on.

    old jim
  6. Apr 5, 2012 #5


    User Avatar
    Science Advisor
    Gold Member

    If only all designers stuck to this logic.
  7. Apr 5, 2012 #6


    User Avatar
    Gold Member

    So in digital electronics machine would mainly recognize low voltage as their '0', and high voltage as their '1'?
  8. Apr 5, 2012 #7
    Well, in some setups, and I think its easiest to learn it as 1 = high, 0 = low, but its not the rule. Read the post by jim_hardy tho. A high can be 0 and a low can be 1, or it can be differential, or it can be phase shift keyed or frequency shift keyed . . it depends on what convention the designer chooses for the system. That's why I say 1 and 0 is an abstraction.

    Edit: You should also try to think of this in context of synchronous vs. asychronous logic. A clock "reference" signal can be used to know when a low should be counted as a low, rather than just an absense of high.
  9. Apr 5, 2012 #8


    User Avatar
    Gold Member

    In general, 1 equals current on.....and 0 current off.

    There are exceptions like the LED diode. A voltage of 0 lets the current flow and turns the light on!

    But....you could say in general that 1 is 5 volts....and 0 is 0 volts.

    I'm not quite sure "pulse" is the best way to put it.

    Picture a 5 volt battery connected to an input with a switch. When on, the input literally gets 5 volts. When the switch is off...it gets zero volts.

    Also, the "switch" I refer to above is often in the form of a transistor. And the gates in your digitial circuit is often hundreds and hundreds of tiny transistors that are lined up in a logical way to get the outputs you want according to your outputs. Your smart phone has a gazillion transistors in it.

    One more.........often your input could be 8 inputs for example. Maybe 8 parking spaces for example. Maybe it's a weighing scale that trips the input. Lets say that every other parking spot was filled. Then the input would be 10101010. Every 1 is for a car in the space....every 0 is for an empty space.
  10. Apr 5, 2012 #9
    NOOOOO. Have you heard of ECL logic where the high voltage is -0.95V and low is -1.8V. It all depends on which logic family you are using and how you designed the chip. Logic '0' and '1' cannot be associated to any specific voltage as they are just symbolic for the logic designer. The IC designer successfully converts from logic to gates and chooses suitable representative voltages which depends on process, logic family, interfacing chip, convenience etc.
  11. Apr 6, 2012 #10


    User Avatar

    each logic chip family has its own ranges of voltages for what makes a 0 and what makes a 1. for 5 volt CMOS or TTL, it's something like below 0.5 volts is a 0 and above about 3 volts makes a 1. a receiving circuit has no guarantee how a voltage between those thresholds will be interpreted as.

    one thing, given this definition of 0 and 1, now you need a clock to define during what period of time do we look for the pulse. a pulse happens only during a finite time segment. you can have a pulse during one segment and it's still a zero in another time segment.
  12. Apr 7, 2012 #11


    User Avatar

    Staff: Mentor

    That is your experience so far, yes. But there is a whole world of exciting digital logic that we can only imagine. For example, the presence of a laser beam could be logic 1, and its absence a logic 0. In explosive environments, where electrical sparks are verboten, the pressure of nitrogen gas against a piston could be logic 1, and its absence a logic 0. Or we could use water pressure, or any other fluid. In the old magnetic core memory of early computers, the presence of clockwise magnetism in a tiny ring of magnetic material indicated logic 1, and counterclockwise magnetism was logic 0.

    The beauty of a truth table is that it is always the same, regardless of the family of logic chosen, thus making the designers job easier.
    That is what you have found with the logic IC's you have used, but there is nothing stopping someone designing an electronic logic where logic I is, say, -50v and a logic 0 is represented by say +180v. You might do this in an electrically noisy environment where heavy machines are operating and causing a lot of electrical interference and inducing voltage spikes on electrical lines that you are trying to use to operate digital controllers. You want your control signals to be much greater than any interfering voltages. Regardless, truth tables, OR gates, flip-flops, and binary counters all follow the truth tables you know.
    Mostly. :smile:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook