Memory Structure in Microprocessor YASH PAL, March 11, 2026March 11, 2026 Memory Structure in Microprocessor – A microprocessor-based system, like a microcomputer, is a small-sized and inexpensive computer. The figure below shows a simplified but formal structure of a microprocessor-based system. A microprocessor-based system must be capable of: Receiving inputs (data and instructions) Storing data and instructions Performing computations (arithmetic and logic) Displaying the results Controlling all the devices that perform the above-mentioned four tasks (directly or indirectly). An input device is a device that enables a microprocessor-based system to receive data and instructions. Typical input devices used are keyboard, mouse, and toggle switches. Structure of Microprocessor-based System Storage of data and instructions is accomplished using memories. Several types of memories are in use. Relatively fast semiconductor memories are the most commonly used ones. Floppy disks, compact disks (CDs), and cassettes are used together with semiconductor memories in relatively large systems. The Arithmetic and Logic Unit (ALU) is responsible for performing the computational operations. The ALU performs arithmetic (addition and subtraction) and logic (AND, OR, Exclusive-OR, and NOT) operations. Results are stored either in registers or in memory. An output device performs the Task of displaying the results computed by the microprocessor. Some commonly used output devices are cathode ray tube (CRT) displays, light-emitting diode (LED) displays, and printers. The last task of controlling the devices is made possible by the microprocessor’s control unit. The control unit provides the appropriate control signal for this purpose. Memory Structure Memory is an essential part of a microprocessor-based system. It stores data and instructions in the form of voltage levels or capacitive charges, representing logic ‘0’ and ‘1’. A latch is a basic element of memory. A block diagram of a latch is shown in the figure below. The latch is enabled by providing an appropriate signal at the enable input (EN) of the latch IC. If the latch is enabled, it behaves like a transparent latch, meaning that the output will be similar to the input. When the latch is disabled, it retains the last available data at the input. The stored data is always available at the output. To avoid unintended changes to the input and to control the availability of the output, two tristate buffers can be used on the latch. This is shown in the figure below. Block diagram of a basic latch with two tristate buffers Now the data can be stored in a latch by enabling the input buffer and retrieved from the latch by enabling the output buffer. The latch shown in the figure below can store only one bit. To store more bits, the number of latches may be grouped. This is known as a register. The figure below shows a simplified block diagram of an 8-bit register with input and output buffers. Eight latches as an 8-bit register If there is more than one register, all the registers are connected in parallel. This configuration is shown in the figure below. 4×8-bit register block diagram To write to or read from any register, a specific register should be identified or selected. This can easily be obtained by using a decoder. The figure below shows an example of four registers with a 2-to-4 decoder. Two more input lines are required for decoding. These are named as address lines. If we have eight registers on one chip, we need three address lines; if we have 16 registers, we need four address lines. Now consider an example of an M × N-bit memory. It means the memory contains M registers, each of size N bits. The data can be accessed from memory using K address lines (A0 to Ak-1), where M=2k. K = log2 M The data lines are equal to N. Note: In practical cases, a memory chip also has an enable pin. If this is active high, it is generally written as EN; else it is represented by CS. Let’s take an Example to determine the number of address and data lines for a 1024 × 8-bit memory. Solution: For 1024 x 8-bit memory Number of data lines = 8 Number of address lines = log2 (1024) = log2 (210) = 10 Example problem to calculate the number of address and data lines for a 64K 4-bit memory. Solution: For 64K x 4 bit memory Number of data lines = 4 Number of address = log2(64K) = log2(26x210) = log2(216) = 16 Example problem to find how many address lines are required to access 100 registers. Solution: Number of address lines = log2100 = 6.643 = 7 Note – It is not possible to have fractional address lines. Hence, consider the next higher value. engineering subjects Microprocessor microprocessor