Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shubhamatkal/4-bit-adder-using-transistors


https://github.com/shubhamatkal/4-bit-adder-using-transistors

Last synced: 9 days ago
JSON representation

Awesome Lists containing this project

README

        

# 4-bit Adder Using Transistors

This project demonstrates the construction of a 4-bit adder using BC547 transistors, resistors, LEDs, and other components on breadboards. The adder takes two 4-bit binary numbers as input and provides a 5-bit binary result displayed using LEDs.

### [demo video link](https://youtu.be/X30VRVgSusA?si=7kjyowYuODl_7c2p)

## Table of Contents
- [Components](#components)
- [Circuit Design](#circuit-design)
- [Adder Logic](#adder-logic)
- [Breadboard Layout](#breadboard-layout)
- [Assembly Instructions](#assembly-instructions)
- [Examples](#examples)
- [Testing](#testing)
- [Troubleshooting](#troubleshooting)
- [Conclusion](#conclusion)

## Components

- **6 Breadboards (800 pins each)**
- **BC547 Transistors (100 pieces)**
- **Jumper Wires (100 pieces)**
- **Resistors:**
- 220k ohm (100 pieces)
- 47k ohm (50 pieces)
- **9V Batteries (2 pieces, connected in parallel)**
- **5mm LEDs (13 pieces)**
- **Push Buttons (optional, for input)**
- **Battery Holders**
- **Connecting Wires**

## Circuit Design

The adder is constructed using the following gates for each bit addition:
- **2 XOR gates** for the sum
- **2 AND gates** for generating carry
- **1 OR gate** for combining the carries

Each gate is built using BC547 transistors.

### XOR Gate (Sum Calculation)
- **Transistors:** 2
- **Resistors:** 47k ohm (2 pieces)

### AND Gate (Carry Generation)
- **Transistors:** 2
- **Resistors:** 220k ohm (2 pieces)

### OR Gate (Carry Combination)
- **Transistors:** 1
- **Resistors:** 47k ohm (1 piece)

## Breadboard Layout

Use the following layout for each 4-bit adder section:

1. **Place transistors** on the breadboard.
2. **Connect resistors** to the base of each transistor as per gate requirement.
3. **Connect the emitters** to ground.
4. **Connect the collectors** to the LEDs and then to Vcc through appropriate resistors.
5. **Arrange the inputs** using jumper wires.

## Assembly Instructions

1. **Power Supply:** Connect the 9V batteries in parallel to ensure a stable power supply.
2. **Place Components:** Place transistors, resistors, and LEDs on the breadboards according to the circuit design.
3. **Wiring:** Use jumper wires to connect the components, following the breadboard layout.
4. **Testing Inputs:** Optionally, use push buttons to simulate binary inputs.
5. **Verify Connections:** Ensure all connections are secure and correct.

## Examples

Here are examples of input and output for the 4-bit adder:

- **Example 1:**
- Input: A = 0101 (5), B = 0011 (3)
- Output: Sum = 1000 (8)

- **Example 2:**
- Input: A = 1111 (15), B = 0001 (1)
- Output: Sum = 10000 (16)

- **Example 3:**
- Input: A = 1010 (10), B = 0101 (5)
- Output: Sum = 1111 (15)

## Testing

1. **Apply Inputs:** Provide binary inputs through the input lines.
2. **Observe Outputs:** Check the LED outputs for the sum and carry.
3. **Verify Results:** Compare the LED outputs with expected binary results.

## Troubleshooting

- **No Output:** Check power supply and connections.
- **Incorrect Output:** Verify the arrangement of transistors and resistors.
- **LEDs Not Lighting:** Check the LED connections and ensure they are not reversed.

## Conclusion

This project successfully demonstrates the construction of a 4-bit adder using transistors. By following the circuit design and assembly instructions, you can understand the fundamental working of digital circuits and logic gates.

---

**Note:** Ensure safety while working with electronic components and follow proper guidelines to avoid damage or injury.