Skip to content

shubhamatkal/4-bit-adder-using-transistors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

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.

Table of Contents

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.