๐Ÿ–ฅ๏ธ Computer Registers

Essential Storage Elements - High-speed storage locations within the CPU that are crucial for processing information

๐Ÿ’พ What are Computer Registers?

Computer registers are high-speed storage locations within the CPU that hold data and addresses needed for quick access during computations and instruction execution. They are the fastest form of storage in a computer system.

Types of Data Stored:

  • Numbers: Used in arithmetic computations
  • Letters: For data processing (binary-coded)
  • Addresses: Memory locations
  • Instructions: Program code being executed

๐Ÿ”ข Number Representations

Registers use different methods to represent signed numbers:

Signed-Magnitude
Sign bit (0=+, 1=-) + magnitude
1's Complement
Complement all bits including sign
2's Complement
Most common method in modern computers

๐ŸŽฏ Key Registers in a Basic Computer

Click on each register to learn more about its function:

Data Register (DR)
16 bits
Holds memory operand - data fetched from or to be stored in memory
Address Register (AR)
12 bits
Holds memory addresses (2ยนยฒ = 4096 possible locations)
Accumulator (AC)
16 bits
Primary processor register for arithmetic and logic operations
Instruction Register (IR)
16 bits
Holds the instruction code currently being executed
Program Counter (PC)
12 bits
Holds address of next instruction to be fetched
Temporary Register (TR)
16 bits
Holds temporary data during program execution
Input Register (INPR)
8 bits
Holds input character from external devices
Output Register (OUTR)
8 bits
Holds output character for external devices

๐Ÿ”ง Interactive Binary Converter

Practice converting numbers between different representations:

Results will appear here...

Enter a decimal number and click "Convert" to see:
  • Binary representation
  • Signed-magnitude
  • 1's complement (for negative numbers)
  • 2's complement (for negative numbers)

โšก Micro-operations on Registers

Elementary operations performed on register data using Register Transfer Language (RTL):

Register Transfer
R2 โ† R1
If (P = 1) then (R2 โ† R1)
Arithmetic Operations
R3 โ† R1 + R2
R3 โ† R1 - R2
R1 โ† R1 + 1
Logic Operations
F โ† A โˆง B (AND)
F โ† A โˆจ B (OR)
F โ† A โŠ• B (XOR)
F โ† A' (Complement)
Shift Operations
R โ† shl R (Shift Left)
R โ† shr R (Shift Right)
R โ† cil R (Circular Left)
R โ† ashr R (Arithmetic Right)

๐Ÿง  Knowledge Check Quiz

๐ŸŽจ Register Visualization

Click on registers to see their bit representation:

DR (16-bit)
AR (12-bit)
AC (16-bit)
PC (12-bit)
Start Learning Common Bus System