Digital Logic Structures and Sequential Logic Structures
Transistors as the Fundamental Building Block
The microprocessor, a central component of computer systems, is constructed from millions of transistors. Examples of transistor counts in historical processors include:
Intel Pentium 4 (released in ): transistors.
IBM PowerPC 750FX (released in ): transistors.
IBM/Apple PowerPC G5 (released in ): transistors.
At a logical level, a transistor functions as a switch. These switches are combined to create fundamental logic functions, including AND, OR, and NOT gates.
These basic gates are further integrated into higher-level digital structures such as adders, multiplexers (MUX), decoders, and registers.
The culmination of these structures allows for the building of complex processors, such as the LC-3.
MOS Transistor Mechanics and Switching Logic
Computers utilize Metal Oxide Semiconductor (MOS) transistors, which come in two complementary types: n-type and p-type.
Switch-based circuits represent binary states where values are associated with physical conditions: on/off, open/closed, or voltage/no voltage.
For an n-type MOS transistor:
When the Gate has a positive voltage (logic ), it acts as a closed switch (short circuit between terminals).
When the Gate has zero voltage (logic ), it acts as an open switch (open circuit between terminals).
Terminal #2 of an n-type transistor must be connected to Ground ( or ).
For a p-type MOS transistor:
When the Gate has a positive voltage (logic ), it acts as an open switch.
When the Gate has zero voltage (logic ), it acts as a closed switch.
Terminal #1 of a p-type transistor must be connected to the positive supply voltage ().
While various systems use different ranges for logical symbols (such as or ), the standard for these digital logic structures is defined as for logic .
CMOS Circuit Design and Basic Logic Gates
Complementary MOS (CMOS) circuits utilize both n-type and p-type transistors together to ensure stable output levels.
Logic of CMOS components:
p-type transistors are attached to the positive voltage and pull the output voltage UP when the input is zero.
n-type transistors are attached to Ground and pull the output voltage DOWN when the input is one.
Proper design ensures that for any input, the output is connected either to Ground or to the positive voltage, never both simultaneously.
Basic Logic Gate Definitions:
NOT Gate (Inverter): Reverses the input. If input is , output is (). If input is , output is ().
NOR Gate: Output is only if both inputs are . It features a serial structure of p-type transistors on top and a parallel structure of n-type transistors on the bottom.
OR Gate: Constructed by adding an inverter to the output of a NOR gate. Output is if any input is .
NAND Gate (AND-NOT): Output is only if both inputs are . It features a parallel structure of p-type transistors on top and a serial structure of n-type transistors on the bottom.
AND Gate: Constructed by adding an inverter to the output of a NAND gate. Output is only if all inputs are .
DeMorgan's Law allows for the conversion between AND and OR operations by inverting both the inputs and the final output.
Combinational Logic Modules
A Combinational Logic Circuit is "stateless," meaning its output depends exclusively on the current inputs.
Decoder:
A circuit with inputs and outputs.
Exactly one output is set to for each unique input pattern.
Multiplexer (MUX):
Consists of an -bit selector and inputs with a single output.
The output signal is equal to the specific input selected by the selector bits (e.g., a -to- MUX).
Full Adder:
Processes two bits ( and ) and a carry-in ().
Produces a sum bit () and a carry-out bit ().
A 4-bit adder is created by cascading four full adders, connecting the of one stage to the of the next.
Logical Completeness: Any possible truth table can be implemented using only a combination of AND, OR, and NOT gates. This is achieved by identifying input combinations that yield a and OR-ing the results of those specific AND-gated combinations.
Sequential Logic and Information Storage
Sequential Logic Circuits are capable of storing information. The output depends on both the current inputs and the sequence of past inputs (the "state").
R-S Latch (Reset-Set):
(set) is used to set the value to .
(reset) is used to clear the value to .
Quiescent state occurs when and , holding the previous value.
Setting and resets the output to . Setting and sets the output to .
The state where and is invalid and should be avoided.
Gated D-Latch:
Features two inputs: Data () and Write Enable ().
When , the latch stores the value of .
When , the latch retains its previous state regardless of changes to .
Register:
A multi-bit storage unit composed of multiple D-latches sharing a common signal. When , an -bit value is written.
Multi-bit values are numbered from right (bit ) to left (bit ). Brackets distinguish ranges, such as .
Memory Systems and Architecture
Memory is organized as a logical array of bits with locations and bits per location.
Address Space refers to the number of locations, typically a power of , denoted as .
Addressability refers to the number of bits stored at each location (e.g., bits for byte-addressable memory).
Implementation Types:
Static RAM (SRAM): Fast; retains data as long as power is supplied.
Dynamic RAM (DRAM): Denser and slower; data decays and must be periodically refreshed.
Non-volatile Memory: ROM, PROM, and Flash (retain data without power).
A logical memory structure includes an address decoder, word select lines, and write enable () controls.
State Machines and System Dynamics
A Finite State Machine (FSM) is a system defined by a finite number of states, inputs, and outputs.
The system transitions between states based on an explicit specification (state diagram) triggered by inputs.
The State of a system is a snapshot of all relevant elements at a specific moment. For example, a basketball scoreboard captures the points, time, and possession.
Clock Circuits: Often used to trigger transitions. At the start of each clock cycle, the machine evaluates its current state and external inputs to move to the next state.
Master-Slave Flipflop:
A pair of gated D-latches used to store state bits while isolating the next state from the current state.
Clock Cycle Phase 1: The current state is sent to the logic circuit.
Clock Cycle Phase 2: The next state computed by the logic is stored in the latch.
Case Study: Data Path and Logical Implementation
The Data Path of a computer, such as the LC-3, integrates both combinational and sequential logic to process information.
Combinational components in the Data Path:
Decoders: Convert instructions into control signals.
Multiplexers: Select specific data inputs and outputs.
Arithmetic Logic Unit (ALU): Performs data operations.
Sequential components in the Data Path:
State Machine: Coordinates the timing of data movement and control signals.
Registers and Latches: Provide internal storage elements for the processor.