Presentation is loading. Please wait.

Presentation is loading. Please wait.

Registers.

Similar presentations


Presentation on theme: "Registers."— Presentation transcript:

1 Registers

2 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).

3

4 Where is the location of registers

5

6 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.

7 Types of Registers

8 Videos How CPU works: https://www.youtube.com/watch?v=cNN_tTXABUA
Inside the CPU: Inside Microchip:

9 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

10 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.

11 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??

12 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.

13 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).

14 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.

15

16 Bidirectional register with Parallel Load (Universal Shift Register)
Construction:

17 Universal Shift Register Function Table

18

19 Shift register Toshiba TC4015BP - Dual 4-Stage Static Shift Register (with serial input/parallel output)

20 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.

21 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

22 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

23 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.

24 Solve this 64K X 10 memory ???

25 Types of memories RAM : Random Access Memory Construction: Operations:
Data input Lines Data output lines, Address selection lines, Control lines that specify the direction of transfer Operations: Write read

26 RAM Operations Steps of transferring a new word to be stored into memory (Write): Apply the binary address of the desired word to the address lines. Apply the data bits that must be stored in memory to the data input lines. 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.

27 Types of memories ROM: Read Only Memory m x n ROM: m: number of words.
n: number of bits per word.

28


Download ppt "Registers."

Similar presentations


Ads by Google