~ 2 bit adder ~

by kalekale on 2023-12-30
demonstrating how a computer adds numbers


Boolen algebra logic for the 2 bit adder:
F(a0, a1, b0, b1) : 2 bit adder, 3 bit output  
0: XOR(a0,b0)
1: XOR(XOR(a1, b1),AND(a0, b0))
2: OR(AND(XOR(a1,b1),AND(a0,b0)),AND(a1,b1))
This 2 bit adder is a combination of a half adder and a full adder, the half adder is a 1 bit adder which gives the sum bit and the carry bit ,the full adder is a 1 bit adder which takes 2 inputs along with a carry bit and gives 2 bit output. Conneting the half adder and a full adder gives you a 2 bit adder, in a similar way connecting 4 full adders can give you a 4bit adder. This is how the first digital computers were made, the logic gates like the AND, OR, XOR gates can be made with a simple switch, traditionally we used bulbs/tubes for the switch. The ENIAC was made with these switches and is conisdered the first ever digital computer.
logic table:
a1a0 b1b0 out
00 00 000
01 00 001
00 01 001
10 00 010
00 10 010
10 01 011
01 10 011
10 10 100
and so on..

but how are the logic gates made?

With the help of transistors and the flow of electron we can manipulate electricity into doing our math, in short a silicon is chemically doped to have 3 points, called a NPN or a PNP junction based on what element was used to dope the semiconductor. The semiconductor then acts as a switch where it controls the flow of electrcity. It has 3 points, the collector, the base and the emittor. The collector is connected to the source of electricity, the base is conneted to whatever we want to switch to be and the emittor is what provides the output signal. The following picture demonstrates how a transistor can be used to make the NAND gate.

The Transistor made by the Bell Labs physicists in 1947 and the boolean algebra theory given to us by logician George Boole has made the modern world into what it is today. Just as how the transistor and the boolean alegbra shaped our current technological landscape, I can see the qbit and the quantam entanglement theory by Einstien and Schrödinger to reshape our future into something we today cannot comprehend, in the same sense how a kid from 1920 cannot comprehend what a tiktok is.