EAZYLife STEM LAB · MODULE 23

Integrated Circuits and Logic Gates

Discover how tiny integrated circuits make decisions with electrical signals. Learn logic levels, read truth tables, explore the basic gates and build a real two-input logic circuit.

Free open lessonDigital electronicsPractical logic build
INPUT · DECIDE · OUTPUT
01 · WHAT IS AN INTEGRATED CIRCUIT?

Many electronic components, one small package

An integrated circuit (IC) is a complete electronic circuit manufactured on a small semiconductor die. Depending on its purpose, it may contain transistors, resistors, diodes and other structures connected to perform a defined function. A logic IC contains digital circuits that process HIGH and LOW signal states.

Inside an IC package

Silicon diecircuit structuresProtective packageBond wiresExternal leadsConceptual cross-section, not to scale

The package protects a silicon die and connects its tiny internal structures to pins that can be soldered or inserted into a circuit.

Common IC families

  • Logic ICs: perform Boolean operations such as AND, OR and NOT.
  • Timer ICs: generate delays, pulses and oscillations, such as the 555.
  • Operational amplifiers: amplify or compare analogue voltages.
  • Voltage regulators: maintain a specified output voltage.
  • Microcontrollers: execute firmware and control peripherals.

Different ICs may look similar. Identify the exact part number and consult its datasheet before wiring it.

Important distinction: an IC is a physical package containing a circuit. A logic gate is a function that circuit performs. One IC can contain several independent gates.

02 · PACKAGES, PIN NUMBERS AND POWER

Read the package before connecting anything

14-pin DIP package, top view

1234567141312111098ICTOP VIEWPin 1 starts beside the notch; count counter-clockwise

With the notch at the top and the IC viewed from above, pin 1 is at the upper-left. Count down the left side, then continue from the lower-right up the right side.

Power and unused inputs

  • For the 74HC logic family, pin 14 is typically VCC and pin 7 is GND in a 14-pin package. Always verify the exact datasheet.
  • Place a 100 nF ceramic bypass capacitor close between VCC and GND.
  • Do not leave CMOS logic inputs floating. Tie every unused input to a defined HIGH or LOW level.
  • Keep supply voltage and input levels within the exact IC's recommended limits.
  • Never assume that two ICs with similar package shapes share the same pinout.
Logic 1 = HIGH · Logic 0 = LOW

For a 5 V 74HC circuit, a LOW is near 0 V and a HIGH is near the supply voltage. Real input thresholds are specified in the datasheet; they are not a universal fixed voltage.

03 · DIGITAL LOGIC LEVELS

Digital signals represent states

A digital input interprets a voltage range as one of two logic states. It does not require the voltage to be exactly zero or exactly the supply voltage. Noise margins separate guaranteed LOW and HIGH ranges from the uncertain transition region.

Conceptual logic-level bands

LOW regionlogic 0Undefineddo not rely on itHIGH regionlogic 10 VVCCConceptual bands only; use datasheet VIH and VIL limits for the selected IC.

Switch inputs need defined states

+5 VPushbutton10 kΩTo logic inputReleased = LOW · pressed = HIGH

The pull-down resistor holds the input LOW while the button is released. Pressing the button connects it to +5 V.

04 · THE BASIC LOGIC GATES

Each gate follows a simple rule

AND

ABY

Output is HIGH only when both inputs are HIGH.

Y = A · B

OR

ABY

Output is HIGH when at least one input is HIGH.

Y = A + B

NOT (inverter)

AY

Output is the opposite of the input.

Y = NOT A

NAND

ABY

AND followed by inversion. Output is LOW only when both inputs are HIGH.

Y = NOT (A · B)

NOR

ABY

OR followed by inversion. Output is HIGH only when both inputs are LOW.

Y = NOT (A + B)

XOR

ABY

Output is HIGH when the inputs are different.

Y = A ⊕ B

The small circle (bubble) on a gate output means inversion. XOR has an extra curved line at its input side.

05 · TRUTH TABLES

Write down every possible input combination

A truth table lists the output for every possible combination of binary inputs. With two inputs there are four combinations: 00, 01, 10 and 11.

ABANDORNANDNORXOR
0000110
0101101
1001101
1111000

Remember: NOT has one input, so its truth table has two rows: 0 becomes 1, and 1 becomes 0. AND and OR are not arithmetic multiplication and addition of analogue voltages; the symbols describe Boolean logic.

06 · EXPERIMENT WITH A LOGIC GATE

Change the inputs and observe the output

Choose a gate, then switch inputs A and B between LOW (0) and HIGH (1). This is a truth-table teaching model, not an electrical simulation of a particular IC.

INPUT A
INPUT B
OUTPUT Y0 · LOW

AND requires both inputs to be HIGH.

Live truth table

ABY
000
010
100
111

The highlighted row matches the current input switches.

07 · PRACTICAL BUILD

Build a two-input AND gate with a 74HC08

The 74HC08 contains four independent two-input AND gates. We will use the first gate to control an LED. The LED turns on only when both pushbuttons are pressed.

First gate pin connections, 74HC08

1 · 1A2 · 1B3 · 1Y414 · VCC13127 · GND74HC08QUAD ANDInput AInput BOutput Y+5 VGNDSimplified pin map, not a full internal circuit

The 74HC08 DIP-14 pinout follows the standard quad two-input AND arrangement. Confirm the manufacturer's datasheet for your exact part.

Components required

  • 1 × 74HC08 quad AND gate IC, DIP-14.
  • 1 × solderless breadboard and jumper wires.
  • 1 × regulated 5 V extra-low-voltage supply.
  • 2 × normally-open pushbuttons.
  • 2 × 10 kΩ pull-down resistors.
  • 1 × LED and 1 × 1 kΩ series resistor.
  • 1 × 100 nF ceramic bypass capacitor.

Use a current-limited bench supply or a suitable regulated 5 V logic supply. Do not power the circuit from an unknown source.

Wiring diagram: both buttons must be pressed

Button AButton B10 kΩ10 kΩ74HC08pins 1, 2 → 31 kΩLED100 nF+5 V railGND rail+5 VOutput

Conceptual wiring layout. The two input resistors hold their pins LOW when the buttons are released. The bypass capacitor connects directly between IC pins 14 and 7, close to the package. The LED is shown as an output indicator; verify its polarity before power-up.

Connection checklist

  1. With power disconnected, place the 74HC08 across the breadboard centre gap. Identify pin 1 using the package notch.
  2. Connect pin 14 to regulated +5 V and pin 7 to GND. Fit the 100 nF capacitor directly between these supply pins.
  3. Connect one side of Button A to +5 V and the other side to pin 1. Add a 10 kΩ resistor from pin 1 to GND.
  4. Wire Button B in the same way to pin 2, with its own 10 kΩ pull-down resistor.
  5. Connect pin 3 through the 1 kΩ resistor to the LED anode. Connect the LED cathode to GND.
  6. Check the pin numbers, supply polarity, LED direction and absence of shorts. Then apply 5 V with a conservative current limit.

Expected observations

  • Neither button pressed: A=0, B=0, output LOW, LED off.
  • Only A pressed: A=1, B=0, output LOW, LED off.
  • Only B pressed: A=0, B=1, output LOW, LED off.
  • Both buttons pressed: A=1, B=1, output HIGH, LED on.

Measure pin 1, pin 2 and pin 3 relative to GND with a digital multimeter. Compare the readings with the truth table. Voltage values will depend on the supply and the logic family's input/output specifications.

08 · OTHER COMMON LOGIC ICs

One function, several practical IC choices

IC exampleFunctionTypical gatesWhat it does
74HC08AND4 × 2-inputHIGH only when both inputs are HIGH.
74HC32OR4 × 2-inputHIGH when either or both inputs are HIGH.
74HC04NOT6 × inverterReverses each input state.
74HC00NAND4 × 2-inputUniversal gate; can build other logic functions.
74HC02NOR4 × 2-inputUniversal gate; output is inverted OR.
74HC86XOR4 × 2-inputHIGH when inputs differ.

These are common 74HC-family examples, not a guarantee of identical behaviour across all manufacturers or variants. Check supply range, input thresholds, output current and package pinout in the datasheet.

NAND and NOR are universal gates. With suitable connections, either type can be combined to construct NOT, AND, OR and more complex logic functions. This is one reason digital systems can be built from a relatively small set of primitives.

09 · FROM GATES TO LOGIC SYSTEMS

Combine conditions to make decisions

Digital systems often combine several conditions. A machine might run only when the start command is active, the guard is closed and no fault is detected. A simple expression could be:

RUN = START · GUARD · NOT FAULT

Two conditions in series logic

ANDA · BANDAB · CABCRUN

A conceptual logic chain. Real safety interlocks require a risk assessment and appropriately rated hardware; hobby logic ICs alone are not safety controllers.

Where logic gates are used

  • Address decoding and memory selection.
  • Control signals and interlocking logic.
  • Comparators and simple alarm conditions.
  • Arithmetic building blocks and data selection.
  • Timing, counters and digital state machines.
10 · TROUBLESHOOTING AND GOOD PRACTICE

When the output does not match the table

Check the circuit in a safe order

  1. Disconnect power before moving the IC or changing wiring.
  2. Confirm the exact IC part number, package orientation and pinout.
  3. Measure VCC directly at the IC pins and verify common ground.
  4. Check that every input has a defined HIGH or LOW state.
  5. Confirm the switch is wired across the correct breadboard rows.
  6. Check LED polarity and series resistance; do not connect an LED directly to an output.
  7. Inspect for bent pins, loose jumpers and accidental rail breaks.

Design limits to remember

  • Logic outputs are not power supplies. Do not drive motors, relays or high-current loads directly.
  • Use a transistor or suitable driver for external loads.
  • Do not exceed input voltage, output current or supply limits.
  • Never connect a 5 V output directly to a 3.3 V-only input unless compatibility is confirmed.
  • Keep unused CMOS inputs at a defined logic level.
  • Use bypass capacitors close to IC supply pins.
11 · KNOWLEDGE CHECK

Test your understanding

1. When does a two-input AND gate produce a HIGH output?

2. What does the small bubble on a logic symbol usually indicate?

3. Why should unused CMOS logic inputs not be left floating?

4. Which component should be placed close to the IC supply pins?

12 · SAFETY AND NEXT STEPS

Keep digital experiments low-voltage

  • Use only a regulated, current-limited extra-low-voltage supply for this practical.
  • Disconnect power before inserting, removing or rewiring an IC.
  • Check the manufacturer's datasheet for the exact part and package.
  • Do not connect logic outputs to mains circuits, motors or high-current loads.
  • Never use a hobby logic circuit as the sole control for machinery, access control or a life-safety function.

Next, explore how logic gates combine into flip-flops, counters, registers, multiplexers and arithmetic circuits. Those building blocks lead towards digital systems and computer architecture.

KEEP LEARNING · GO FURTHER

Free to learn. More support when you need it.

Explore these open lessons at your own pace. For personalised explanations, project-specific troubleshooting, guided practical training or masterclasses, EazyLife offers paid support tailored to your learning goals.

Free or sponsored lesson referrals may be available through active programmes; they are not guaranteed.

Enquire about guidance