Logic Gates
Truth Tables and RAM
Truth Tables
NOT Gate
Input 1 | Output 1
0 | 1
1 | 0
OR Gate
Input 1 | Input 2 | Output
0 | 0 | 0
1 | 0 | 1
0 | 1 | 1
1 | 1 | 1
AND Gate
Input 1 | Input 2 | Output
0 | 0 | 0
1 | 0 | 0
0 | 1 | 0
1 | 1 | 1
Key
1 = true, 0 = false. (This does relate to binary).
Input 1 | Output 1
0 | 1
1 | 0
OR Gate
Input 1 | Input 2 | Output
0 | 0 | 0
1 | 0 | 1
0 | 1 | 1
1 | 1 | 1
AND Gate
Input 1 | Input 2 | Output
0 | 0 | 0
1 | 0 | 0
0 | 1 | 0
1 | 1 | 1
Key
1 = true, 0 = false. (This does relate to binary).
RAM (And how it loads memory)
RAM uses logic gates to load and write memory. These gates are called "Latches", and are made by connecting several gates. A combination of flip-flops and latches that can store a multiple-bit value is called a "Register". A "Sequential Logic System" is memory whom's output is influenced by the previous values. This is what enables pseudo-random numbers to be generated. A simple latch is the "RS-NOR Latch". This is created like this:
-->o--
| . . . |
--o<--
Key
Where '-' is a connector, '>o' or 'o<' is a NOT Gate, '>' being input and 'o' being output, '|' being vertical connectors and '.' for spacing (smore deletes whitespace).
The outputs and inputs of one NOT Gate correspond to the other NOT Gate's inputs and outputs. When this receives a value, it will save the value. When this latch receives a value and is currently holding a value, the currently held value will be overwritten.
Logic.ly
You can create this on logic.ly, but replace '|' with buffers facing into the NOT Gates.
-->o--
| . . . |
--o<--
Key
Where '-' is a connector, '>o' or 'o<' is a NOT Gate, '>' being input and 'o' being output, '|' being vertical connectors and '.' for spacing (smore deletes whitespace).
The outputs and inputs of one NOT Gate correspond to the other NOT Gate's inputs and outputs. When this receives a value, it will save the value. When this latch receives a value and is currently holding a value, the currently held value will be overwritten.
Logic.ly
You can create this on logic.ly, but replace '|' with buffers facing into the NOT Gates.