At the simplest level, computers are little more than a collection of transistors and circuits. They connect together to form logic gates, which in turn are used to form logic circuits.
In its most basic form, a computer is a collection of powered and unpowered circuitA closed loop through which current moves - from a power source, through a series of components, and back into the power source. and transistorMicroscopic devices that open and close circuits to communicate electrical signals. CPUs contain millions of transistors.. A logic gateCircuit components which take several inputs, compare the inputs with each other, and provide a single output based on logical functions such as AND, OR and NOT. is a series of transistors connected together to give one or more outputData which is sent out of a system., each output being based on the inputData which is inserted into a system for processing and/or storage. or combination of inputs supplied to it. There are three types of gate to consider:
AND gate
OR gate
NOT gate
Each type of gate can be represented either as a diagram, in algebraic form, or as a truth tableA table to list the output for all possible input combinations into a logic gate..
AND gates
An AND gate uses two inputs to generate one output. The output is 1 (TRUE) only if both of the inputs are 1 (TRUE).
AND gates are represented diagrammatically as:
A represents the first input. B represents the second input. Q represents the output.
A truth table shows, for each combination of inputs, what the output will be. Like logic gates, a 0 in the table represents FALSE, while 1 represents TRUE.
An AND gate is represented in the truth table below.
A
B
Q
0
0
0
0
1
0
1
0
0
1
1
1
A
0
B
0
Q
0
A
0
B
1
Q
0
A
1
B
0
Q
0
A
1
B
1
Q
1
OR gates
An OR gate uses two inputs to generate one output. The output is 1 (TRUE) only if either or both of the inputs are 1 (TRUE).
OR gates are represented diagrammatically as:
A represents the first input. B represents the second input. Q represents the output.
An OR gate is represented in the truth table as below.
A
B
Q
0
0
0
0
1
1
1
0
1
1
1
1
A
0
B
0
Q
0
A
0
B
1
Q
1
A
1
B
0
Q
1
A
1
B
1
Q
1
NOT gates
A NOT gate uses just one input to generate one output. A NOT gate inverts the input - the output is 1 (TRUE) if the input is 0 (FALSE), and the output is 0 (FALSE) if the input is 1 (TRUE).
NOT gates are represented diagrammatically as:
The NOT gate has what appears to be a nose at the front. When using more complex gates, this nose is added to other gates to show they have been combined with the NOT gate.
A NOT gate is represented in the truth table below.