COA Tutorial

Computer Organization and Architecture Tutorial Basic Terminologies Related to COA Digital Number System Computer Organization and Architecture Data Formats Fixed and Floating-Point Number IEEE Standard 754 Floating Point Numbers Control Unit Organization Data Path, ALU and Control Unit Micro-Operations CPU Registers Addressing Modes COA: Interrupt and its types Instruction Cycle: Computer Organization and Architecture Instruction Pipelining and Pipeline Hazards Pipelining: Computer Organization and Architecture Machine Instructions 8085 instructions set 8085 Pin Configuration Addressing mode in 8085 microprocessor Advantages and Disadvantages of Flash Memory BCD to 7 Segment Decoder Biconnectivity in a Graph Bipartite Graph CarryLook Ahead Adder Control Signals in 8155 Microprocessor Convert a number from base 2 to base 6 Ethernet Frame Format Local Broadcast Address and loopback address Microprocessor classification Use Case Diagram for the online bank system 8086 Microprocessor Pin Configurations 8255 Microprocessor Operating Modes Flag Register of 8086 Microprocessor Data Transfer and Manipulation 8085 Arithmetic Instructions Assembly Language Register What is Cache Associativity? Auxiliary Memory in COA Associative Memory in Computer Architecture SCSI Bus in Computer Architecture What are Registers in Microprocessor What is Associative Memory 1 Persistent CSMA What is Floating-Point Representation in Computer Architecture? What is a Serial Port in a Computer? What is Cluster Computing What is Batch Processing in Computer

What are Registers in Microprocessor

Registers are used to swiftly accept, store, and send information and commands that are instantly needed by the CPU. There are many sorts of Registers that are used for different purposes. Among the most often used registers are the AC or Accumulator, the Data Registration or DR, the AR or Address registration the program counter (PC), the Memory Data Register (MDR), the Index register, and the Memory Buffer Register.

A microprocessor is a versatile, programmable, clock-driven, register-based electrical device that reads binary instructions from memory, receives binary data as input, processes data according to those instructions, and outputs the results. A microprocessor 8085 is the second-generation 8-bit microprocessor that serves as the foundation for learning and utilizing all microprocessors on the market.

These Registers are utilized to carry out the Operations. When we work on the system, the CPU uses these Registers to do the operations. When we provide the system some input, the input is stored in the registers, and when the system returns the results after processing, the results are likewise stored in the registers.

As a result, they are employed by the CPU to process the data provided by the user. Registers Work:

  • Obtain: The Obtain Operations is used to take the instructions supplied by the user and to obtain the instructions stored in the Main Memory utilizing Registers.
  • Decode: The Decoding Operation serves as the basis for understanding the Instructions, which means the CPU will determine which Operation to conduct on the Instructions.
  • Execute: The CPU performs the Execute Operation. And the results generated by the central processing unit are subsequently saved in memory before being presented on the user's screen.

Types of Registers

Memory Address Register

This register stores data and instruction memory addresses. During the execution step of an instruction, this register is utilized to access information and commands from memory. Assume the CPU want to store data in memory or read data from memory. It stores the needed memory location's address in the MAR.

Counter for Programs

The program counter (PC), also known as the pointer to the instruction (IP) in Intel's x86 microprocessors and often referred to as an instruction address register or simply a component of the instructions sequencer in other systems, is a CPU register.

In the 8085 microprocessor, it is a 16-bit special function register. It keeps track of the preceding memory address of the command that will be performed once the current instruction has been completed. In other words, it stores the address of the next instruction's memory location when the present directive is executed by the CPU.

Register of Accumulators

This Register serves to store the Results generated by the System. When the CPU generates some results after processing, all of the results are stored in the AC Register.

Memory Data Register

MDR is a control unit register that stores data to be saved in computer storage (e.g., RAM) or data following a retrieve from computer storage. It functions as a buffer, storing everything copied from memory for use by the CPU. MDR stores information before it is sent to the decoder.

MDR contains information and to be put into or read from the specified place. To access the data of cell 123, for example, we would enter the number 123 (in a binary, as course) within the MAR and conduct a fetch operation. When the procedure is completed, the MDR will have a duplicate of what's inside of cell 123. We put a four into our MAR then a 98 in the MDR. We then and conduct a store to store the quantity 98 into cell 4. When the process is finished, the data within of cell 4 will be set to 98 by dumping whatever was previously there.

The MDR constitutes a bidirectional register. When data is read from memory and written to the MDR, it is only written in one direction. When a write instruction is issued, the information that needs to be written is transferred from another CPU registers to the MDR, which subsequently stores the data in memory.

The Memory Data Registration is half of a minimum connection among a micro program on computer storage, while the Memory Address Register is the other half.

Register of Indexes

A hardware part that contains a number that may be added to (or removed from) the address section of a computer command to generate an effective address. Base register is another name for it. The index bit in a computer's CPU is a register that is used to change operand addresses while a program is running.


Register for Memory Buffers

MBR is an abbreviation for Memory Buffer Row. This register stores the data or instructions read from or written to memory. That is, this register serves to hold data/instructions arriving from or going to memory.

Register of Data

In microcomputers, a register is used for temporarily storing data being communicated between a computer and a peripheral device.

Why use registers in Microprocessor?

The following are some of the reasons why registers are utilized in microprocessors:

Temporary storage

Registers are utilized as temporary storing areas for data that must be handled by the CPU. When executing arithmetic operations, for example, the operands are often kept in registers.

Addressing

In the 8085 microprocessor, registers are utilized to access memory regions. The stack pointer's (SP) registration keeps track of the highest point of the stack, while the program's counter (PC) register maintains track of the memory address of the current instruction.

Input and Output

Registers are used to exchange data with input and output, or I/O, devices. The accumulator (A) register, for example, is used to communicate with the information bus, which is linked to I/O devices.

Status information

Registers are used to store status information regarding the microprocessor's state. The flag register, for example, contains information about the outcomes of mathematical and logical operations, such as whether the outcome is unfavourable zero, or carry.

Efficiency

Registers are utilized to enhance the microprocessor's performance. By storing frequently utilized data and instructions in registers, the computer's microprocessor is able to access this data more rapidly than if it had to extract it from memory.

Registers in Microprocessor

General Purpose Registers

The 8085 features six general-purpose registers (B, C, D, E, H, and L) for storing 8-bit data. To do certain 16-bit operation, these can be coupled as register pairs - BC, DE, and HL. The registers are used for storing or copy data that is temporary during program execution by employing instructions.

Registers for Specific Purposes

An accumulator is a portion of the algebraic and logic unit (ALU) that is a register with eight bits (can hold 8-bit data). The outcome of arithmetic or logical operations is kept in the accumulator. Register A is another name for Accumulator.

Registers of flags

What are Registers in Microprocessor
  • The flag registration is a special-purpose register that is distinct from the other registers of a microprocessor. It is made up of 8 bits, only 5 of which are usable. The remaining three are left empty and will be used in future Intel versions.After an operation, these 5 flag are set and reset (when the value of the flag is 1, it is deemed to be set, and when the value is 0, it is called to be reset) based on the data condition of what occurs in both the hopper and other variables. The five flag registries are as follows:
  • It takes up the 7th bit in the flag register, generally known as the most important bit. It assists the programmer in determining whether the value saved in the aggregate is either positive or negative. If a sign flag is set, the number in the accumulation is negative; if it is reset, the number is affirmative.
  • The zero flag takes up an extra bit of the flags register. It is set when the ALU operation results in a zero (all eight bits are zero), else it is reset. It aids in assessing if the two numbers are equal.
  • This flag takes up the fourth bit in the flag register. When the third bit generates a carry flag and passes it on via the fourth bit in a calculation, the Auxiliary Carrying flag is set. If the flag is not set, it is reset. Internally, this flag is utilized for BCD (Binary-Coded Decimal Number) procedures. Note that it is the sole flag value in 8085 that the user cannot access.
  • The parity flag takes up an additional bit of the flags register. This flag checks the accumulator for the presence of 1s. If the accumulator has an even number of 1's, this flag is set, and the system is considered to be even parity. However, if the total amount of 1s is odd, it is reset it is referred to as odd parity.
  • It fills the flag register's zeroth bit. Carry Flags is set if the calculation performed produces a carry (if the result is greater than 8 bits); otherwise, it is reset.

Memory Registers

Two 16-bit registers are used to store memory locations. Because addresses for memory are 16 bits long, these registers are 16 bits long.

They are as follows:

  • The program counter is used to organize the execution of instructions. The program counter's job is to point towards the address of memory from which the following bytes is to be retrieved. When a byte of machine code is read, the program count is increased by one to refer to the next memory address.
  • The stack pointer is a memory pointer. It denotes a memory area in read/write memory known as the stack. During push and pop operations, it is typically incremented or decremented by 2.
  • The Sign Flag (7th bit) is reset(0), indicating that the value stored in the accumulation is positive.
  • The Zero Flag (6th bit) is reset(0), therefore the outcome of the ALU operations is non-zero.
  • Auxiliary Carry Flag (4th bit): As we can see, b3 creates a carry that b4 accepts, hence the auxiliary carry flag is set (1).
  • Parity Flag (2nd bit): If it is reset(0), the parity is strange. The accumulator has an odd number of 1s.
  • Carry mark them (0th bit): It has been established(1), indicating that the output is greater than 8 bits.

Microprocessor Register Applications

Here are some popular applications for the various registers of the microprocessor:

  • The accumulator register (A) is the most widely utilized register in the 8085 processor. It performs mathematical and logical calculations, as well as input/output (I/O). The accumulator also serves as a temporary data storage facility.
  • The Program Counter (PC) register keeps track of the RAM location of the present instructions. The computer's register is automatically increased to refer to the following instruction in memory when an instruction is performed.
  • The Stack Pointer (SP) registration is used to maintain a record of the top of the stack. During subroutine calls, the stack is utilized to temporarily store data and return addresses.
  • The flag register stores status information regarding the outcomes of mathematical and logical operations, such as whether the end result is unfavourable zero, or carry.
  • General Purpose Registers (B, C, D, E, H, and L) the registers in this category are used for general data storing as well as memory location addressing. They can be utilized in triplets as 16-bit registers that can be including BC, DE, and HL, to address memory locations more efficiently.
  • The microprocessor uses its Instruction Register (IR) & Machine Cycle Register (MCR) to decode instructions and manage the sequence of machine cycles.

Features of Registers

  • The arithmetic & logic unit (ALU) has direct access to all of the registers of the 8085 CPU, allowing for efficient data processing.
  • The accumulator register serves as the default location for the majority of math and logic instructions, making programming easier.
  • General-purpose registers may be used to store data during calculations as well as addresses for memory, making them helpful for reaching memory locations.
  • The program's counter & stack pointer registers play critical roles in controlling the flow of data and instructions inside a program.
  • The flag register gives useful information about the outcomes of operations involving logic and arithmetic, enabling for more efficient program decision-making.

Advantages

  • Fast access: Registers offer a quick and effective way to retrieve data and conduct actions. Because the registers are placed within the CPU, they may be accessed immediately without waiting for data to be retrieved from memory.
  • Reduced Memory Access: Using registers can help minimize the amount of memory accesses necessary, which can enhance overall system performance.
  • Specialized functionality: The accumulator is used for computation and the program's counters for storing the location of the next instruction are two examples of registers in the 8085 microprocessor. This particular feature can help with programming and debugging.
  • Reduced complexity: The 8085 microprocessor minimizes programming and execution complexity by offering specialized registers for certain functions.

Disadvantages

  • Limited Storage Capacity: Because the 8085 microprocessor contains a limited number more registers, the quantity of data that may be stored and handled at any given moment is limited.
  • Complex Addressing Modes: The 8085 microprocessor's addressing modes may be complex, making programming more challenging.
  • Context Switching: Switching between multiple sets of register can add overhead & complication to the coding process in some instances.
  • Lack of Flexibility: The 8085 microprocessor's set number and operation of registers might limit system flexibility while making it a challenge to adapt to ever-shifting requirements.