Saturday, May 16, 2020

How to find the Addressable Memory using Address bus in microprocessor 8085?


What is an address bus in a microprocessor?

Address bus is nothing but the group of wires which are used to transmit the addresses of peripherals or hardwares connected with the system. 

Address bus is Unidirectional (one) directional flow i.e addresses travel in only one way from CPU to Memory or CPU to Input/Output devices  (like printer, scanner, keyboard, mouse) etc.  

8085 microprocessor has a 16 bits address bus. What is the meaning of 16 bit address bus? It is actually 16 wire lines which can transmit 16 bit addresses at a time. 


What is a Data Bus in a microprocessor? 

Data bus is a group of wires that are used to transfer the data bit from memory to CPU or vice versa. Data bus is a bidirectional i.e it can transfer data from microprocessor to memory and memory to microprocessor. same as Input/Output devices to memory and vice versa.

Diagram of address bus and data bus in 8085 microprocessor

Diagram : Address bus & Data bus

Main Memory stores data and this data is available at a particular location which is called the address of that data. 

As per above diagram CPU sends address to read the data location of data using the address bus

Memory sends the data using a data bus where the data available at the address sent by the CPU. 


Question & Answer based on Address bus and Data bus

Question 1) What is the capacity of RAM (Main memory) with the 12 bit address bus, If each memory location holds 8 bit ?

Ans : Suppose the system supports only 1 bit address bus so there are only two memory locations possible 0 & 1. 

If 2 bit address bus then 

Memory Location


2 bit address

0

=

0

0

1

=

0

1

2

=

1

0

3

=

1

1

Table : A

As per above table 00, 01, 10 & 11 these four locations are possible with 2 bit addresses. 

If 3 bit address bus then 

No.


3 bit address

0

=

0

0

0

1

=

0

0

1

2

=

0

1

0

3

=

0

1

1

4

=

1

0

0

5

=

1

0

1

6

=

1

1

0

7

=

1

1

1

Table : B

As per above table if 3 bit address bus is used then 000, 001, 010…up to... 111 These 8 addresses are possible with the 3 bit address bus. it means 

if 1 bit address bus then 21 = 2 addresses, 

if 2 bit address bus then 22 = 4 addresses, 

likewise if n bit address bus is there then the total number of addresses are 2n addresses i.e. the 2n address locations of Main Memory is accessible and this is the capacity of the main memory.

Study the following table for the capacity of main memory with n bit address bus. if you increase only 1 bit address line, then main memory capacity increases twice than before.


Address bus

2n

=

Capacity of addressable Main Memory (RAM)

1

21

=

2 byte

2

22

=

4 byte

3

23

=

8 byte

4

24

=

16 byte

5

25

=

32 byte

6

26

=

64 byte

7

27

=

128 byte

8

28

=

256 byte

9

29

=

512 byte

10

210

=

1024 Byte = 1 KB 

11

211

=

2 KB

12

212

=

4 KB

13

213

=

8 KB

14

214

=

16 KB

15

215

=

32 KB

16

216

=

64 KB

17

217

=

128 KB

18

218

=

256 KB

19

219

=

512 KB

20

220

=

1024 KB = 1 MB

30

230

=

1 GB

Table : C


Remember : 

10 bit address line = 1 KB

20 bit address line = 1 MB

If 1 bit address line is increased then main memory capacity increases twice.

If you have 16 KB of Main Memory and  12 bit address bus then total addresses are possible is 4 KB addressable memory locations and the rest of 8 KB memory is useless.

     

Question 2) What is the addressable memory capacity with the 32 bit address bus with one byte addressable memory?

232  = 4 GB of memory 


Question 3) How many address lines are required to address the memory of 32 KB? 

Here you have to find the total number of address bus so the formula to find address bus using memory size N is : (log2 N) bits 

log2 32 KB = 15 bit address line.  

easy technique is, 10 bit address line  =  1 KB, 11 bit = 2 KB, 12 bit = 4 KB, 13 bit = 8 KB, 14 bit = 16 KB and 15 bit address line = 32 KB.

Question 4) What is the total addressable memory with 32 bit address bus and 16 bit data bus? 

Ans : Total Addressable Memory = 2n  x  m (n for bit of address bus and m is bit for data bus)

232  = 4 Giga Byte  

16 bit data bus = 2 byte      

232  x  2 = 4 GB x 2 = 8 GB

Question 5) What will be the size of memory address space for a 16 bit data and 20 bit address bus?

  1. 1 MB

  2. 64 KB

  3. 2 MB

  4. None of these

Ans : 220  x  2  = 1 MB  x  2 byte = 2 MB 

Question 6) A processor can support a maximum memory of 4 GB, where the memory is word-addressable (a word consists of two bytes). The size of the address bus of the processor is at ____ least bits. 

 (A) 16

(B) 31

(C) 32

(D) None

Look at the table : C, in which i have described the capacity of Memory based on the address bus but this question is asking about the address bus based on the memory capacity with 2 byte addressable. 

230  = 1 GB, 

231 = 2 GB, 

232  = 4 GB.

So, 4 GB addressable memory with 2 byte addressable location 

= 4 GB / 2 

= 2 GB 

= 231

No comments:

Post a Comment