Arithmetic Operations — Digital Logic

Basics of Digital Logic (Arithmetic Operations)

Think about how we do math every day — adding groceries’ prices, counting steps, or subtracting expenses.
Computers do the same kind of math, but instead of using our decimal numbers, they use binary digits — just 0s and 1s.

The process of performing mathematical calculations using binary numbers is what we call Arithmetic Operations in Digital Logic.


💡 What Are Arithmetic Operations?

Arithmetic operations are basic mathematical functions — addition, subtraction, multiplication, and division.
In digital systems, all these operations are done using binary arithmetic, where numbers are represented in base 2 (only 0 and 1).

Before we go into each, remember one simple rule:
Every calculation that we can do on paper, a computer can do too — it just follows binary versions of our familiar rules.


🔹 1. Binary Addition

Binary addition is just like decimal addition, except there are only two digits to work with.
Let’s see the four possible cases:

| A | B | Sum | Carry |
| – | – | — | —– |
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |

So, 1 + 1 = 10 in binary (that’s 2 in decimal).

Example:

  1011
+ 1101
-------
11000

That’s 24 in decimal.

In circuits, this operation is performed using logic gates — specifically by adders (Half Adder and Full Adder).


🔹 2. Binary Subtraction

Binary subtraction is also similar to decimal subtraction, but we use borrowing instead of carrying.

Here are the basic rules:

| A | B | Difference | Borrow |
| – | – | ———- | —— |
| 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 |

Example:

  1011
-  1001
--------
   0010

That’s 2 in decimal.

Digital circuits perform this using Subtractors (Half Subtractor and Full Subtractor).


🔹 3. Using Complements for Subtraction

Another clever way computers handle subtraction is through complements, especially the 2’s complement method.

Here’s the trick:
To subtract B from A,

  1. Find the 2’s complement of B (which means invert all bits and add 1).
  2. Add it to A.
  3. Ignore the carry if it appears.

This method helps computers perform subtraction using addition circuits only, making hardware simpler and faster.


🔹 4. Binary Multiplication

Binary multiplication works just like normal multiplication, but again, with 0s and 1s.

| A | B | Product |
| – | – | ——- |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |

Example:

   101
×   11
--------
   101   (101 × 1)
+ 1010   (101 × 1, shifted left)
--------
  1111

That’s 15 in decimal.

Computers perform this through sequential addition of shifted binary numbers — kind of like how we multiply by hand.


🔹 5. Binary Division

Binary division is just repeated subtraction, similar to decimal long division.

Example:
Divide (1010)₂ by (10)₂
→ (10)₂ fits in (1010)₂ exactly (101)₂ times.
That’s 5 in decimal, which checks out because 10 ÷ 2 = 5.

Division in computers uses circuits called dividers or is handled through software algorithms.


🧠 Real-Life Analogy

Imagine teaching a robot how to do math.
You show it how to add, subtract, multiply, and divide — but you can only say “yes” (1) or “no” (0).
That’s exactly what digital logic does!
It trains circuits to perform calculations using those two simple signals.


⚙️ Where It’s Used

Arithmetic operations form the core of the ALU (Arithmetic Logic Unit) in every processor.
This part of the CPU handles all math and logic — from calculating your phone’s battery percentage to performing complex scientific computations.


  • Arithmetic operations in digital logic mean performing math using binary numbers.
  • The main operations are addition, subtraction, multiplication, and division.
  • Circuits like adders, subtractors, and ALUs make these operations happen in hardware.
  • Using complements, computers can simplify subtraction into addition tasks.
  • These simple binary steps power every complex calculation your computer performs.