COMPUTER DATA CONVERSION.docx
Document Details
Uploaded by AwedAntigorite
Tags
Full Transcript
**COMPUTER DATA CONVERSION** **Register**: the term register can be defined as a high-speed storage location in the Central Processing Unit (CPU), which is used to hold data and addresses to be processed by the computer. A register may hold a computer instruction, a storage address or any kind of d...
**COMPUTER DATA CONVERSION** **Register**: the term register can be defined as a high-speed storage location in the Central Processing Unit (CPU), which is used to hold data and addresses to be processed by the computer. A register may hold a computer instruction, a storage address or any kind of data. A register must be large enough to hold an instruction. For example, in a 32-bit instruction computer, the register must be 32-bit wide. **Address**: an address is a name, label or number that identifies a location where data or information is stored within the computer memory. It is a particular location holding a word or a byte. Computer memory is an array of storage boxes; each of these storage boxes is one byte in length. Each box has an address (a unique number) to it. **Bus**: In digital computing, a bus is a set of physical connections (cables, printed circuits etc.), which can be shared by multiple hardware components in order to communicate with one another. It is a transmission path on which signals are dropped off or picked up at every device attached to the line. The purpose of buses is to reduce the number of PATHWAYS needed for communication between the components by carrying out all communication over a single data channel. **There are generally two types of buses:** **Internal (System) bus**: the internal bus enables communication between internal components such as the memory and the video card. It connects the CPU to the main memory. It is also called Front Side Bus (FSB) or memory bus. **External/expansion bus**: this bus is capable of communicating with the external components or peripheral devices. These devices connect to the internal bus via a bridge implemented in the processor chipset. It is also called input/output bus. The lines or pins of a bus are of three types: **Address** - the components pass memory addresses to one another over the address bus. **Control** - used to send out signals to coordinate and manage the activities of the motherboard components. **Data** - transferred between peripherals, memory and the CPU. Obviously, the data bus can be a very busy pathway. **Types of registers and their functions** **Memory Data Register (MDR)** This is the register that contains the *data to be stored in the computer memory* or the *data fetched from memory and ready to be processed by the CPU*. It acts like a buffer and holds anything that is copied from the memory ready for the processor to use it. **Current Instruction Register (CIR)** This is part of the CPU's control unit that *stores the instruction currently being executed or decoded.* **Memory Address Register (MAR)** This is the CPU register that either *stores the memory address from which data will be fetched to the CPU or the address to which data will be sent and stored.* In other words, MAR holds the memory location of the data that need to be accessed. When reading from memory, data addressed by MAR are fed into the MDR and then used by the CPU. When writing to memory, the CPU writes data from MDR to the memory location whose address is stored in MAR. **Difference between register and main memory** **Register** **Main memory** -------------------------------------------------------------------- ------------------------------------------------------------------- Registers are internal, i.e. they are located inside the processor Main memory is external, i.e. it is located outside the processor They are very fast It is slow **FETCH-EXECUTE CYCLE** Most modern processors work on the FETCH-EXECUTE principle. It is based on the Von Newman Architecture. When a set of instructions is to be executed, the instructions and data are loaded in main memory. The address of the first instruction is copied into the program counter. The execution of an instruction by a processor is divided in three parts. These parts are fetching, decode and execute. **Fetch the next instruction** The program counter (PC) contains the address of the next instruction to be executed, so the control unit goes to the address in memory specified in the PC, makes a copy of the contents and places the copy in the Current Instruction Register (CIR). **Decode the instruction** The next step is for the CPU to interpret the instruction that has just been fetched and stored in the CIR. The CPU is designed to understand specific set of commands called "instruction set" of the CPU. Each make of CPU has a different instruction set. The CPU decodes the instruction and prepares various areas within the chip in readiness of the next step. **Get data if needed** It may be that the instruction to be executed requires additional memory accesses in order to complete its task. For example, if the instruction says to add the content of the memory to a register, the control unit must get the content of the memory location. **Execute the instruction** Once an instruction has been decoded and any data fetched, the control unit is ready to execute the instruction. If the instruction involves arithmetic operation or involves comparison, the ALU is called upon to handle this and send the result to a special register (Accumulator) before being moved to the memory. The control unit increment the value in the program counter by 1 and the cycle begins again. **Factors affecting speed of data transfer** **Bus speed:** The term \"bus speed\" refers to how quickly the system bus can move data from one computer component to the other. The faster the bus, the more data it can move within a given amount of time. It is measured in Hertz. **Bus width:** The size of a bus, known as its width, is important because it determines how much data can be transmitted at one time. For example, a 16-bit bus can transmit 16 bits of data, whereas a 32-bit bus can transmit 32 bits of data.