Device - Register

74hc00 Circuit


Register is a hardware device component that is used for two purposes:

The term is often used to refer only to the group of registers that are directly encoded as part of an instruction, as defined by the instruction set. More properly, these are called the “architectural registers”.

Zoom of CPU register of the Z80 processor (Source)

Z80 Registers



In a CPU, most registers are used as high-speed storage for temporary data.

They are also memory location.

It is a small amount of storage available on the CPU whose contents can be accessed more quickly than storage available elsewhere.

Processor registers are at the top of the memory hierarchy, and provide the fastest way for a CPU to access data.

Allocating frequently used variables to registers can be critical to a program's performance. This action (register allocation) is performed by a compiler in the code generation phase.

Hierachy Storage


A software can control a hardware device via its register by:

  • writing to them
  • or receiving information from them

Every devices controlled by the CPU have a set of registers for interfacing with the CPU. Processor registers are located inside the processor.

Each register typically holds a word of data (from 8-bit to 128 bit). CPU instructions instruct the arithmetic and logic unit (ALU) to perform various calculations or other operations on this data (or with the help of it).

The CPU can compute an addition by:

  • placing the two numbers into two separate registers
  • compute the sum and saved it in a third register.

Example of assembly code - Copy a block of memory from one location to another with the 16bit - general purpose register.

; Entry registers
;       BC - Number of bytes to copy
;       DE - Address of source data block
;       HL - Address of target data block
; Return registers
;       BC - Zero

            org     1000h       ;Origin at 1000h
memcpy      public
            mov     a,b         ;Test BC,
            ora     c           ;If BC = 0,
            rz                  ;Return
loop:       ldax    d           ;Load A from (DE)
            mov     m,a         ;Store A into (HL)
            inx     d           ;Increment DE
            inx     h           ;Increment HL
            dcx     b           ;Decrement BC (does not affect Flags)
            mov     a,b         ;Test for done
            ora     c           ;B | C = 0 and done
            jnz     loop        ;Repeat loop until BC = 0

Documentation / Reference

Discover More
System Metrics
CPU - (Metrics|Counter)

This page is counter / metrics for a CPU All metrics are System metrics. System Performance counters are CPU hardware registers that count hardware events such as instructions executed and cache-misses...
Cpu Moore Law Transistor
CPU - Word

A word is a fixed-sized piece of data processed as a unit by the processor. The word size is defined in the instruction set architecture. The term word is used for a small group of bits that are handled...
Cpu Moore Law Transistor
Computer - Central processing unit (CPU)

A CPU is just a device name that indicate a device that controls a computer system. A CPU is also known as: a or The fundamental operation of most CPUs, regardless of the physical form they take,...
74hc00 Circuit
Computer - Device

A device is any machine or component that can perform an operation. It is built upon logic gates and therefore only (accept|understand) a series of 0 and 1. The first device was a transistor. ...
Card Puncher Data Processing
Computer - Storage Device (Media)

A storage device is a that stores byte: machine instructions byte data byte It is an array of circuits that saves bit state (0 or 1). A storage device can be anything that can store and retrieve...
74hc00 Circuit
Device - Driver

A device drivers is a software that control the device via its interface (ie register and port).
74hc00 Circuit
Device - Port

A port is a device interface A port does not store data as a register, but delegate data to some other circuit. When data are written to a port, it causes its hardware device to perform some operation...
Card Puncher Data Processing
Instruction - Execution (Execution environment)

A execution environment is an environment that provides the facility to make instruction executable. It's a sort of context at the computer device level. Execution is the third step in a instruction...
Card Puncher Data Processing
Instruction Set Architecture (ISA)

An describe the computer architecture at the highest level. It's the design of an environment that implements an instruction set. An ISA is implemented by a programmable device, the most common being...
Card Puncher Data Processing
Language - Assembly (asm)

Assembly language is a low-level programming language. It's a the second generation of language just above machine language. This language is a much more readable language than machine language because...

Share this page:
Follow us:
Task Runner