Jump to content

Register: Difference between revisions

From Logic World Wiki
DjSapsan (talk | contribs)
Created article about registers
 
(No difference)

Latest revision as of 21:26, 4 October 2025

Register
In Logic World, a register is a small circuit used to store certain number of bits as a single value.
Unlike RAM, it doesn't have multiple independent cells.

It is one of the most basic memory circuits in Logic World and serves as a building block for RAM, CPUs, and many other digital systems. Sometimes registers are called cells.

Overview

A register can store data and output it later on demand. Each register has the following connections:

  1. Data input
  2. Write signal
  3. Read signal

And the output:

  1. Data output
Basic 8-bit register
Basic 8-bit register using D Latches

Registers are often used to hold intermediate results, counters, addresses, or any temporary data in larger circuits. In some cases, the data inside the register is treated as multiple values.

Variants

Simple registers read or write all bits simultaneously. However, there are different variations that differ by design or purpose. Common variants include:

  • Shift register — supports shifting bits inside on command. Variations include shifting to the left, right, or both. Shifting can be rotational or non-rotational.
  • Parallel-in serial-out (PISO) — bits are stored all at once, but read serially, bit by bit.
  • Serial-in parallel-out (SIPO) — bits are stored one by one, but read all at once.
  • Serial-in serial-out (SISO) — bits are stored one by one and read serially, bit by bit.

Construction

Registers are built using trigger or latch components. There are many variants, and any of them can be used to construct a register. The simplest option is the D Latch. A register that stores multiple bits using D Latches is constructed by placing a row of D Latches and connecting all storage and read circuits together. The example is shown in the first screenshot above. Serial variations are constructed by connecting D Latches to each other in series instead of in parallel.

Write operation

When the write input is active, the register copies its data input into its internal storage. The value remains stored even if the write signal is turned OFF.

Read operation

8-bit register
An 8-bit register with read/write controls

All memory elements have the stored bit always active, so for better control over reading, especially when many registers share the same data bus, you may need to add an additional part to actually send the stored data. This is done by attaching outputs to AND gates or relays. In serial-out variations, only the last one element is the output.

Example usage

Registers are essential in circuits that need to remember or reuse values:

  • Holding the current instruction in a CPU
  • Holding bit flags
  • Sending or receiving data over distance
  • Storing a loop counter
  • Acting as temporary memory, like a cache for RAM

See also