Memory Buffer Register
Total Page:16
File Type:pdf, Size:1020Kb
Philadelphia University Department of Computer Science By Dareen Hamoudeh 1.REGISTERS WHAT IS REGISTER? register is a quickly accessible location available to a computer's central processing unit (CPU). Register are used to quickly accept, store, and transfer data and instructions that are being used immediately by the CPU. Almost all computers, load data from a larger memory into registers where it is used for arithmetic operations and is manipulated or tested by machine instructions. Manipulated data is then often stored back to main memory. Processor registers are normally at the top of the memory hierarchy, and provide the fastest way to access data. A register may hold an instruction, a storage address, or any kind of data (such as a bit sequence or individual characters). WHERE IS THE LOCATION OF REGISTERS TYPES OF REGISTERS There are various types of Registers those are used for various purpose. Among of the some Mostly used Registers named as MAR: Memory Address Register AC : Accumulator. DR: Data Register. AR: Address Register. PC: Program counter. MDR: Memory Data Register. Index register Memory Buffer Register. http://ecomputernotes.com/fundamental/input-output-and-memory/what-is-registers-function-performed-by-registers-types-of-registers TYPES OF REGISTERS VIDEOS How CPU works: https://www.youtube.com/watch?v=cNN_tTXABUA Inside the CPU: https://www.youtube.com/watch?v=r9gLVYkQy3Q Inside Microchip: https://www.youtube.com/watch?v=GdqbLmdKgw4 REGISTER CONSTRUCTION. Registers are normally measured by the number of bits they can hold, for example, an “8-bit register” or a “32- bit register”. A register is simply is: a collection of edge triggered flip-flops( each is capable to store one bit only). May have combinational gates that perform certain tasks. So, flip-flops hold the binary information, and gates control how/when new information transferred to the register. 4- bit register 4 BIT REGISTER 4 D flip-flops. 4 inputs. Clock input. Clear input. Outputs. How does it work: Clock triggers the flip-flops at the rising edge of pulses. Binary data on the inputs transferred to the flip-flops. The outputs sampled to obtain the information stored in the register. Clear input if zero all flip-flops are reset. Loading is transferring new information to the register. REGISTER WITH PARALLEL LOAD digital systems have a master clock generator that supplies a continuous train of clock pulses. pulses are applied to all flip-flops and registers in the system. If all the bits of the register are loaded simultaneously with a common clock pulse. we say that the loading is done in parallel . A separate control signal must be used to decide which register operation will execute at each clock pulse. Can we use gates on the clock inputs?? REGISTER WITH PARALLEL LOAD inserting gates into the clock path means that logic is performed with clock pulses. The insertion of logic gates produces uneven propagation delays between the master clock and the inputs of flip-flops. To fully synchronize the system: all clock pulses must arrive at the same time anywhere in the system. Solution: to control the operation of the register with the D inputs. rather than controlling the clock in the C inputs of the flip-flops. This creates the effect of a gated clock. but without affecting the clock path of the circuit. The additional gates implement a two channel mux whose output drives the input to the register with either the data bus or the output of the register. The load input to the register determines the action to be taken with each clock pulse. Load =1 data at the four external inputs are transferred into the register with the next positive edge of the clock (Loading). Load=0 outputs of the flip-flops are connected to their respective inputs (Hold). SHIFT REGISTER Flip Flops connected in a way that the output of one flip flop could serve as the input of the other flip-flop, depending on the type of shift registers being created. Shift registers are basically a type of register which have the ability to transfer (“shift”) data in one or both directions. BIDIRECTIONAL REGISTER WITH PARALLEL LOAD (UNIVERSAL SHIFT REGISTER) Construction: UNIVERSAL SHIFT REGISTER FUNCTION TABLE SHIFT REGISTER Toshiba TC4015BP - Dual 4-Stage Static Shift Register (with serial input/parallel output) MEMORY UNIT A memory unit is a device to which binary information is transferred for storage and from which information is retrieved when needed for processing. When data processing takes place, information from memory is transferred to selected registers in the processing unit. Intermediate and final results obtained in the processing unit are transferred back to be stored in memory. A memory unit is a collection of cells capable of storing a large quantity of binary information. MEMORY UNIT Memory stores binary information in groups of bits called Words. Memory Word is group of 1’s and 0’s and may represent instruction code, one or more alphanumeric character … Byte is group of 8 bits. Number of bits in a word, is multiple of 8: 16-bit word contains 2 bytes. 32-bit word contains 4 bytes. Structure of memory is specified by the number of words and the number of bits in each word. Each word in memory is assigned an identification number called an address MEMORY ADDRESS Addresses start from 0 up 2k - I. where k is the number of address lines. Memories vary greatly in size: 1024 words = 1024 bytes= 1kilobyte needs 10 address lines (210). M = 220 needs 20 address lines. G = 230 needs 30 address lines. 64K= 216 (64=26 + k=210) 4G= 232 EXAMPLE (1K X 16 memory) has: 10 bits in the address (k=210) and 16 bits in each word. A word in memory is selected by its binary address. When a word is read or written, the memory operates on all 16 bits as a single unit. SOLVE THIS 64K X 10 memory ??? TYPES OF MEMORIES RAM : Random Access Memory Construction: Data input Lines Data output lines, Address selection lines, Control lines that specify the direction of transfer Operations: Write read RAM OPERATIONS Steps of transferring a new word to be stored into memory (Write): 1. Apply the binary address of the desired word to the address lines. 2. Apply the data bits that must be stored in memory to the data input lines. 3. Activate the write input. Steps of transferring a stored word out of memory (Read): 1. Apply the binary address of the desired word to the address lines. 2. Activate the read input. TYPES OF MEMORIES ROM: Read Only Memory m x n ROM: m: number of words. n: number of bits per word. .