All Exams Test series for 1 year @ ₹349 only
Question

An 8 bit microcontroller has an external RAM with the memory map from 8000 H to 9FFF H. How many number of bytes can this RAM store?

The correct answer is

8192

Microcontroller RAM Size Calculation

The question asks us to determine the total number of bytes that an external RAM can store, given its memory map range for an 8-bit microcontroller. The memory map is provided as a hexadecimal range: 8000H to 9FFFH. To find the total memory capacity, we need to calculate the difference between the highest and lowest addresses and then add one, because both the starting and ending addresses are included in the memory range.

RAM Memory Map Analysis

  • Starting Memory Address: 8000H
  • Ending Memory Address: 9FFFH

The addresses are given in hexadecimal format. To find the total number of addresses (which directly corresponds to the number of bytes for byte-addressable memory), we can use the formula:

Total Bytes = (Ending Address - Starting Address) + 1

Step-by-Step Byte Calculation

Let's perform the calculation using hexadecimal arithmetic.

  1. Subtract the Starting Address from the Ending Address: We subtract 8000H from 9FFFH. $$ \begin{array}{c c c c c} & 9 & F & F & F_{H} \\ - & 8 & 0 & 0 & 0_{H} \\ \hline & 1 & F & F & F_{H} \end{array} $$ So, \(9FFFH - 8000H = 1FFFH\).
  2. Add 1 to the Result: Since both the starting and ending addresses are part of the memory range, we add 1 to the difference. $$ 1FFFH + 1H $$ When we add 1 to FFFFH (or similar, like 1FFFH), it effectively carries over and increments the next digit. In hexadecimal, F is 15. So, \(1FFFH + 1H = 2000H\).
  3. Convert the Hexadecimal Result to Decimal: Now, we convert 2000H to its decimal equivalent to find the total number of bytes. $$ 2000H = (2 \times 16^3) + (0 \times 16^2) + (0 \times 16^1) + (0 \times 16^0) $$ $$ 2000H = (2 \times 4096) + (0 \times 256) + (0 \times 16) + (0 \times 1) $$ $$ 2000H = 8192 + 0 + 0 + 0 $$ $$ 2000H = 8192_{10} $$

Therefore, the external RAM can store 8192 bytes. This calculation directly gives us the total memory capacity of the RAM with the given memory map.

Was this answer helpful?

Important Questions from Microprocessors

  1. What are the XTAL 1 and XTAL 2 pins numbers for 8051?

  2. Register which is used to store values of arithmetic and logical operations is termed:

  3. How many bytes of bit addressable memory is present in 8051 based microcontrollers?

  4. A single instruction to clear the lower four bits of the accumulator in 8085 assembly language is-

  5. In Microprocessor 8085 Address/Data buffer is a/an _______ buffer.

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App