In this blog, I will explain how we can build a simple 1-bit ALU (Arithmetic Logic Unit), which forms the core of a CPU.
In binary logic, 0 represents 0 Volt and 1 represents 5 Volt.
We will use 1-bit binary operations.
Here’s the expected output for our ALU:
Addition:
0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 10
Subtraction:
0 - 0 = 0
1 - 0 = 1
0 - 1 = 11 [1 indicates negative]
1 - 1 = 0
Multiplication:
0 x 0 = 0
1 x 0 = 0
0 x 1 = 0
1 x 1 = 1
Division:
0 / 0 = 0 [Undefined]
1 / 0 = 0 [Undefined]
0 / 1 = 0
1 / 1 = 1
To build all the gates, you will need the following components. I’ve included Amazon links for reference, but you can find cheaper options at local electronics shops like Chandni Chowk. A resistor pack may cover most of your requirements.
| Component | Quantity | Link |
|---|---|---|
| Transistor BC547 | 5 | Amazon |
| 1N4007 Diode | 18 | Amazon |
| Resistors (1 KΩ) Pack | 7 | Amazon |
| Resistors (10 KΩ) | 5 | - |
| Resistors (4.7 KΩ) | 5 | - |
| LED | 4 | Amazon |
| Battery Holder | 2 | Amazon |
| 5V Power Source | 1 | - |
| Wires | - | - |
| Breadboard | 2–4 | Amazon |
| Patience | - | - |
Note: If you don’t have a breadboard, you can wire everything manually, but it will be much more difficult.
This circuit creates a single OR gate, where the output Y is 1 if either A or B is 1.
| A | B | Y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |

Symbol:

The AND gate outputs 1 only if both inputs are 1.
| A | B | Y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |

Symbol:

The NOT gate inverts a single input.
| A | Y |
|---|---|
| 0 | 1 |
| 1 | 0 |
Before wireing identify the BC547B Pin.

The flat surface of transistor in front of you then left side will be Collector and middle pin will be base and right pin will be Emmiter. Before powering up the transistor make sure you connect proper pin otherwise the transistor get damaged.

Symbol:

The adder combines A and B to produce a sum Y.
0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 10

The subtractor outputs the difference between A and B.
0 - 0 = 0
1 - 0 = 1
0 - 1 = 11 [1 indicates negative]
1 - 1 = 0

The multiplier outputs the product of A and B.
0 x 0 = 0
1 x 0 = 0
0 x 1 = 0
1 x 1 = 1

The divider outputs the quotient of A divided by B.
0 / 0 = 0 [Undefined]
1 / 0 = 0 [Undefined]
0 / 1 = 0
1 / 1 = 1

Here’s an example of a simulation animation in Logisim:

We can extend this design to 4-bit, 8-bit, 16-bit, 32-bit, and 64-bit ALUs. For larger ALUs, circuits become more complex, but using prebuilt ICs for OR, AND, and NOT gates makes it manageable.
Tip: Use Qucs for digital simulations and Logisim for analog simulations.
Good luck with your project!
© 2025 Build a Simple ALU. All Rights Reserved.