74HC11 - Triple 3-Input AND Gate IC Documentation
The 74HC11 is a triple 3-input AND gate integrated circuit (IC) that belongs to the 74HC series of CMOS logic gates. This IC is designed to perform logical AND operations on three input signals, producing an output based on the truth table of the AND gate. The 74HC11 is a popular choice for various electronic projects, particularly in digital logic circuits, due to its low power consumption, high speed, and versatility.
The 74HC11 has 14 pins, with three 3-input AND gates (G1, G2, and G3) and a single power supply pin (VCC). The IC operates on a single 2-6V power supply, making it suitable for a wide range of applications.
| Pin | Function |
| --- | --- |
| 1-3 | Input 1-3 for Gate 1 (G1) |
| 4-6 | Input 1-3 for Gate 2 (G2) |
| 7-9 | Input 1-3 for Gate 3 (G3) |
| 10 | Output of Gate 1 (G1) |
| 11 | Output of Gate 2 (G2) |
| 12 | Output of Gate 3 (G3) |
| 13 | GND (Ground) |
| 14 | VCC (Power Supply) |
### Example 1: Basic AND Gate Operation
In this example, we will demonstrate the basic operation of the 74HC11 using three switches as inputs to one of the AND gates.
Connect three switches (SW1, SW2, SW3) to inputs 1-3 of Gate 1 (G1). Connect the output of G1 to an LED (D1) through a 1k resistor. Power the circuit with a 5V power supply.
| SW1 | SW2 | SW3 | Output (G1) |
| --- | --- | --- | --- |
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
Not applicable, as this is a digital logic circuit without a microcontroller.
### Example 2: AND Gate with Microcontroller (Arduino)
In this example, we will demonstrate how to use the 74HC11 with an Arduino microcontroller to perform logical AND operations.
Connect three digital output pins of an Arduino board (D2, D3, D4) to inputs 1-3 of Gate 1 (G1) of the 74HC11. Connect the output of G1 to a digital input pin of the Arduino board (D5).
Code
```c
const int input1 = 2; // Input 1 of Gate 1
const int input2 = 3; // Input 2 of Gate 1
const int input3 = 4; // Input 3 of Gate 1
const int output = 5; // Output of Gate 1
void setup() {
pinMode(input1, OUTPUT);
pinMode(input2, OUTPUT);
pinMode(input3, OUTPUT);
pinMode(output, INPUT);
}
void loop() {
// Set input values
digitalWrite(input1, HIGH);
digitalWrite(input2, LOW);
digitalWrite(input3, HIGH);
// Read output of Gate 1
int result = digitalRead(output);
// Print the result
Serial.println(result);
delay(1000);
}
```
In this example, we set the input values of Gate 1 using the Arduino's digital output pins. We then read the output of Gate 1 using a digital input pin and print the result to the serial console.