c - Memory storage and access inside memory? -
if store data in char ex :
char = 'a';
then stored in 1 byte memory , per knowledge computer access memory in multiple of 2, in case when use structure structure padding in normal case how data handled, example : here if char a
stored in location 1000 next byte remain unused or what? because computer can not access 1001(not in multiple of 2) please clarify doubt.
it's binary, not "multiple of 2".
adress 1000
in memory in binary (32bits) = 00000000 00000000 00000011 11101000
adress 1001
in memory in binary (32bits) = 00000000 00000000 00000011 11101001
also, think it's mistake consider adress memory in decimal.
here ram adressing definition wikipedia :
addressing
to useful, memory cells must readable , writeable. within ram device, multiplexing , demultiplexing circuitry used select memory cells. typically, ram device has set of address lines a0... an, , each combination of bits may applied these lines, set of memory cells activated. due addressing, ram devices virtually have memory capacity power of two.
usually several memory cells share same address. example, 4 bit 'wide' ram chip has 4 memory cells each address. width of memory , of microprocessor different, 32 bit microprocessor, 8 4 bit ram chips needed.
often more addresses needed can provided device. in case, external multiplexors device used activate correct device being accessed.
Comments
Post a Comment