Cs-Web

View on GitHub

Memory Loc ,Addr and Operation

memory consists of many millionns of storage cell. Each cell can store a bit. data is accrssed in n-bit groups called word n is called word length

img : 32bit day6

b31 is a sign repr in bit

char = 1byte = 8bits :: therfore 4 chars can be stored

Access num,char,strings

access by word address

accessed by byte addr

beginnning of the string = beginning byte addr

termination = special charr

24 bit= 16Mb

32 bit = 4Gb

1Kb = 2^10 =10bit

1Tb = 2^40

Memory Address repr

Big-endian and little-endian assignment —————– big-ending: lower byte addr are used for the most signigicant byte of the word

little-ending:oppposite ordering, lower byte addr are used for the least significant bytes of the word

day6_big-endin&little-endin

prob:

  1. a memory has 32 bit addr and byte addresable what is the size of the memory(in byte)?

ans :2^32

2.a mem has 24 bit and word addresable with the word length of 32 bits, what si the size of the memory(in bytes)?

ans : (2^24 word)*2^2 (1 word = 4 bytes)

3.a mem has 16-bit addr and byte addressable word length is 32 bits(4bytes). How many word can we store in such a memory?

ans : (2^16 word)/2^2 (1 word = 4 bytes)