Skip to main content

Why memory capacities are always in powers of two?







This has to do with how memory is adressed.
To retrieve or store a word in memory, you needs to specify where to/from. This is called adressing.
Memory addresses are binary numbers: using an n-bit address, you can uniquely specify exactly 2n memory locations. Thus, choosing a non-power of two as your memory size will result in either wasted space or invalid adresses.

For instance, say you choose to go for example
for a 43 byte RAM, and assume you address the locations 0 to 42. You can either choose a 5-bit adress, in which case locations 32-42 will go unused (5 bits can address only 32 locations); or a 6 bit address which covers the entire memory but leaves invalid memory addresses in the range 43-64 (6 bits address 64 locations).
Thus, since the address space by definition is always a power of two, memory is always rounded out at powers of two to avoid complications.

Comments

Popular posts from this blog

Video format explained and compared

 This article explains main video formats and later compares with photos the quality. Audio Video Interleave (.avi) Developed by Microsoft and released with Windows 3.1 way back when false teeth were still made out of wood, AVI files have been a work horse of digital video. Although its popularity has been waning, lots of legacy video in AVI can be found all over the web. More recently, AVI has been abandoned for Microsoft's WMV (Windows Media Video). One of the most maddening things about AVI today is that the format doesn't allow for specifying an aspect ratio, so a 16:9 AVI video may start displaying at 4:3 - this is less of a problem if your player allows you to manually select aspect ratios. If you're watching in the non-pro version of QuickTime though, you'll have to learn to live with people being unusually narrow. Advanced Systems Format (.asf) ASF is a proprietary Microsoft container that usually houses files compressed with Microsoft's ...

HP Z8 Workstation with 3TB RAM

HP Z8 is the newest workstation with amazing power. It has 56 CPU Cores, 3TB Memory (24 Slots), supports 48 TB of storage and three Nvidia Quadro P6000 GPU. The reinvention of HP’s most powerful desktop PCs meets the compute power needs demanded by the world’s inventors of change, including product designers, architects, digital creators, scientists, educators, healthcare workers, financial traders and others. The HP Z8, Z6 and Z4 Desktop Workstations are equipped with extreme power, unprecedented security2 and innovative design, future-proofed to support the fast growing fields of virtual reality, machine learning and advanced design. IT managers in today’s world must make security a top priority. HP’s new powerhouse portfolio includes the industry’s most comprehensive set of security features2 including HP SureStart (the industry's first self-healing BIOS with intrusion detection), the HP Client Security Suite and more. With the highest security levels in the history of th...

New Sony A7R III Specs

Inside the a7R III is a 42.4-megapixel back-illuminated full-frame Exmore R CMOS sensor. Despite its high megapixel count, the a7R III is fast with a continuous shooting speed of up to 10fps with full AF/AE tracking — this is twice as fast as the 5fps offered by the a7R II.Using either the mechanical shutter or the completely silent shooting mode, you can capture a burst of up to 76 JPEG/RAW photos and 28 uncompressed RAW files. In live view, you can shoot at 8fps with minimal viewfinder/LCD lag. The updated BIONZ X processing engine can also process images 1.8 times faster than the a7R II. While a batch of photos is being written to the memory card, many of the camera’s key features are still usable — things like the Function and Menu buttons as well as image playback and organization. Compared to the a7R II, the new a7R III also features new technologies — a gapless on-chip lens design and anti-reflective sensor coating — to achieve better low-light performance and wider dynamic...