Stufin
Home Quick Cart Profile

CD4070 - Quad 2-Input Exclusive-OR (XOR) Gate IC

Buy Now

Pin Configuration

  • CD4070 - Quad 2-Input Exclusive-OR (XOR) Gate IC Documentation
  • Pinout Description:
  • The CD4070 is a quad 2-input Exclusive-OR (XOR) gate IC, which means it contains four independent XOR gates. The IC has 14 pins, and each XOR gate has two input pins and one output pin. Here's a breakdown of each pin:
  • Pin 1: VCC (Positive Supply Voltage)
  • ------------------------------------------------
  • Function: Provides the positive supply voltage to the IC.
  • Description: Connect to a positive voltage source (typically +5V) to power the IC.
  • Recommended operating range: 3V to 15V.
  • Pin 2: Input A1 (XOR Gate 1)
  • ---------------------------------
  • Function: Input A of the first XOR gate.
  • Description: Connect to a logic signal or voltage level to be processed by the XOR gate.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 3: Input B1 (XOR Gate 1)
  • ---------------------------------
  • Function: Input B of the first XOR gate.
  • Description: Connect to a logic signal or voltage level to be processed by the XOR gate.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 4: Output Y1 (XOR Gate 1)
  • ----------------------------------
  • Function: Output of the first XOR gate.
  • Description: Connect to a load or another logic circuit to receive the output of the XOR operation.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 5: Input A2 (XOR Gate 2)
  • ---------------------------------
  • Function: Input A of the second XOR gate.
  • Description: Connect to a logic signal or voltage level to be processed by the XOR gate.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 6: Input B2 (XOR Gate 2)
  • ---------------------------------
  • Function: Input B of the second XOR gate.
  • Description: Connect to a logic signal or voltage level to be processed by the XOR gate.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 7: Output Y2 (XOR Gate 2)
  • ----------------------------------
  • Function: Output of the second XOR gate.
  • Description: Connect to a load or another logic circuit to receive the output of the XOR operation.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 8: Input A3 (XOR Gate 3)
  • ---------------------------------
  • Function: Input A of the third XOR gate.
  • Description: Connect to a logic signal or voltage level to be processed by the XOR gate.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 9: Input B3 (XOR Gate 3)
  • ---------------------------------
  • Function: Input B of the third XOR gate.
  • Description: Connect to a logic signal or voltage level to be processed by the XOR gate.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 10: Output Y3 (XOR Gate 3)
  • ----------------------------------
  • Function: Output of the third XOR gate.
  • Description: Connect to a load or another logic circuit to receive the output of the XOR operation.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 11: Input A4 (XOR Gate 4)
  • ---------------------------------
  • Function: Input A of the fourth XOR gate.
  • Description: Connect to a logic signal or voltage level to be processed by the XOR gate.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 12: Input B4 (XOR Gate 4)
  • ---------------------------------
  • Function: Input B of the fourth XOR gate.
  • Description: Connect to a logic signal or voltage level to be processed by the XOR gate.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 13: Output Y4 (XOR Gate 4)
  • ----------------------------------
  • Function: Output of the fourth XOR gate.
  • Description: Connect to a load or another logic circuit to receive the output of the XOR operation.
  • Logic level: 0V (Low) or VCC (High).
  • Pin 14: VSS (Ground or Negative Supply Voltage)
  • ---------------------------------------------------
  • Function: Provides the ground or negative supply voltage to the IC.
  • Description: Connect to a ground or negative voltage source (typically 0V) to complete the circuit.
  • Recommended operating range: 0V.
  • Connecting the Pins:
  • When connecting the pins, ensure that:
  • VCC (Pin 1) is connected to a positive supply voltage (e.g., +5V).
  • VSS (Pin 14) is connected to a ground or negative supply voltage (e.g., 0V).
  • Each XOR gate's input pins (A and B) are connected to logic signals or voltage levels.
  • Each XOR gate's output pin (Y) is connected to a load or another logic circuit.
  • The inputs and outputs of each XOR gate are connected according to the desired logic operation.
  • Example Circuit:
  • Here's an example circuit that demonstrates the connection of the CD4070 quad 2-input XOR gate IC:
  • ```
  • +-----+-----+-----+-----+
  • | VCC | A1 | B1 | Y1 |
  • +-----+-----+-----+-----+
  • | +5V | SIG1 | SIG2 | OUT1 |
  • +-----+-----+-----+-----+
  • | VSS | A2 | B2 | Y2 |
  • +-----+-----+-----+-----+
  • | GND | SIG3 | SIG4 | OUT2 |
  • +-----+-----+-----+-----+
  • | ... | ... | ... | ... |
  • +-----+-----+-----+-----+
  • | VSS | A4 | B4 | Y4 |
  • +-----+-----+-----+-----+
  • | GND | SIG7 | SIG8 | OUT4 |
  • +-----+-----+-----+-----+
  • ```
  • In this example, each XOR gate is connected to separate input signals (SIG1-SIG8) and produces an output signal (OUT1-OUT4) based on the XOR operation. The VCC and VSS pins are connected to the power supply rails.
  • Remember to consult the datasheet and relevant application notes for specific guidance on using the CD4070 quad 2-input XOR gate IC in your project.

Code Examples

CD4070 - Quad 2-Input Exclusive-OR (XOR) Gate IC Documentation
Overview
The CD4070 is a quad 2-input Exclusive-OR (XOR) gate integrated circuit (IC) designed for use in digital electronic circuits. Each gate performs a logical XOR operation on two input signals, producing an output signal that is high only when the input signals are different.
Pinout
The CD4070 IC has 14 pins, with the following assignments:
| Pin | Function |
| --- | --- |
| 1, 2, 3, 4 | Input 1 (A) |
| 5, 6, 7, 8 | Input 2 (B) |
| 9, 10, 11, 12 | Output (Y) |
| 13 | VCC (Positive Supply Voltage) |
| 14 | GND (Ground) |
Operating Conditions
Supply Voltage (VCC): 3V to 15V
 Operating Temperature: -55C to 125C
Truth Table
| A | B | Y |
| --- | --- | --- |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Example Circuits and Code
Example 1: Simple XOR Gate
In this example, we use the CD4070 to implement a simple XOR gate. We connect two switches to the input pins of one of the XOR gates, and an LED to the output pin.
Circuit Diagram:
```
  +-----------+
  |          |
  |  Switch 1  |
  |  (A)       |
  +-----------+
           |
           |
           v
  +-----------+
  |          |
  |  CD4070    |
  |  (XOR Gate) |
  +-----------+
           |
           |
           v
  +-----------+
  |          |
  |  Switch 2  |
  |  (B)       |
  +-----------+
           |
           |
           v
  +-----------+
  |          |
  |  LED (Y)  |
  |          |
  +-----------+
           |
           |
           v
  +-----------+
  |          |
  |  GND       |
  |          |
  +-----------+
```
Code (Arduino):
```c
const int xorInput1 = 2;  // Switch 1 connected to digital pin 2
const int xorInput2 = 3;  // Switch 2 connected to digital pin 3
const int ledPin = 13;    // LED connected to digital pin 13
void setup() {
  pinMode(xorInput1, INPUT);
  pinMode(xorInput2, INPUT);
  pinMode(ledPin, OUTPUT);
}
void loop() {
  int xorOutput = (digitalRead(xorInput1) ^ digitalRead(xorInput2));
  digitalWrite(ledPin, xorOutput);
  delay(50);
}
```
Example 2: Half Adder using XOR Gates
In this example, we use two XOR gates from the CD4070 to implement a half adder. The half adder takes two binary inputs, A and B, and produces two outputs, Sum and Carry.
Circuit Diagram:
```
  +-----------+
  |          |
  |  A (Input) |
  +-----------+
           |
           |
           v
  +-----------+
  |          |
  |  CD4070    |
  |  (XOR Gate 1) |
  +-----------+
           |
           |
           v
  +-----------+
  |          |
  |  B (Input) |
  +-----------+
           |
           |
           v
  +-----------+
  |          |
  |  CD4070    |
  |  (XOR Gate 2) |
  +-----------+
           |
           |
           v
  +-----------+
  |          |
  |  Sum (Output) |
  +-----------+
           |
           |
           v
  +-----------+
  |          |
  |  Carry (Output) |
  +-----------+
           |
           |
           v
  +-----------+
  |          |
  |  GND       |
  |          |
  +-----------+
```
Code (Verilog):
```verilog
module half_adder(A, B, Sum, Carry);
  input A, B;
  output Sum, Carry;
wire X, Y;
XOR Gate1(X, A, B);
  XOR Gate2(Y, A, B);
  AND Gate3(Carry, A, B);
  OR Gate4(Sum, X, Y);
endmodule
```
Note: The above examples are just a representation of how the CD4070 can be used in various contexts. The actual implementation may vary depending on the specific requirements and application.