Monday 5 February 2018

CLASS :SS2 WEEK/PERIOD:ONE TOPIC/TITLE Computer Data Conversion 1

CONTENT Definition of register: Register are used to quickly accept, store, and transfer data and instructions that are being used immediately by the CPU, there are various types of Registers those are used for various purpose. Some mostly used Registers named AC or Accumulator, Data Register or DR, the AR or Address Register, program counter (PC), Memory Data Register (MDR) ,Index register, Memory Buffer Register. These Registers are used for performing various Operations, while we are working on the System. Registers are used by the CPU for Performing the Operations. When We Gives Some Input to the System, the Input will be Stored into the Registers and When the System is giving Results after Processing, the Result will also be from the Registers. Therefore they are used by the CPU for Processing the Data which is given by the User. Types of Registers:  MAR (MEMORY ADDRESS REGISTER) : This register holds the memory addresses of data and instructions. This register is used to access data and instructions from memory during the execution phase of an instruction. Suppose CPU wants to store some data in the memory or to read the data from the memory. It places the address of the-required memory location in the MAR.  Memory Data Register (MDR) : MDR is the register of a computer's control unit that contains the data to be stored in the computer storage (e.g. RAM), or the data after a fetch from the computer storage. It acts like a buffer and holds anything that is copied from the memory ready for the processor to use it. MDR hold the information before it goes to the decoder. MDR which contains the data to be written into or readout of the addressed location. For example, to retrieve the contents of cell 123, we would load the value 123 (in binary, of course) into the MAR and perform a fetch operation. When the operation is done, a copy of the contents of cell 123 would be in the MDR. To store the value 98 into cell 4, we load a 4 into the MAR and a 98 into the MDR and perform a store. When the operation is completed the contents of cell 4 will have been set to 98, by discarding whatever was there previously.  Index Register (IR): A hardware element which holds a number that can be added to (or, in some cases, subtracted from) the address portion of a computer instruction to form an effective address. Also known as base register. An index register in a computer's CPU is a processor register used for modifying operand addresses during the run of a program.  CURRENT INSTRUCTION REGISTER (CIR): This holds the current instruction to be executed having being fetched from the memory.  INSTRUCTION REGISTER (IR): is the part of a CPU's control unit that stores the instruction currently being executed or decoded DIFFERENCES BETWEEN REGISTER AND MEMORY Registers are storage locations internal the processor. CPU instructions operate on these values directly. On RISC processors, all data must be moved into a register before it can be operated. On CISC (Intel) chips, there are a few operations that can load data from RAM, process it, and save the result back out, but the fastest operations work directly with registers. Also, there are registers that are set aside for certain tasks, these generally include a program counter, stack, and flags. Each register also has a size that determines the maximum amount of data that can be processed at a time. The registers on Pentium chips, for example, are 32 bits. Finally, there are generally only a few registers available on a processer. Intel chips, for example, have 6 general purpose registers, and several specialized registers including a base register, stack register, flags register, program counter, and some addressing registers. Memory, or RAM, is located external to the CPU. Generally speaking, data has to be loaded into a CPU register from memory before the CPU can process it, RAM is much slower than registers, there is a lot more RAM than registers, and generally memory can be addressed on byte boundaries, where registers may not be able to access all the bytes in a register. To summarize: in general, registers are temporary storage in the CPU that holds the data the processor is currently working on, while RAM holds the program instructions and the data the program requires.