4 ms·
In the end a classical computer just "processes" data. It takes data in, processes it (math operations), then outputs it. The foundation is boolean math, which
by achenatx 7y ago
In the end a classical computer just "processes" data. It takes data in, processes it (math operations), then outputs it. The foundation is boolean math, which is then used to execute regular math.
At the very most basic level a computer is made of transistors that can solve the problem of basic boolean math. Gates are AND (or NAND), OR, XOR etc.
An XOR gate produces the following output from the following inputs:
A B Output
0 0 0
0 1 1
1 0 1
1 1 0
an AND gate produces the following outputs:
A B Output
0 0 0
0 1 0
1 0 0
1 1 1
with those gates you can make an adder. A single bit adder has the following inputs and outputs
A B Output 1 Output 2
0 0 0 0 (decimal 0)
1 0 0 1 (decimal 1)
0 1 0 1 (decimal 1)
1 1 1 0 (decimal 2)
Notice that Output 2 is an XOR of inputs A and B
Output one is an AND of inputs A and B. So a single bit adder is simply the inputs feeding an XOR gate and an AND gate.
This can be scaled up to add any number of bits. Other math operations can also be done.
Transistors can be used to make memory bits that hold its state and can be set and unset. They are essentially binary gate loops that feed outputs back to inputs and rely on the delay of electron flows to reach stable states.
A clock is used to sequentially count (and pull instructions from memory) and set and unset memory bits. Each cycle of the clock allows the computer to execute the next instruction (by incrementing a number that determines which instruction to fetch).
From there you are right, the bits are used to encode meaning. Which could be alphabets, images, audio etc.