REGISTERS:- bits for a processor. It sets and

REGISTERS:-Registers arecircuits typically composed of flipflops,often with many characteristics similar to memory,such as: The ability to read or write multiple bits at a time, and Using an address to select a particular register in a manner similar to a memory address.Theirdistinguishing characteristic, They also have special hardware-related functions beyond those of ordinary memory. Also may only use to store data.Thereare two kind of registers:- General Purpose Registers ii) Special Purpose RegisterGENERALPURPOSE REGISTERS These registers are user accessible and each register can hold 8 bit of data. When we want to load/store data of more than 8 bit then these can be used as pair.

CommonGPR are: – B, C, D, E, H and L.Pairing:- B-C, D-E, H-L.SPECIALPURPOSE REGISTERS These registers have some specific task to perform. In it each register is assign to unit or grouped such that to make a functional unit. These category is further divided into two categories:- User Accessible ii) User Inaccessible Useraccessible special purpose registerAsname suggests, they could be used by the user for storing data or toperform the various tasks. The user accessible SPR are Accumulatorand Status Register (Flag Register). Accumulator isa register inwhich intermediate arithmeticand logic resultsare stored.

Best services for writing your paper according to Trustpilot

Premium Partner
From $18.00 per page
4,8 / 5
4,80
Writers Experience
4,80
Delivery
4,90
Support
4,70
Price
Recommended Service
From $13.90 per page
4,6 / 5
4,70
Writers Experience
4,70
Delivery
4,60
Support
4,60
Price
From $20.00 per page
4,5 / 5
4,80
Writers Experience
4,50
Delivery
4,40
Support
4,10
Price
* All Partners were chosen among 50+ writing services by our Customer Satisfaction Team

If we won’t have accumulator then we have to store the result somewhere else or in main memory. Access to main memory is slower than access to a register like the accumulator because the technology used for the large main memory is slower (but cheaper) than that used for a register.StatusRegister isa collection of status flag bits fora processor.It sets and resets itself according to the result obtained in accumulator after arithmetic or logical operations for the further processing in the processor. There are common 4 types of flags:-Zero flag: – If it’s high or set to 1 then it indicates that the result of an arithmetic or logical operation (or, sometimes, a load) was zero. Otherwise it will set to 0. Carry flag: – Enables numbers larger than a single word to be added/subtracted by carrying a binary digit from a less significant word to the least significant bit of a more significant word as needed.Ifit is high (i.

e. 1), it means the bits of result is more thancapacity of accumulator. Itis also used to extend bitshifts androtates in a similar manner on many processors (sometimes done via adedicated X flag).Sign flag (or Negative flag): – Indicates that the result of a mathematical operation is negative. In some processors, the N and S flags are distinct with different meanings and usage.Oneindicates whether the last result was negative whereas the otherindicates whether a subtraction or addition has taken place.Overflow flag: – Indicates that the signed result of an operation is too large to fit in the register width using two’s complement representation.Other kind of flags: – Half carry flag/ Auxiliary flag: – Indicates that a bit carry was produced between the nibbles (typically between the 4-bit halves of a byte operand) as a result of the last arithmetic operation.

Sucha flag is generally useful for implementing BCD arithmeticoperations on binary hardware. Parity flag: – Indicates whether the number of set bits of the last result is odd or even. It its high (i.e. 1), it means that there is even parity and vice versa.

Interrupt flag: – On some processors, this bit indicates whether interrupts are enabled or masked.NOTE:- All these flags are in different-different combinations indifferent microprocessor. STACKS:- A stack register is a computer central processor register whose purpose is to keep track of a call stack. On an accumulator-based architecture machine, this may be a dedicated register such as SP (Stack- pointer). In stack pointer the last program’s request is stored. It stores the data on the top of it.

Whenever a new request appears it pushes down the previous data and store the new one the top of it.OTHERREGISTERS: – Data register: – hold the data read from the memory. Address register: – hold the memory address of the data that would be used further in any operation.

Instruction register: – hold the current instruction i.e. to be proceed.

Input and Output register: – it will hold the character received from the input device and output resister hold the character that has to be sent to an Output device. SI register: – it will hold index of the source memory.ARITHMETICLOGICAL UNIT (ALU):-An arithmetic logic unit (ALU) is a combinational digital electronic circuit that performs arithmetic and bitwise operations on integer binary numbers. ALU is a fundamental building block of many types of computing circuits, including the central processing unit (CPU) of computers, FPUs, and graphics processing units (GPUs). A single CPU, FPU or GPU may contain multiple ALUs.

The inputs to an ALU are the data to be operated on, called operands, and a code indicating the operation to be performed; the ALU’s output is the result of the performed operation. In many designs, the ALU also has status inputs or outputs, or both, which convey information about a previous operation or the current operation, respectively, between the ALU and external status registers.Operationsperformed by ALU: -Add: A and B are summed and the sum appears at Y and carry-out. Add with carry: A, B and carry-in are summed and the sum appears at Y and carry-out. Subtract: B is subtracted from A (or vice versa) and the difference appears at Y and carry-out. For this function, carry-out is effectively a “borrow” indicator. This operation may also be used to compare the magnitudes of A and B; in such cases the Y output may be ignored by the processor, which is only interested in the status bits (particularly zero and negative) that result from the operation. Subtract with borrow: B is subtracted from A (or vice versa) with borrow (carry-in) and the difference appears at Y and carry-out (borrow out).

Two’s complement (negate): A (or B) is subtracted from zero and the difference appears at Y. Increment: – A (or B) is increased by one and the resulting value appears at Y. Decrement: – A (or B) is decreased by one and the resulting value appears at Y. Pass through: – all bits of A (or B) appear unmodified at Y.

This operation is typically used to determine the parity of the operand or whether it is zero or negative, or to load the operand into a processor register. Bitwiselogical operations AND: the bitwise AND of A and B appears at Y. OR: the bitwise OR of A and B appears at Y. Exclusive-OR: the bitwise XOR of A and B appears at Y.

Ones’ complement: all bits of A (or B) are inverted and appear at Y.BitShift operations:-ALUshift operations cause operand A (or B) to shift left or right(depending on the op-code) and the shifted operand appears at Y.Simple ALUs typically can shift the operand by only one bit position,whereas more complex ALUs employ barrelshifters thatallow them to shift the operand by an arbitrary number of bits in oneoperations. Arithmetic shift: the operand is treated as a two’s complement integer, meaning that the most significant bit is a “sign” bit and is preserved. Logical shift: a logic zero is shifted into the operand.

This is used to shift unsigned integers. Rotate: the operand is treated as a circular buffer of bits so its least and most significant bits are effectively adjacent. Rotate through carry: the carry bit and operand are collectively treated as a circular buffer of bits.CONTROLUNITThe control unit (CU) is a component of a computer’s central processing unit (CPU) that directs the operation of the processor. It tells the computer’s memory, arithmetic/logic unit and input and output devices how to respond to a program’s instructions. It directs the operation of the other units by providing timing and control signals. Most computer resources are managed by the CU. It directs the flow of data between the CPU and the other devices.

FUNCTIONS:-The Control Unit (CU) is digital circuitry contained within the processor that coordinates the sequence of data movements into, out of, and between a processor’s many sub-units. The result of these routed data movements through various digital circuits (sub-units) within the processor produces the manipulated data expected by a software instruction (loaded earlier, likely from memory). It controls (conducts) data flow inside the processor and additionally provides several external control signals to the rest of the computer to further direct data and instructions to/from processor external destinations (i.e. memory).INSTRUCTIONTYPES: -Instructionis a command or statement that is given to computer (processor) toperform a specific task or operation. Andset or group of instruction in a correct manner is program.

Formatof Instruction:- An instruction could be of different size and will consist offollowing parts:-Op-code: – It is the special type of code understood by processor to operate itself and given by the user but already defined to processor. Address: – Address will designate a memory address or a processor register for the operand. Mode: – A mode is the field that is responsible for the calculation of effective address.Types:- ZeroAddress Instruction: -An instruction which do not have or do not require an address fieldare known as “zero address instruction”.

So such instruction needthe implied address i.e. within the op-code. Through the impliedaddress the processor can specify the value may be using a stackpointer so that the effective address is automatically incrementedand decremented. Ex: – PUSH A, POP.OneAddress Instruction:- It uses the implied accumulator for all of its operation.

Ex: – ADDA TwoAddress Instruction: -These types of instruction are very common in this each address fieldspecify either a processor register or a memory operand. Ex: – ADDR1, A.ThreeAddress Instruction:- these instruction use each address field to specify a register or amemory location. Ex: – ADD R1, A, B.R1?M A + M B {MA- memory address of A and MB- memory address ofB}INSTRUCTIONSETS:- Instruction sets are divided in the groups depending upon thefunction they perform. The various kind are described below: – 1.DataTransfer Instruction:- They are instructions that are used to transfer the data from onememory/register location to another without changing the content ofdata.

Most commonly used data transfer instructions are: – LOAD STORE MOVE EXCHANGE INPUT OUTPUT PUSH POP Someof the system may change the mnemonic code to specify immediateaddressing mode as in this mode usually the last alphabet of code is”I”.

x

Hi!
I'm Morris!

Would you like to get a custom essay? How about receiving a customized one?

Check it out