Skip to content

Activity 2.4.1 — Date of Birth 7-Segment Display Design


Learning Objectives

By the end of this lesson, students will be able to:

  1. Create a truth table mapping 4-bit BCD inputs to seven-segment display outputs
  2. Simplify segment logic expressions using Karnaugh maps (K-maps)
  3. Design and implement a combinational logic circuit using AOI or NAND gates
  4. Build and test a working 7-segment display driver circuit on a breadboard

Vocabulary

Vocabulary (click to expand)
Term Definition
BCD (Binary Coded Decimal) A binary encoding where each decimal digit (0-9) is represented by its 4-bit binary equivalent
Seven-Segment Display A display device with 7 LED segments (a-g) that can form digits 0-9
Common Anode A 7-segment display where all LED anodes are tied together to VCC; segments light when driven LOW
Common Cathode A 7-segment display where all LED cathodes are tied together to GND; segments light when driven HIGH
Decoder A circuit that converts binary information from n inputs to 2^n outputs
Karnaugh Map (K-map) A graphical method for simplifying Boolean algebra expressions

Part 1: Introduction to 7-Segment Displays

A seven-segment display consists of seven LEDs arranged in a figure-8 pattern. Each segment (labeled a through g) can be individually illuminated to display digits 0-9.

Segment Arrangement

  a
f   b
  g
e   c
  d

Digit Patterns: - To display "0": segments a, b, c, d, e, f light up (g is OFF) - To display "1": segments b, c light up - To display "2": segments a, b, d, e, g light up - And so on...

Common Anode vs Common Cathode

There are two types of seven-segment displays:

Type Connection How to Light a Segment
Common Anode All anodes connected to VCC Drive segment pin LOW (0)
Common Cathode All cathodes connected to GND Drive segment pin HIGH (1)

Key insight: When designing logic circuits, we typically design for common cathode displays (logic 1 = ON). If using a common anode display, simply invert your output logic.


Part 2: Creating the Truth Table

For this project, you will design a circuit that displays your birth month (01-12) on a seven-segment display. Since months are represented as two digits (01-09 for January-September, 10-12 for October-December), we will start with a single digit display.

Input: 4-bit BCD Code

Decimal BCD Input (D C B A)
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
10-15 Invalid (not used for BCD)

Output: Segment Controls

For each digit (0-9), determine which segments (a-g) are ON (1) or OFF (0):

Digit a b c d e f g
0 1 1 1 1 1 1 0
1 0 1 1 0 0 0 0
2 1 1 0 1 1 0 1
3 1 1 1 1 0 0 1
4 0 1 1 0 0 1 1
5 1 0 1 1 0 1 1
6 1 0 1 1 1 1 1
7 1 1 1 0 0 0 0
8 1 1 1 1 1 1 1
9 1 1 1 1 0 1 1

Part 3: K-Map Simplification

For each segment (a through g), create a K-map and simplify the Boolean expression.

Example: Segment b

From the truth table, segment b is ON (1) for digits: 0, 1, 2, 3, 4, 7, 8, 9

K-map for segment b (BCD inputs: D, C, B, A):

        AB
        00  01  11  10
DC  00  1   1   1   1    (0, 1, 3, 2)
    01  0   1   1   1    (4, 5, 7, 6)
    11  X   X   X   X    (12-15: don't care)
    10  1   1   1   1    (8, 9, 11, 10)

Grouping the 1s gives us the simplified expression:

Segment b = C + A + B

This means segment b lights up when C=1 OR A=1 OR B=1.

Practice Problem — Simplify Segment a

Using the truth table data above, create a K-map for segment a and simplify the expression.

Show Solution
Segment a ON for digits: 0, 2, 3, 5, 6, 7, 8, 9

K-map grouping reveals:
- Group of 8: covers all rows where D=0 (digits 0-7)
- Group of 4: covers column where A=1 (digits 1,3,5,7,9,11,13,15 - but only 1,3,5,7,9 valid)

Simplified expression:
Segment a = A'C' + AB + AC + B'C

Or further simplified:
Segment a = A + B + C

Part 4: Circuit Implementation Options

You have two approaches to implement your 7-segment driver:

Option A: Use the 7447 Decoder IC

The 7447 is a BCD-to-7-segment decoder/driver designed specifically for this purpose.

Advantages: - Simpler design (no K-maps needed) - Built-in current limiting - Works with common anode displays

Disadvantages: - Limited to BCD input (0-9) - Pre-built solution (less learning)

Option B: Build Custom Decoder from Gates

Advantages: - Full design experience - Can handle any encoding scheme - Demonstrates combinational logic skills

Disadvantages: - More complex - Requires more components

Key insight: For this capstone project, Option B is recommended to demonstrate your combinational logic design skills. However, you may use the 7447 to verify your design.


Part 5: Building Your Circuit

Components Needed

Component Quantity Purpose
Breadboard 1 Circuit assembly
7-segment display (common cathode) 1 Output display
7400 (Quad 2-input NAND) 2-3 Logic gates
7402 (Quad 2-input NOR) 1-2 Logic gates
7432 (Quad 2-input OR) 2 Logic gates
7408 (Quad 2-input AND) 2 Logic gates
7404 (Hex Inverter) 1 Logic gates
Jumper wires As needed Connections
330 ohm resistor 7 Current limiting for segments
Switches (SPST) 4 BCD input (D, C, B, A)
LED 1 Power indicator

Implementation Steps

  1. Power the breadboard: Connect +5V and GND to power rails
  2. Wire the switches: Connect 4 switches to represent BCD inputs D, C, B, A
  3. Implement segment logic: Using your simplified expressions, wire each segment output
  4. Add current limiting: Connect 330 ohm resistors in series with each segment
  5. Connect the display: Wire segments a-g to your logic outputs
  6. Test each digit: Verify all digits 0-9 display correctly

Practice Problem — Birth Month Display

Your birthday is: ____ (month number 01-12)

For your birth month: 1. What BCD input represents your month? 2. Which segments will be ON? 3. What is the simplified expression for each segment?

Show Solution
Example: If birth month is March (03)

1. BCD Input: 0011 (A=1, B=1, C=0, D=0)
2. Segments ON: a, b, c, d
3. Using simplified expressions:
   - Segment a = A + B + C
   - Segment b = C + A + B
   - Segment c = A' + B' + C
   - Segment d = A'B + AC + A'C'
   (actual expressions depend on your K-map simplification)

Part 6: Extension — Two-Digit Display

To display two digits (for months 10-12), you need:

  1. Two 7-segment displays (tens and ones)
  2. Additional logic to:
  3. Detect invalid BCD (10-15) and blank display
  4. Select which digit is active for months 10-12

Two-Digit Logic Design

For months 10-12: - Month 10: Display "1" on tens, "0" on ones - Month 11: Display "1" on tens, "1" on ones
- Month 12: Display "1" on tens, "2" on ones

Design a selector circuit that: - Shows blank for invalid inputs (13-15) - Shows "0X" for months 1-9 (tens digit = 0) - Shows "1X" for months 10-12 (tens digit = 1)


Summary

Key takeaways from this lesson:

  1. Seven-segment displays require understanding of segment patterns for each digit
  2. BCD encoding provides a direct mapping from decimal to binary
  3. K-maps simplify complex Boolean expressions into manageable gate implementations
  4. Two implementation approaches exist: using a decoder IC or building custom logic
  5. Current limiting with resistors protects LEDs from damage

Key Reminders

  • Always include current-limiting resistors (330 ohm) for each segment
  • Double-check your K-map groupings before implementing
  • Test each digit systematically (0-9) rather than random testing
  • Document your simplified expressions for each segment
  • Remember that common anode displays require inverted logic

📝 Assessment Criteria

Criteria Points
Complete and accurate truth table /20
Correct K-map simplifications /25
Properly simplified expressions /20
Working breadboard circuit /25
Clear documentation /10
Total /100

Custom activity — adapted from PLTW Digital Electronics