Most Basic Doubt Of Digital Electronics!!!

how do we give a digital 1 or 0 to a wire..(does giving a wire 5v makes it digitally 1 and giving 0v makes it digitally 0??)
suppose i have four input wires connected to a microcontroller giving following inputs:
1st wire : 5volt
2nd wire : 0 volt
3rd wire : 3 volt
4th wire : -3 volts
are these inputs analog or digital??
if they are analog then how do we give a digital input??
if they are digital inputs then which of them would be 1 and which would be zero??
please do not ignore my question thinking it to be too basic!!! i have searched from winki..to google to get my answer but couldnt get it...
thanks!!!

Replies

  • xheavenlyx
    xheavenlyx
    Wow, your question is very understandable and I get it that you are thinking this is a dumb question. To most electronic engineers this is a very very bascic Q, BUT our shit education does not teach us these important basics 😀 So dont worry, its good to ask basics if we want to learn!

    Digital Signal

    Generally speaking digital or analog signal depends where you are giving 5 Volts or 3V or 0V.

    If you give 5 Volts to microcontroller then its Digital 1. If 0 volts then 0.

    You can rmember like this:
    if 5volt then 1 (it is on)
    if no volt then 0 (it is off)

    But its not exact sometimes, it can be: (0 to 1.2 Volts) as 0. and (4.0 to 5 Volts) as 1 for a microcontroller.
    Some microcontrollers can accept 3.3V as 1 and 0Volts as 0. These are all digital signals because you are giving it to a "digital device".

    Analog Signal

    BUT if you give the same 5 volts to a circuit which has a resistor and a bulb it is considered analog signal. Well, we dont say "Analog signal" usually, just voltage.

    Another important thing. Digital circuits is just a collection of many analog devices like capacitors, transistors, resistors and inductors. The same analog stuff we learn in 9th grade. Thats all. Only thing is there are millionns of them in a digital circuit connected together to accept just two signal "modes" ON(5V) or OFF(0V). And diferent digital circuits can accept different voltages a 1 and 0.

    Visit this link and keep reaaading 😀 Have fun!

    Digital Circuit
  • mahul
    mahul
    Here's my take

    No energy is analog or digital, its a device that is analog or digital.

    An analog device accepts the voltage value as it is, while a digital device makes some decision about the signal.

    A digital device can only work with a fixed set of values. For example a microcontroller( and most other devices ) works with just two values, 0 and 1. So whatever voltage is supplied, it compares the voltage with a reference. If the value is higher than the reference, it considers it as 1, else 0. Now your q would be easy to answer. If you consider say, 2.5 volts as the reference, 3 and 5 V is '1' and 0 and -3 is '0'. The choice of the reference depends entirely on the designer.

    CEans, please point out errors if any.
  • tech_vaibhav_ee
    tech_vaibhav_ee
    thanks for your replies!!!
    @mahul..you seems to be wrong on just one point here(i asked this question on other forums also, so i am very much clear of the answer... .)

    its true that a microcontroller gives digital 1 or 0 for certain input voltages but these these limits are defined by the hardware itself and not by the user...generally a microcontroller gives a digital 0 for 0v-1v and digital 1 for 3v-5v(these are approximate values which changes from hardware to hardware)...if the input voltage is outside these limits then it may even damage the microcontroller...
  • mahul
    mahul
    You got me wrong vaibhav. When i said "designer", I meant the hardware designer, not the user who would execute his software code. It's because of the designers choice that the voltage values differ from microcontroller to microcontroller.
  • tech_vaibhav_ee
    tech_vaibhav_ee
    sorry for the misunderstanding...neways ..thanks for the reply...
  • mahul
    mahul
    Oh ur welcome 😛
  • elric
    elric
    Just another point, A digital system operates with inputs whose value can take either 1 or 0. The voltage values that is set as 0v to 1v for digital 0 and 3v to 5v for digital 1 is called as TTL or Transistor-Transistor Logic values. For example, You could design a digital system that would accept a analog voltage range of say, 0v to 5v for digital 0 and 7v to 12v for digital 1.
    There are different logic levels like TTL, say for example the RS-232 standard specifies the voltage levels as plus or minus 3v to 15v, so check the datasheet of the digital IC you will be using 😛
  • jamesroker
    jamesroker
    tech_vaibhav_ee
    how do we give a digital 1 or 0 to a wire..(does giving a wire 5v makes it digitally 1 and giving 0v makes it digitally 0??)
    suppose i have four input wires connected to a microcontroller giving following inputs:
    1st wire : 5volt
    2nd wire : 0 volt
    3rd wire : 3 volt
    4th wire : -3 volts
    are these inputs analog or digital??
    if they are analog then how do we give a digital input??
    if they are digital inputs then which of them would be 1 and which would be zero??
    please do not ignore my question thinking it to be too basic!!! i have searched from winki..to google to get my answer but couldnt get it...
    thanks!!!
    very bad idea
  • vissin
    vissin
    Quite unfortunately, there are many engineers who don't understand what their respective engineering field is all about. So Vaibhav, it is good of you to ask such a basic question (a question that most electronics engineers will answer incorectly)

    You've had some answers here and so I will try not to repeat anything unnecessarily in my reply.

    We devide signals in many ways. Analog (periodic & non-periodic) and Digital being two of our concern in this discussion. The difference between these two is that while Analog is continuous, Digital is not so. Digital signals instead identifies a 'quantum' which is the smallest change in signal that can be recognized.

    Analog voltage, for an instance can take any value eg 1V, 1.45V, 3.268V... etc. All these values are acceptable subject to what level of accuracy you desire. A digital signal, on the other hand, with a quantumm of 1V can only take such values as 1V, 2V, 3V...etc. A value like 1.5V is not legal. It will be taken as 1V (or 2V depending on logic).

    The above is a generic understanding of Digital and Analog. There are many further classification in the two. When you speak of '1' and '0' you're talking of "Binary Logic Digital Signal". In this only two logic levels of the signal are accepted, '1' and '0' which may represent 'true' and 'false' or 'on' and 'off'.

    What analog value of the actual signal is taken as '1' and what is taken as '0' depends on the logic standard that being used. The most popular one (historically) being TTL logic. A newer one would be CMOS logic. You may search about these on google and study them. Pay attention to noise margin and other such concepts.

    To answer your following question:
    '
    are these inputs analog or digital??
    if they are analog then how do we give a digital input??'

    All natural signals are analog in nature. Digital signals don't exist on it's own. When you say 5V you're naming an analog value. Understand also that this 5V is not an absolute value. It's a differential value (5V with respect to a certain potential level accepted to be 0V). What you accept as logic '1' and what as logic '0' will be clear to you when you read about TTL and CMOS logics.
  • docel
    docel
    Hello Guys!
    1. Logic levels are comparative and are system specific. Meaning, the Hi (1) and Lo (0) states are Voltage , current or Charge levels representing presence or absence of the specific units.

    2. The present day technology is fast approaching 2V maximum levels , due to the evolution of low voltage battery systems.
    At present, the Mobile phones operate at a power voltage around 3.6V cells. This would mean that the Logic voltage must swing between 0v - 3.6v. In reality, the Max voltage will be slightly less than the supply voltage.

    3. The TTL levels of 5V have almost disappeared from serious personal/mobile gadgets.

    The levels are summarised in this document: #-Link-Snipped-#
  • sauravgoswami
    sauravgoswami
    Hello Guinesses!!....A voltage is a voltage,it depends on the circuit how it takes,a digital device will take it as you design it and do accordingly,similar for Analog circuits too....The new devices in market follow low-consumption,high-performance principle which is need of the hour.Its upto the Application,wat u want to do!!!

You are reading an archived discussion.

Related Posts

Why do we use multiples of11 as voltage in transmission lines😕😕
Hello, I study in Electrical & Computer Engineering school of National Technical University of Athens. I would be pleased if anyone shared the ebook Nonlinear Systems, (Third Edition), Hassan K....
Hi there, Since it is known generally that having many input for a simple CMOS gate is not the best way to go, since this will mean many transistors will...
Having covered the basics of stock markets and short selling, lets try to focus on something that is a bit more complex. Let’s move into the derivatives segment of the...
i am new to electronics ... at present i am reading about various electronic devices and how do they work...i have some doubts over the application of a transistor amplifier(common...