Number Representations & States

"how numbers are stored and used in computers"

Binary arithmetic

Half adder

A half adder is a digital circuit used to perform the addition of two single-bit binary numbers, producing a sum and a carry output.

Click the inputs to change the half adder circuit.

Input A
Input B
Sum
0
Carry Out
0

The Half Adder uses an XOR gate to calculate the sum and an AND gate to calculate the carry.

Sum = A ⊕ B (XOR)
Carry = A · B (AND)

Full adder

The full adder is a digital circuit that computes the sum of three binary inputs: two input bits and an incoming carry bit, producing a sum and a carry output.

Click the inputs to change the full adder circuit.

Input A
Input B
Carry In
Sum
0
Carry Out
0

The Full Adder extends the Half Adder to include a carry input. It uses two half adders and an OR gate.

Sum = A ⊕ B ⊕ Cin (XOR)
Carry = (A · B) + (Cin · (A ⊕ B))

Click on the cells in the Karnaugh map to toggle their values between 0 and 1. The simplified Boolean expression will update accordingly.

B
A
01
000
100

Simplified Boolean Expression

Click on the cells in the Karnaugh map to toggle their values between 0 and 1. The simplified Boolean expression will update accordingly.

B
A
012
0000
1000
2000

Simplified Boolean Expression

Click on the cells in the Karnaugh map to toggle their values between 0 and 1. The simplified Boolean expression will update accordingly.

B
A
0123
00000
10000
20000
30000

Simplified Boolean Expression