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 ...

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...

After Effects Alternative

Pro editing. Superpowered visual effects. Next-generation films. Editing Trim, ripple, roll and slice everything from feature-length films to 30 second YouTube videos, with HitFilm Pro’s industry standard editing software. Create 3D title sequences for your sci-fi thriller, distort action cam footage and get a hi-res second monitor preview of your work. Editor Get that rough cut looking sharp with HitFilm Pro’s dedicated editing trimmer, customizable workspace and shot-transition features. You can mix different formats, resolutions, framerates all on the same timeline and quickly import and organize your footage. Auto sync Tired of turning your characters into ventriloquists? With the much-requested audio auto-sync feature, your DSLR scratch audio will automatically synchronize with your files from a dedicated audio recorder. No more awkward sound delays. 3D titling Draw your audience in with 3D title sequences and stunning lower thir...