Computer Architecture: From Transistors to Logic Circuits
Transistor Fundamentals and Binary Inputs
Transistor Components and Operation:
A bipolar junction transistor operates using three primary terminals: Collector, Base, and Emitter.
Collector: Receives continuous voltage/power when the computer is powered on. It provides the flow of electrons through the system.
Base: Acts as the control mechanism or switch. The voltage state at the base depends on external control, user interactions (e.g., keyboard key presses, mouse clicks), or running software programs.
Emitter: Serves as the output path. Current flows through the emitter to yield a binary output state of when conditions at the base and collector are met.
Control Mechanics:
When the base is supplied with control voltage (Base = ), the internal switch closes, allowing current to pass through to the emitter, yielding an output voltage defined as binary .
When the base lacks control voltage (Base = ), the junction exhibits an effectively infinite resistance (), blocking electron flow to the emitter and yielding an output of binary .
The base is not strictly when the computer turns on; background system processes, operating system operations, and display drivers actively drive control bases to or automatically.
Binary Data Encoding and Keypresses:
Every single character or key pressed on a keyboard (e.g., letters, numbers, special keys) represents of input data.
, meaning it consists of binary digits (s and s).
Processing a single keypress requires working simultaneously to process each of the .
Example (Enter Key Input):
Pressing the
Enterkey inputs the decimal value into the computer.Decimal converted to an binary format is .
When pressing
Enter, process the input byte across their respective emitters, producing an output sequence of .This output sequence is subsequently routed to the intended software process (e.g., email client, programming environment, command prompt).
Transistor Integration in Modern Hardware:
Modern computers contain billions of micro-transistors.
Transistors serve as the foundational physical layer used to generate, process, and direct binary data across system components.
Logic Gates and Hardware Implementations
Transition from Transistors to Logic Gates:
While individual transistors simply generate binary state signals ( or ), controlling, altering, and combining data streams requires logic gates.
A logic gate connects multiple transistors together to execute specific boolean logic operations on input signals, producing a single output signal.
AND Gate:
Implementation: Built by connecting two transistors in series.
Operation: Voltage flows through the collector. Both base inputs (Input and Input ) must receive control signals () to complete the circuit path.
Logic Rule: Output is if and only if both Input and Input . If either input is , high internal path resistance blocks output, yielding .
OR Gate:
Implementation: Built by connecting two transistors in parallel.
Operation: Current has two distinct parallel paths to pass through toward the output terminal.
Logic Rule: Output is if either Input , Input , or both inputs are . Output is only when both inputs are .
NOT Gate (Inverter):
Implementation: Uses a transistor connected to a direct path to ground with variable internal path resistance.
Operation:
When Input , the internal transistor resistance drops to zero (), causing current to flow directly to ground rather than the output terminal, resulting in Output = .
When Input , internal resistance to ground is extremely large, forcing current to flow out through the output line, resulting in Output = .
Logic Rule: Flips the binary input signal (, ).
NAND Gate (NOT-AND):
Implementation: Inverts the result of an AND gate.
Operation: If both inputs are , current flows directly to ground, producing an output of . If either or both inputs are , the path to ground is blocked, forcing current to the output terminal to produce .
XOR Gate (Exclusive OR):
Logic Rule: Yields an output of if inputs are different (). Yields an output of if inputs are identical ().
Truth Tables and Proofs:
A Truth Table lists all mathematically possible input combinations alongside their corresponding output values.
Truth tables serve as definitive mathematical proofs for validating hardware gate logic and circuit behavior.
Binary Number Systems and Bit Calculations
Bit Capacities and Range Calculations:
represents possible states ( or ).
To represent distinct values or states, the minimum required bits satisfies the inequality .
Example 1 (31 Distinct States): To represent numbers through ( total values), are required, as total states ( to ).
Example 2 (1 Byte / 8 Bits): . The total number of distinct numerical representations is (ranging from to in unsigned binary).
Hardware and Memory Architecture Calculations:
() can represent unique integer addresses or states using only .
Memory Conversion Constants:
Memory Bit Computation:
.
Addressing every individual byte within a memory chip requires exactly (or ).
Circuit Logic and Binary Arithmetic
Schematic Symbols for Gate Diagrams:
AND Gate: Curved D-shape symbol.
OR Gate: Curved pointed shield shape symbol.
NOT Gate: Triangle pointing right with an output circle (bubble).
NAND / NOR Gates: Standard AND/OR shapes appended with an inverted output circle bubble.
Binary Addition Fundamentals:
Binary addition follows positional base-2 arithmetic rules with carries occurring upon reaching ():
(Sum bit = , Carry bit = )
Example 1 (2-bit Addition): Add :
Column 1 (right): with Carry Out = .
Column 2 (left): (Sum bit = , Carry Out = ).
Final Result = (Decimal ).
Example 2 (4-bit Addition): Add :
Bit 0: , carry
Bit 1: , carry
Bit 2: , carry
Bit 3:
Final Result = (Decimal ).
1-Bit Full Adder Truth Table:
To implement binary addition in hardware circuits, a truth table mapping inputs , , and Carry-In () to output Sum () and Carry-Out () is constructed:
Input | Input | Input | Output Sum () | Output Carry-Out () |
|---|---|---|---|---|
Note on Single-Bit Sum: The 1-bit addition sum without carry matches the XOR gate truth table exactly.
Circuit Logic Analysis Examples:
Case 1: Circuit expression (A \text{ AND } B) \text{ OR } C$. If $C = 1$, the output is guaranteed to be 1AB01.\n * *Case 2:* Circuit expression (A ext{ AND } B) ext{ AND } (C ext{ AND } D)$. For output to be , all four inputs must be set to ().
Case 3: Circuit expression (A \text{ OR } B) \text{ AND } (C \text{ OR } D)$. For output to be 1{A, B}1{C, D}1.\n\n# Advanced Control Circuits: Multiplexers and Decoders\n\n* **Majority Function Circuit (3 Inputs, 1 Output):**\n * **Objective:** Design a circuit with three inputs (A, B, C11 ("majority rules").\n * **Truth Table:**\n\n| Input ABC | Output |\n| :---: | :---: | :---: | :---: |\n| 0000 |\n| 0010 |\n| 0100 |\n| 0111 |\n| 1000 |\n| 1011 |\n| 1101 |\n| 1111 |\n\n* **Multiplexer (MUX):**\n * **Definition:** A combination circuit that selects one of several data input signals and forwards the selected input to a single output line based on a control signal.\n * **2-to-1 Multiplexer Architecture:**\n * **Inputs:** Data inputs ABS.\n * **Operational Logic:**\n * When Select S = 0AB is blocked).\n * When Select S = 1BA is blocked).\n * **CPU Application:**\n * Multiplexers implement conditional programming constructs like `if-else` blocks and `while` loop controls.\n * Because CPUs have no massive long-term storage and load instructions sequentially, multiplexers select which instruction path or branch to execute next based on boolean flag evaluations (e.g., checking if loop counter I < 5 is True or False).\n\n* **Decoder Circuit:**\n * **Definition:** A logic circuit that converts an N ext{-bit}2^N unique output lines, activating exactly one output line at a time.\n * **2-to-4 Line Decoder Architecture:**\n * **Inputs:** 2 ext{ binary lines}A, B).\n * **Outputs:** 4 ext{ output lines}Y_0, Y_1, Y_2, Y_3).\n * **Truth Table:**\n\n| Input ABY_0Y_1Y_2Y_3 |\n| :---: | :---: | :---: | :---: | :---: | :---: |\n| 001000 |\n| 010100 |\n| 100010 |\n| 110001 |\n\n* **System Scale Applications:**\n * A 3 ext{-input}2^3 = 8 unique outputs.\n * An 8 ext{-input}2^8 = 256 unique outputs.\n * A 32 ext{-input}2^{32} = 4,294,967,2964 ext{ GB} memory chip.
Questions & Discussion
Question regarding Collector and Base states during system startup:
Prompt: When starting the computer, signal flows through the collector. If nothing is pressed and the computer just turns on, is current still blocked at the base?
Response: It depends on system design. It is not always blocked or set to zero because upon booting, the display powers on, the operating system executes, and numerous background system processes actively run. Control bases are driven automatically by running software programs or external hardware controls.
Question regarding Enter key data size and transistor counts:
Prompt: Pressing any button on a keyboard is one byte, which means eight bits or eight binary numbers. So when pressing Enter, how many transistors work on that?
Response: Exactly eight transistors are required to process the eight bits of input data representing the character.
Question regarding Truth Tables vs. Logical Graphs:
Prompt: Instead of analyzing the logic on a schematic graph, can a truth table be used to check all statements and prove a gate?
Response: Yes. A truth table mathematically lists every single possible input combination alongside its resulting output. Testing every combination against expected outputs validates and proves the functional identity of a gate or circuit design.
Question regarding Truth Table variable inclusion:
Prompt: When constructing a truth table for addition, do we exclude C$$ if there are three variables?
Response: All active variables driving inputs must be included in the truth table matrix to map all possible system states.
Question regarding Majority Output rules in homework tables:
Prompt: In a row with inputs
0 1 1, the output becomes1. Is that because1is the dominant value in that row?Response: Yes. If ones dominate the input set for a row (meaning at least two inputs are set to
1), the output yields1. If zeros dominate, the output yields0.