Sub topic 12
Binary Signals and Logic Levels
This chapter introduces the digital signals that logic gates work on. It covers analog and digital signals, logic levels, and how a real voltage becomes a 0 or a 1. It stops before the gates themselves. Those come in the next chapter.
Prerequisites assumed: Ohm's law, the idea of potential difference, a basic picture of AC and DC, and how to read a voltage-time graph. You also need the diode idea from earlier chapters: a diode can switch current on or off depending on bias.
Analog and digital signals
A signal is a quantity, usually a voltage or a current, that carries information and changes with time.
- An analog signal can take any value in a continuous range. A microphone output is analog. Its voltage rises and falls smoothly as sound pressure changes.
- A digital signal takes only a few separate values. In binary logic it takes exactly two.
The two values are called logic levels. They are written as 0 and 1. They can also be called LOW and HIGH, OFF and ON, or false and true.
| Feature | Analog signal | Digital signal |
|---|---|---|
| Possible values | Any value in a range | Two distinct levels |
| Graph shape | Smooth curve | Flat steps with sharp jumps |
| Effect of small noise | Changes the information | Usually ignored |
| Typical example | Sine wave from an AC source | Output of a gate |
Digital signals resist noise because a small disturbance does not move a HIGH voltage far enough to look LOW. A circuit only has to decide which of the two levels it is closer to.
What a bit is
A bit (binary digit) is one binary value, either 0 or 1. One bit is the smallest amount of information. Several bits together describe larger things. Two bits give four combinations (00, 01, 10, 11). In general, n bits give 2ⁿ combinations.
This count matters for the next chapters. A gate with two inputs has two bits of input, so its truth table has 2² = 4 rows. A gate with three inputs has 2³ = 8 rows.
Logic levels as voltages
Hardware does not store the symbols 0 and 1. It uses voltages. A common convention, called positive logic, assigns:
- HIGH (logic 1) to the higher voltage, for example +5 V
- LOW (logic 0) to the lower voltage, for example 0 V
In negative logic the assignment is reversed. NEET problems almost always use positive logic, so assume it unless the question says otherwise.
Voltage ranges, not exact values
A real circuit never produces exactly 5.000 V or 0.000 V. Wires have resistance, supplies drift, and noise adds small voltages. So a digital input accepts a range for each level. The gap between the two ranges is a forbidden zone where the input is not guaranteed to be read correctly.
The ranges depend on the logic family. For a typical 5 V TTL (transistor-transistor logic) input:
| Quantity | Meaning | Typical value |
|---|---|---|
| V_IL(max) | Highest voltage still read as LOW | 0.8 V |
| V_IH(min) | Lowest voltage read as HIGH | 2.0 V |
| V_OL(max) | Highest voltage a gate outputs when LOW | 0.4 V |
| V_OH(min) | Lowest voltage a gate outputs when HIGH | 2.4 V |
Notice that the output limits are stricter than the input limits. A gate outputs LOW at most 0.4 V, but its input accepts LOW up to 0.8 V. The 0.4 V difference is the noise margin. It is the amount of unwanted voltage that can be added to a signal on its way between gates before the next gate misreads it.
For the table above:
- Noise margin for HIGH = VOH(min) − VIH(min) = 2.4 − 2.0 = 0.4 V
- Noise margin for LOW = VIL(max) − VOL(max) = 0.8 − 0.4 = 0.4 V
NEET does not test these numbers, but the idea explains why digital circuits are reliable.
Converting a voltage to a bit
A short program shows the decision a digital input makes. This one uses the TTL thresholds from the table.
V_IL_MAX = 0.8 # volts, highest voltage read as LOW
V_IH_MIN = 2.0 # volts, lowest voltage read as HIGH
def read_level(voltage):
if voltage <= V_IL_MAX:
return 0
if voltage >= V_IH_MIN:
return 1
return None # undefined zone
for v in (0.0, 0.5, 1.4, 2.6, 5.0):
print(f"{v:.1f} V ->", read_level(v))The output is:
0.0 V -> 0
0.5 V -> 0
1.4 V -> None
2.6 V -> 1
5.0 V -> 1The input 1.4 V falls in the undefined zone, so the function returns None. A real gate in this region may output either level, or an unstable value.
Switches and diodes as binary elements
Any device with two clear states can carry a binary signal. A mechanical switch is open (no current) or closed (current). The semiconductor devices from earlier chapters behave in a similar way:
- A p-n junction diode in forward bias conducts once the applied voltage passes the knee voltage. In reverse bias it blocks, apart from a tiny leakage current.
- The transistor, used inside real gates, is driven between cut-off (OFF) and saturation (ON).
This is why semiconductors suit digital electronics. A diode can be modelled as a switch that is ON when forward biased and OFF when reverse biased. Real gates use many such switches wired together.
A single diode with a resistor already acts as a crude gate. Suppose two inputs A and B each connect through a diode to a common output, and the output is pulled to ground through a resistor. If either input is HIGH, its diode conducts and the output goes HIGH (apart from a drop of about 0.7 V across a silicon diode). If both inputs are LOW, no diode conducts and the output stays LOW. The circuit gives HIGH when A or B is HIGH, which is the OR behavior covered in the next chapter.
Pulses and timing
A digital signal changes level over time. A graph of a digital signal versus time is a waveform. Two terms from such graphs are useful:
- A rising edge is the jump from LOW to HIGH.
- A falling edge is the jump from HIGH to LOW.
NEET questions often give input waveforms for A and B and ask for the output waveform. The method is to split the time axis into intervals where both inputs are constant, find the output for each interval, and join the results. You will use this method once you know the gate rules.
Common errors
- Reading 0 as "no voltage at all". A LOW is a range near 0 V. A signal of 0.3 V is still logic 0.
- Mixing up positive and negative logic. If a question says the lower voltage represents 1, the truth table of the same hardware changes. Read the convention first.
- Treating the forbidden zone as a third level. It is not a valid logic value. It is a region the designer must avoid.
- Confusing a digital signal with AC. A digital waveform stays at one polarity, for example 0 V and 5 V. It is not a sine wave and it does not reverse direction.
- Counting rows wrongly. Two inputs give 4 rows, not 2 or 8. The count is 2 raised to the number of inputs.
Summary of key ideas
- Analog signals vary continuously. Digital signals use two levels.
- A bit is one binary digit. n bits give 2ⁿ combinations, which sets the number of rows in a truth table.
- In positive logic, HIGH is 1 and LOW is 0. Each level is a voltage range, with an undefined zone between them.
- The noise margin is the safety gap that lets digital circuits ignore small disturbances.
- Diodes and transistors work as switches, so semiconductor devices can build gates.
Exercise
A gate in a 5 V logic family has VIL(max) = 0.8 V and VIH(min) = 2.0 V. State the logic level read at each of these input voltages: 0.4 V, 1.5 V, 3.3 V. Then state how many rows the truth table of a three-input gate has.
Show answer
0.4 V is below 0.8 V, so it is read as logic 0 (LOW). 1.5 V lies between 0.8 V and 2.0 V, so it is in the undefined zone and is not a valid logic level. 3.3 V is above 2.0 V, so it is read as logic 1 (HIGH). A three-input gate has 2³ = 8 input combinations, so its truth table has 8 rows.
Exercise
A gate outputs a minimum of 2.4 V for HIGH and the next gate needs at least 2.0 V to read HIGH. What is the noise margin for the HIGH level, and what does it mean in practice?
Show answer
Noise margin = 2.4 V − 2.0 V = 0.4 V. Up to 0.4 V of unwanted voltage can subtract from the HIGH signal on its way to the next gate, and that gate will still read it as HIGH.