TransWikia.com

Understanding addressing and size in memory map

Electrical Engineering Asked by KMC on July 28, 2020

TM4C123 has 256 kiBytes of flash ROM as shown in the memory map. The range of memory addresses for the ROM is 0x0000.0000 to 0x0003.FFFF (a 32bit address), totaled to 3x16x16x16x16 = 196,608 number of addresses. The memory is byte addressable so that block of memory addresses adds up to 196,608 bytes instead. Why does the manufacturer claim it has 256 kiB and not 196kB ROM memory size?

Even if the range of addresses can’t sum up to an exact 256k, wouldn’t 0x0000.0000 – 0.0004.FFFF (4x16x16x16x16 = 262k) give a size closer to 256k than 0x0003.FFFF’s 196k?

memory map

One Answer

You have an off by one error in your calculations and also kilobyte is not 1000 bytes but 1024. The device really has 256 kilobytes of memory. 2^18 is 262144 bytes and 262144 / 1024 is exactly 256 kilobytes. A kilobyte is 2^10 = 1024 bytes.

Correct answer by Justme on July 28, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP