memory - Difference between word addressable and byte addressable -
can explain what's different between word
, byte
addressable? how related memory size etc.?
a byte memory unit storage , memory chip full of such bytes. memory units addressable. way can use memory.
in reality memory byte addressable. it means binary address points single byte only. word group of bytes – 2, 4, 8 depending upon data bus size of cpu.
to understand memory operation fully, must familiar various registers of cpu , memory ports of ram. assume know meaning 'mar memory address register', 'mdr memory data register', 'pc program counter register', 'mbr memory buffer register'. ram has 2 memory ports: 32 bit data/addresses, 8-bit opcode.
suppose cpu wants read word (say 4 bytes) address xyz onwards. cpu put address on mar, sends memory read signal memory controller chip. on receiving address , read signal, memory controller connect data bus 32-bit port , 4 bytes starting address xyz flow out of port mdr.
if cpu wants fetch next instruction, put address onto pc register , sends fetch signal memory controller. on receiving address , fetch signal, memory controller connect data bus 8-bit port , single byte long opcode located @ address received flow out of ram cpu's mdr.
so means when register 'memory addressable'or 'byte addressable'. happen when put, decimal 2 in binary on mar intention read 'word' 2 , not (byte no 2)?
word no 2 means bytes 4, 5, 6, 7 32 bit machine. in reality physical memory byte addressable only. there trick handle 'word addressing'.
when mar placed on address bus, 32 bits not map onto 32 address lines 0-31 respectively. instead, mar bit 0 wired address bus line 2, mar bit 1 wired address bus line 3 , on. upper 2 bits of mar discarded since needed word addresses above 2^32 none of legal our 32 bit machine.
using mapping, when mar 1, address 4 put onto bus, when mar 2, address 8 put onto bus , forth.
it bit difficult in beginning understand. learnt andrew tanenbaums's 'structured computer organisation'.
Comments
Post a Comment