Skip to content
View in the app

A better way to browse. Learn more.

Ham Radio Base -Powered By Ham CQ DX

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Solar
SFI 125
SN 85
A 7
K 2 Quiet
X-Ray C1.9
Wind 445.8 km/s
Aurora 2
Updated 00:30 UTC HamQSL · N0NBH
Day 80/40m Fair 30/20m Good 17/15m Good 12/10m Fair
Night 80/40m Good 30/20m Good 17/15m Good 12/10m Poor

Callsign Lookup
_
Vanity Call Signs Available
Enter filters above and click Search.
ⓘ Callsign lookups are in real time via the FCC database. Vanity callsign availability is refreshed daily at 6:00 AM CST. The vanity search may be unavailable for a few minutes during this update.
Live DX spots
Live DX Spots — 70cm via PSKReporter · scroll or pinch to zoom
Band
Mode
Time
Loading map data…
MHz DX Spotter Info
Recent spots
Select a band above to load spots
Ready — select a band to fetch live spots

Logic Gates

Every digital circuit — from the simple frequency counter in your shack to the complex signal processor inside your software defined radio — is built from a handful of basic building blocks called logic gates. A logic gate takes one or more binary inputs and produces a single binary output according to a fixed rule. There are only seven basic types, and once you understand each one, you have the tools to analyze and understand any digital circuit.

Logic gates are not exotic — most of them you already understand intuitively, even if you have never called them gates. An AND gate says "the output is high only if input A AND input B are both high." An OR gate says "the output is high if input A OR input B (or both) is high." An understanding of logic gates transforms digital circuits from black boxes into readable diagrams.

What you will learn: The seven fundamental logic gates (NOT, AND, OR, NAND, NOR, XOR, XNOR), their schematic symbols, truth tables, Boolean algebra notation, why NAND and NOR are called universal gates, and how logic gates appear in ham radio circuits.
Chart showing all seven logic gate symbols with their truth tables side by side: NOT, AND, OR, NAND, NOR, XOR, XNOR

The seven fundamental logic gates, their ANSI/IEEE symbols, and truth tables. Mastering these builds the foundation for all digital electronics.

View Larger

What Is a Logic Gate

A logic gate is an electronic circuit that implements a Boolean function. Its inputs and outputs are digital signals — each signal is either LOW (logic 0, typically near 0 V) or HIGH (logic 1, typically near 3.3 V or 5 V depending on the logic family). The gate examines its inputs and produces an output according to a fixed rule, regardless of what happened previously. This is unlike a flip-flop (covered in lesson M18E), which has memory — a gate has no memory at all. Change the inputs and the output changes instantly.

Physically, logic gates are built from transistors. A CMOS NAND gate, for example, contains four MOSFETs arranged so that the output is pulled low only when both inputs are simultaneously high. Modern digital ICs pack millions or billions of gates onto a single chip. But the behavior of any gate is completely described by its truth table — the list of every possible input combination and the corresponding output.

NOT Gate (Inverter)

The NOT gate is the simplest gate. It has one input and one output. The output is always the opposite of the input: if the input is LOW, the output is HIGH, and if the input is HIGH, the output is LOW. In Boolean algebra the NOT operation is written as Ā (A-bar), or sometimes ¬A or A'.

Input AOutput Q = Ā
01
10

The NOT gate schematic symbol is a triangle pointing right with a small circle (bubble) at the output. The bubble is the key symbol in digital logic — wherever you see a bubble on any gate, that signal is inverted at that point. NOT gates are also called inverters.

In a practical circuit, a NOT gate can be used to ensure that a control signal is active-low (a common convention). If a chip reset pin requires a LOW to reset, but your microcontroller outputs a HIGH to initiate a reset, a NOT gate in between inverts the signal correctly.

AND Gate

An AND gate has two or more inputs and one output. The output is HIGH only when ALL inputs are simultaneously HIGH. The name is the rule: A AND B must both be HIGH for the output to be HIGH. In Boolean algebra AND is written as A · B, or simply AB.

Input AInput BOutput Q = A·B
000
010
100
111

Think of an AND gate as a series circuit with two switches: current flows only when switch A AND switch B are both closed. Any single input being LOW forces the output LOW, regardless of the other inputs. The AND gate is used for enabling or gating signals — the output only passes through when an enable input is HIGH.

OR Gate

An OR gate produces a HIGH output when ANY input is HIGH. The output is LOW only when all inputs are simultaneously LOW. In Boolean algebra OR is written as A + B (using the plus sign, not addition).

Input AInput BOutput Q = A+B
000
011
101
111

Think of an OR gate as a parallel circuit with two switches: current flows if either switch A OR switch B (or both) is closed. The OR gate is used for combining signals — if any of several condition inputs becomes true, the output indicates a condition has occurred.

NAND Gate — The Universal Gate

The NAND gate is an AND gate followed by a NOT gate. Its output is LOW only when ALL inputs are HIGH — in every other case the output is HIGH. The name NAND is a contraction of "NOT AND." In Boolean algebra the NAND output is written as AB̄ (the whole AND expression negated) or equivalently ¬(A · B).

Input AInput BOutput Q = AB
001
011
101
110

The NAND gate's schematic symbol is the AND symbol with a bubble at the output. NAND is called a universal gate because every other logic gate can be built from NAND gates alone. A single NAND gate with both inputs tied together is a NOT gate (since if A=B the NAND output is Ā). Two NAND gates in series (the second one with inputs tied) implement an AND. Arrange NAND gates appropriately and you can build OR, NOR, and XOR functions too. This is why early computers were often built from nothing but NAND gates — one gate type is easier to manufacture in large quantities.

NOR Gate — Also Universal

The NOR gate is an OR gate followed by a NOT gate. Its output is HIGH only when ALL inputs are LOW — in every other case the output is LOW. NOR stands for "NOT OR." In Boolean algebra the output is written as A+B.

Input AInput BOutput Q = A+B
001
010
100
110

Like NAND, NOR is also a universal gate — any logic function can be implemented using NOR gates only. NOR gates with tied inputs also implement NOT (since A+A = Ā). A NOR gate is often used to detect a zero state — its output is HIGH only when no inputs are active, which is useful for interrupt logic and bus arbitration circuits.

XOR Gate

The XOR (exclusive OR) gate outputs HIGH when its inputs are different. If both inputs are the same (both 0 or both 1), the output is LOW. The XOR operation is written A ⊕ B. XOR is sometimes described as "one but not both" or "odd number of 1s."

Input AInput BOutput Q = A⊕B
000
011
101
110

XOR has many practical applications. In binary addition, the XOR gate computes the sum bit of two inputs (the carry is computed by an AND gate). XOR is also used for error detection (parity checking) and data encryption. For radio applications, XOR gates appear in BPSK and DBPSK demodulators, where XOR compares the current data bit with the previous one to detect transitions.

XNOR Gate

The XNOR (exclusive NOR) gate is the inverse of XOR. It outputs HIGH when both inputs are the same (both 0 or both 1), and LOW when they differ. XNOR is written as A⊕B or sometimes A ⊙ B.

Input AInput BOutput Q
001
010
100
111

XNOR is used as an equality comparator — its output is HIGH when inputs match. This is useful in phase-locked loops (PLLs), where an XNOR phase detector compares the phase of the input signal with the VCO output and outputs a HIGH signal proportional to how well they agree.

Gate Summary Table

GateOutput is HIGH when…Boolean notationKey use
NOTInput is LOWĀSignal inversion
ANDALL inputs are HIGHA·BEnable/gating
ORANY input is HIGHA+BCombining signals
NANDNOT all inputs are HIGH (universal)ABUniversal building block
NORALL inputs are LOW (universal)A+BZero detector, universal
XORInputs are DIFFERENTA⊕BParity, binary sum bit
XNORInputs are the SAMEA⊕BEquality comparator, PLL phase detector

Boolean Algebra Basics

Boolean algebra is the mathematical system that describes logic operations. It uses three main operations — AND (multiplication), OR (addition), and NOT (complement) — and a set of axioms that are almost always simpler than ordinary algebra.

Key Boolean identities:
  • A + 0 = A (OR with 0 leaves A unchanged)
  • A · 1 = A (AND with 1 leaves A unchanged)
  • A + 1 = 1 (OR with 1 always gives 1)
  • A · 0 = 0 (AND with 0 always gives 0)
  • A + A = A (idempotent law)
  • A · A = A (idempotent law)
  • A + Ā = 1 (complement law)
  • A · Ā = 0 (complement law)
  • Ā̄ = A (double negation)

De Morgan's Theorems

De Morgan's theorems are among the most useful tools in digital design. They let you convert between AND and OR forms, which is essential for simplifying logic circuits and for understanding why NAND and NOR are universal.

De Morgan's Theorems:
  • First theorem: A·B = Ā + B̄ — "NAND equals NOT-A OR NOT-B"
  • Second theorem: A+B = Ā · B̄ — "NOR equals NOT-A AND NOT-B"

In words: to negate an AND, change it to OR and negate each term (and vice versa). The inversion "moves through" the operator and flips AND to OR or OR to AND.

Example: Apply De Morgan to simplify

You have the expression Ā + B̄. Apply De Morgan to the outer inversion:

Ā + B̄ = Ā · = A · B

So inverting an OR of two inverted signals gives the AND of the original signals. This means a NOR gate with inverted inputs is equivalent to an AND gate.

CMOS and TTL Logic Families

Logic gates are manufactured in different technology families that determine their voltage levels, speed, power consumption, and noise immunity. The two families you will encounter in ham radio work are CMOS and TTL.

TTL (Transistor-Transistor Logic) was the dominant logic family from the 1970s through the 1990s. The 74xx series (7400, 7408, 7486, etc.) is TTL. TTL uses 5 V power, defines logic LOW as 0 to 0.8 V and logic HIGH as 2.0 to 5 V. TTL is fast and robust. Many older transceivers use 5 V TTL for internal control signals, and the 74xx parts are still in production and cheap.

CMOS (Complementary Metal-Oxide-Semiconductor) uses far less power than TTL because CMOS transistors draw current mainly during switching, not continuously. The 4000-series CMOS parts (4001, 4011, 4070, etc.) can run from 3 V to 18 V, making them very flexible. Modern "74HC" (High-speed CMOS) parts combine CMOS power efficiency with TTL-compatible speeds and pin assignments, running at 3.3 V or 5 V. Most modern microcontrollers use 3.3 V CMOS logic.

Voltage compatibility warning: Never connect a 5 V TTL output directly to a 3.3 V CMOS input without a level-shifting circuit. The 5 V HIGH signal will exceed the maximum input voltage of the 3.3 V device and can destroy it. Level shifters or series resistors are required when interfacing different logic families.

Logic Gates in Ham Radio

Frequency display and band decoding. In older transceivers, logic gates decode the BCD (binary-coded decimal) output of the synthesizer to drive seven-segment frequency displays. AND gates check which band is selected; OR gates combine band signals to drive specific relay outputs. You will find 74LS00 (quad NAND) and 74LS86 (quad XOR) ICs throughout service schematics of HF radios from the 1980s and 1990s.

CW keyer logic. Electronic CW keyers use flip-flops and gates to implement iambic keying: XOR gates compare the paddle states to determine which element to send next; AND gates gate the sidetone and transmitter keying signals.

Digital modes. PSK31 modulators and demodulators use XOR gates to implement DBPSK differential encoding. The current bit is XORed with the previous bit to produce the encoded output — if the bits differ, a phase reversal occurs; if they match, no reversal. The demodulator XORs consecutive samples to recover the original data.

Relay control and protection. PTT control circuits in transceivers use AND gates to ensure that transmit is only enabled when all conditions are met: power supply voltage is OK AND the transceiver is not already in receive mode AND the operating temperature is within limits AND the SWR is not too high. Any condition going LOW forces the AND output LOW and inhibits transmission.

Experiment: Explore a 74HC00 NAND Gate IC

The 74HC00 is a quad 2-input NAND gate — it contains four independent NAND gates in a 14-pin DIP package and costs less than $1. This experiment lets you verify the NAND truth table and build both a NOT gate and an AND gate from a single NAND chip.

Parts needed:
  • 74HC00 quad NAND gate IC (DIP-14)
  • Breadboard
  • 5 V power supply (or USB power bank with 5 V output)
  • 2 × momentary pushbuttons
  • LED with 470 Ω resistor
  • 2 × 10 kΩ pull-down resistors
  • Jumper wires
  1. Place the 74HC00 in the breadboard. Pin 14 is VCC (5 V), pin 7 is GND. Connect power and ground.
  2. Use one NAND gate (pins 1, 2 = inputs; pin 3 = output). Connect a 10 kΩ resistor from each input to GND (pull-down to default LOW). Connect each input also to a pushbutton that connects to VCC (5 V) when pressed.
  3. Connect the output (pin 3) through a 470 Ω resistor to an LED, then to GND.
  4. Test the NAND truth table: no buttons pressed (0,0) → LED ON; button A only (1,0) → LED ON; button B only (0,1) → LED ON; both pressed (1,1) → LED OFF. This matches the NAND truth table exactly.
  5. Now build a NOT gate: use a second NAND gate on the same chip. Tie both inputs together (pins 4 and 5 connected). Connect a pushbutton to both tied inputs. Connect the output (pin 6) to a second LED via 470 Ω. Now pressing the button (input = 1) should turn the LED off (output = 0), and releasing it (input = 0) should turn it on (output = 1). The NAND-with-tied-inputs is a NOT gate.
What you should see: The NAND gate turns the LED off only when BOTH buttons are pressed simultaneously — matching the truth table exactly. The NOT gate (tied-input NAND) inverts the single button input: LED on when button released, off when pressed. You have just verified that NAND is a universal gate by building both NAND and NOT functions from the same IC.

Frequently Asked Questions

Why are NAND and NOR called universal gates?

Because any logic function can be built using only NAND gates (or only NOR gates). You can make a NOT by tying both inputs together. You can make AND by following a NAND with a NOT (another tied-input NAND). You can make OR using three NAND gates via De Morgan's theorem. Because only one gate type is needed, manufacturing is simpler and cheaper when a chip contains only NAND or only NOR gates throughout.

What does the bubble on a gate symbol mean?

A small circle (bubble) at a gate input or output means that signal is inverted at that point. A NOT gate is just a buffer with a bubble on its output. A NAND gate is an AND gate with a bubble on its output. A NOR gate is an OR gate with a bubble. If you see a bubble on an input of a gate, it means that input is active-low — the gate responds to a LOW on that input as if it were a HIGH.

Can I mix CMOS and TTL gates in the same circuit?

Sometimes, but carefully. "74HC" (high-speed CMOS) parts running at 5 V are generally compatible with 5 V TTL logic levels at their inputs. However, 3.3 V CMOS parts cannot tolerate 5 V inputs. If you are mixing a 5 V TTL source with a 3.3 V CMOS input, use a level-shifting buffer or a resistive voltage divider. Many modern Arduino projects run into problems mixing 5 V Arduino outputs with 3.3 V sensors or modules — the solution is always a level shifter.

Is there any difference between AND and multiplication in Boolean algebra?

In Boolean algebra, AND behaves like multiplication in one key way: A · 0 = 0 always, just as in ordinary multiplication. And A · 1 = A, as expected. But Boolean addition (OR) is different from ordinary addition: 1 + 1 = 1 in Boolean algebra (not 2). This is the key distinction: Boolean numbers are never greater than 1, and the OR operation is not the same as arithmetic addition.

Test Your Knowledge

Answer the questions below to check your understanding. Every answer can be found in the lesson above.

Loading questions...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.