"how numbers are stored and used in computers"
Digital logic gates execute logical operations on binary data. They are the build blocks of all digital electronics, and are physically implemented by joining transistors (digital switches).
A transistor is an electronic switch that controls the flow of an electrical signals. By configuring transistors in various arrangements, the various logic gates shown below can be created. Since the invention of the transistor in 1947, the number of transistors in a device has increased exponentially - a phenomenon known as Moore's Law.
No results. |
To give some sense of just how many transistors are in modern devices, here are a few examples, which estimate that it takes an average of 4 transistors per logic gate (some require a few more, and some a few less).
Known also as an inverter, this singular gate performs a function of exquisite symmetry: it accepts a single input and produces an output that is its exact logical complement.
Mathematically denoted as
At a glance, the function of a NOT gate may appear trivial. This deceptively simple component lies at the heart of conditional logic, signal conditioning, timing control, and arithmetic operations. The very act of decision-making in a computer - whether to act or to abstain - is often framed through the inversion of a logical state.
notClick the inputs to change the gate's output.
Input (A) | Output |
---|---|
0 | 1 |
1 | 0 |
In CMOS technology, a NOT gate is constructed using a pair of transistors: one n-type and one p-type. When the input is high, the n-type transistor conducts, grounding the output. When the input is low, the p-type transistor conducts, pulling the output high. This complementary action results in low power consumption and high noise immunity.
The AND gate reigns as a gate of agreement - a digital arbiter that yields affirmation only in the presence of unanimous consent. It is a gate of conjunction, where multiple logical conditions must all be satisfied before permission is granted to proceed.
The AND gate, conceptually simple yet structurally essential, performs a fundamental Boolean operation: it outputs a logical
andClick the inputs to change the gate's output.
Input (A) | Input (B) | Output |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
In CMOS logic, a basic 2-input AND gate is often realized by cascading NAND and NOT gates (since NAND is more fundamental at the transistor level). However, it can also be directly constructed using complementary pairs of transistors arranged such that the output is driven high only when both inputs are high.
A nand gate returns the opposite result of an and gate.
nandClick the inputs to change the gate's output.
Input (A) | Input (B) | Output |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
An or gate returns true if at least one input is true.
orClick the inputs to change the gate's output.
Input (A) | Input (B) | Output |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
A nor gate returns the opposite result of an or gate.
norClick the inputs to change the gate's output.
Input (A) | Input (B) | Output |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
A xor gate returns true if one input is true and the other is false.
xorClick the inputs to change the gate's output.
Input (A) | Input (B) | Output |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
A xnor gate returns true if both inputs are the same.
xnorClick the inputs to change the gate's output.
Input (A) | Input (B) | Output |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
multiplication
division
construct a half adder and full adder
karnaugh maps, boolean simplification