A Comprehensive Guide to Computer Architecture Fundamentals
In a digital system, especially a CPU, we need a way to store data temporarily while it is being processed.
That's why we group flip-flops into Registers, which can store multi-bit binary numbers inside the CPU.
A Register is a group of flip-flops connected together, designed to store and transfer binary data.
Registers are the fastest storage elements in a digital system, even faster than cache or RAM, because they are built directly inside the CPU.
Registers can be classified by how data is loaded and read:
Data is loaded all at once (parallel) into the register. Data is also read out in parallel.
Example: Temporary storage of operands in ALU.
Data enters 1 bit at a time serially (with each clock). Data is also shifted out 1 bit at a time.
Example: Used in communication systems for bit-by-bit transfer.
Data enters serially (bit by bit). After all bits are loaded, the register outputs the data in parallel.
Example: Receiving serial data (like UART) and converting it for CPU.
Data is loaded in parallel. Then shifted out serially one bit at a time.
Example: Sending data serially over a communication line.
Inside the processor, registers are not only storage elements but also control execution.
Some key registers in a CPU include:
Stores results of arithmetic/logic operations.
Holds the memory address of the next instruction.
Stores the current instruction being executed.
Holds the address to access in memory.
Stores data being read from or written to memory.
Temporary data storage for programs.
Used in arithmetic and logical operations to hold intermediate results.
Control flow depends on PC, IR, etc.
Registers act as buffers between CPU and memory.
Registers are used to implement program counters and loop counters.
Used for serial-to-parallel and parallel-to-serial conversion.
Imagine an 8-bit register built from 8 flip-flops:
This is like a temporary notepad inside the CPU: instructions and data are written, read, and cleared at very high speed.
A flip-flop is like a single notebook page (1 bit).
A register is like a small notebook (many bits) inside the CPU.
It stores data temporarily so the CPU can work at lightning speed.
Registers are small, high-speed storage units in digital electronics.
Example: A 4-bit register made of 4 flip-flops can hold any 4-bit binary number (e.g., 1011).
Registers that can shift data bit-by-bit either left or right, controlled by clock pulses.
Useful in serial-to-parallel or parallel-to-serial conversion.
Data enters bit by bit (serially) and exits bit by bit.
Example: Storing 1111 requires 4 clock cycles (one per bit).
Data enters serially, but after loading, all outputs appear in parallel.
Example: Input 1011 serially → after 4 cycles, outputs show 1011 together.
Data is loaded in parallel (all at once) and then shifted out serially.
Has two modes:
Data is loaded in parallel and also output in parallel.
Example: Input 1011 → one clock pulse → output 1011.
Very fast because it works all at once.
Store and output data in parallel form.
Found in:
Suitable for high-speed processing since input and output occur simultaneously.
Design: Built using flip-flops (D flip-flops are common) + control logic for shifting/loading.
Operation:
Example: In a 4-bit SIPO register, serial input 1011 is entered bit-by-bit → after 4 clock cycles, all bits appear at once as output.
Hold temporary values in CPUs and ALUs.
Example: Accumulator register stores intermediate results.
Used for shifting, rotating, and buffering data.
Example: Serial-to-parallel conversion in communication systems.
Between CPU and memory or CPU and I/O devices.
Registers are often used in counters, timers, and control logic.
RTL is a design representation that shows how data moves between registers under control of the clock and logic.
Used in hardware description languages (HDL) like Verilog or VHDL.
Example: R1 ← R2 + R3 means the sum of R2 and R3 is transferred into R1.
4-bit SIPO Shift Register converting serial to parallel:
| Clock | Serial In | Register Content (Q3Q2Q1Q0) | Output |
|---|---|---|---|
| 1 | 1 | 0001 | - |
| 2 | 0 | 0010 | - |
| 3 | 1 | 0101 | - |
| 4 | 1 | 1011 | 1011 |
After 4 pulses → output is available in parallel (1011).