成人论坛

Computer systems - AQALogic gates

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.

Part of Computer ScienceTheoretical knowledge

Logic gates

In its most basic form, a computer is a collection of powered and unpowered and . A is a series of transistors connected together to give one or more , each output being based on the 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 .

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:

Two separate AND gates representing a TRUE and a FALSE output

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.

ABQ
000
010
100
111
A0
B0
Q0
A0
B1
Q0
A1
B0
Q0
A1
B1
Q1

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:

Two separate OR gates representing TRUE outputs

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.

ABQ
000
011
101
111
A0
B0
Q0
A0
B1
Q1
A1
B0
Q1
A1
B1
Q1

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:

Two separate NOT gates representing a TRUE and a FALSE output

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.

AQ
01
10
A0
Q1
A1
Q0