Digital Logic + Counting
Digital Logic
A progressive series of circuits exploring NAND logic, oscillation, decimal counting, binary counting, decoding, and seven-segment display output.
Project
1.4
Logic
NAND
Logic IC
4011
Counters
4017 + 4516
Decoder
4511
Project Context
Project 1.4 was developed as a sequence of six connected circuits. The project begins by using NAND gate logic to make an analog input digital, then develops an oscillator before using the resulting signal for decimal and binary counting, decoding, and display.
References
01
Each stage builds on the previous circuit, progressing from a single NAND gate input to a complete counting circuit with decimal display output.
A
Analog Input
B
NAND Gate Oscillator
C
Decade Counter
D
Binary Up/Down Counter
E
Binary Decimal Decoder
F
Seven Segment Display
02 / Part A
NAND gate logic and a pull-up resistor are used to produce a square-wave signal.
A 10 kΩ fixed resistor and PBNO push button create a pull-up resistor configuration. The input is connected to pin 13 of the 4011 NAND gate IC.
The positive lead of the LED is connected to pin 11, the output pin. At rest both NAND inputs are high and the output is low. When input is applied to the PBNO push button, the current is grounded, both inputs become low, and the output becomes high.
Analog Input Circuit
Circuit Schematic
03 / Part B
Two resistor-capacitor pairs are introduced as timers to create an oscillating output.
For NAND logic, if there is a low on any input lead, the output remains high. Only when both inputs are high does the output become low.
The oscillator uses two resistor-capacitor pairs as timers. The report describes one resistor as controlling the length of the circuit by filling the capacitor, while another controls charging and discharging.
The 4011 IC contains four NAND gates. The chip is powered through pin 14 and connected to ground through pin 7.
NAND Gate Oscillator
4011 IC Diagram
04 / Part C
The oscillator output becomes the clock signal for a 4017 decade counter.
The completed NAND gate oscillator is connected to a 4017 decade counter IC. The 4017 has 16 pins, including 11 output pins, a clock, reset, and disable pin.
When a high clock signal is output from the oscillator, the outputs cycle from 0 through 9 in order. The reset pin can be tied to an output to count to a specific number.
The output pins are connected to LEDs to create a scrolling sequence where each LED lights in order. The speed is controlled by the resistors in the NAND gate oscillator.
4017 Decade Counter
05 / Part D
A 4516 IC extends the counting circuit with binary output and up/down counting.
The next stage uses four 5mm red LEDs and a 4516 IC. The IC has 16 pins, including four outputs, four inputs, a clock, up/down, carry out, and reset.
The four outputs are connected to the LEDs. The up/down pin controls the counting direction, while the carry-out pin is used if multiple chips are connected together.
In this configuration, the 4516 is used as an up/down counter and counts to 16.
4516 Binary Up/Down Counter
06
Decimal
Octal
Hexadecimal
Binary
0
0
0
0000
1
1
1
0001
2
2
2
0010
3
3
3
0011
4
4
4
0100
5
5
5
0101
6
6
6
0110
7
7
7
0111
8
10
8
1000
9
11
9
1001
10
12
A
1010
11
13
B
1011
12
14
C
1100
13
15
D
1101
14
16
E
1110
15
17
F
1111
07 / Part E
The 4511 is introduced to convert the binary input into a decimal output.
The binary outputs are wired to input pins 7, 1, 2, and 6 of the 4511.
The IC also includes a display-test pin. The report identifies this as useful when diagnosing circuit problems because it sets all outputs high and turns on the full display.
4511 Binary Decimal Decoder
08 / Part F
The final stage displays the circuit output in decimal form.
The seven-segment display is the last part of the counting circuit. It gets its name from the seven individually controlled segments used to form decimal numbers.
The display also has a dot in the bottom-right corner and has 10 pins.
09
Part A — Analog Input
Qty.
9V DC Alkaline Battery
1
ACES Power Jack
1
1 kΩ Fixed Resistor
2
10 kΩ Fixed Resistor
2
5mm Blue LED
2
100 µF Capacitors
2
NPN 3904 Transistors
2
Wires
Assorted
Part B — NAND Gate Oscillator
Qty.
9V DC Alkaline Battery
1
ACES Power Jack
1
10 kΩ Fixed Resistor
1
1 MΩ Fixed Resistor
2
470 Ω Fixed Resistor
1
PBNO Push Button
1
5mm Green LED
1
4011 NAND Gate IC
1
PH4148 Diode
1
50V 10 µF Capacitor
1
100 nF Capacitor
1
Wires
Assorted
Part C — Decade Counter
Qty.
9V DC Alkaline Battery
1
ACES Power Jack
1
5mm Green LED
1
5mm Red LED
10
4017 IC
1
Wires
Assorted
Part D — Binary Up/Down Counter
Qty.
9V DC Alkaline Battery
1
ACES Power Jack
1
5mm Red LED
4
4516 IC
1
Wires
Assorted
10
The final circuit brings together NAND logic, oscillation, sequential counting, binary counting, decoding, and a seven-segment decimal display.
Final Counting Circuit
Completed Project 1.4 circuit