CD4015 – An IC With Two 4-bit Shift Registers

CD4015 functional diagram showing the two internal shift registers.

The CD4015 is a CMOS IC with two 4-bit shift registers. Each shift-register has serial input and parallel output pins. It’s commonly used to give you more output pins from a microcontroller, such as Arduino.

You’ll see an example of this further down.

Pin Overview

CD4015 Pinout
Pinout for the 4015 IC
Pin NamePin #TypeDescription
VDD16PowerSupply Voltage (+3 to +15V)
GND8PowerGround (0V)
DA7InputData pin for register A
CLKA9InputClock pulse for register A
RSTA6InputReset pin for register A
QA0,QA1,QA2,QA35,4,3,10Output4-bit output for register A
DB15InputData pin for register B
CLKB1InputClock pulse for register B
RSTB14InputReset pin for register B
QB0,QB1,QB2,QB311,12,13, 2Output4-bit output for register B
Pin overview for the 4015 IC

What is a 4-Stage Shift Register?

A shift register is a simple memory circuit that can store a number of bits. You can build one using a series of D flip-flops. Each flip-flop can store one bit. A 4-bit shift register like the ones in the CD4015 chip has 4 flip-flops and is often called a 4-stage shift register:

Shift register circuit made with d flip-flops

After the first clock pulse, whatever is on the Data In pin will be stored in the first flip-flop. What was on the first flip-flop from before is stored on the second flip-flop. What was one the second flip-flop from before is stored on the third… And so on.

The bit that was stored on the last flip-flop will be overwritten. So on every clock pulse, the data is shifted one flip-flop, or one position, to the right. Hence the name shift register.

How To Use The CD4015

First of all, you need to connect the VDD pin to your positive supply terminal and the GND pin to your negative supply terminal. You can use a power supply voltage between 3V and 15V. Although, some versions of the 4015 IC support up to 20V. Check your datasheet for exact values.

Each of the two shift registers in the chip has independent Clock, Reset, and Data pins. Use the clock and data pins to load data into the registers like this: On each rising edge of the CLK pin, whatever is on the D pin is shifted into the register.

Set the RST pin HIGH to reset the four bits of the register back to 0000. Otherwise, keep it LOW.

At any point in time, you can read the state of the shift registers from the Qxx pins.

CD4015 Example Circuit – Adding Outputs to Arduino

Here’s a practical example that shows you how to use the CD4015 to add 8 additional outputs to an Arduino by using only two Arduino pins:

To build this circuit you’ll need:

  • A 4015 chip, such as the CD4015BE
  • 8 x Light-Emitting Diode (LED)
  • 8 x 1 kΩ Resistor
  • Arduino (Uno or any other)

In this circuit, you load 8 bits into the Arduino via the pins D4 and D5 (although any other pin would work too). After you’ve loaded the 8 bits, you’ll see these bits as either a lit LED (meaning a 1) or an unlit LED (meaning a 0).

Let’s say you want the last two LEDs to be on and the rest be off. Then you need to load the bits 00000011 into the 4015 IC.

To load one bit, set pin D4 to the value of the bit (1 or 0). Then set pin D5 HIGH, before setting it LOW again. Now you’ve loaded one bit. Repeat for the next 7 bits.

Alternatives and Equivalents for CD4015

You likely find the 4015 IC marked as CD4015, NTE4015, MC14015, HCF4015, LTC4015, TC4015, or HEF4015. Usually with a few extra characters at the end (Ex: CD4015BE).

This has to do with the manufacturer of the chip and the technology used. But the functionality and the pins are the same.

If you can’t find any of these chips in your local electronics store, check out my list of online stores with several options to buy from.

Or try one of the following IC alternatives with shift register functionality.

  • CD4035: 4-bit PIPO shift register
  • 74HC164: 8-bit shift register
  • 74HC595: 8-bit shift register

CD4015 Datasheet

Download the PDF datasheet for the IC 4015 here:

CD4015B (Texas Instruments)
HEF4015B (Nexperia)

Go back to the full overview of the 4000-series integrated circuits

4 thoughts on “CD4015 – An IC With Two 4-bit Shift Registers”

  1. both data sheets agree with your first two images for QA3 HEF4015B(1Q3) CD4015B(Q4A) on pin 10, but in your yellow table its listed in the outputs 2,3,4,5. Is this pin in order like the yellow table or the datasheets? I only ask because it makes sense it would be on the same side like the table shows.


Leave a Comment