{"id":2431,"date":"2021-03-17T16:26:43","date_gmt":"2021-03-17T10:56:43","guid":{"rendered":"https:\/\/binaryterms.com\/?p=2431"},"modified":"2021-03-17T17:09:39","modified_gmt":"2021-03-17T11:39:39","slug":"memory-location-and-addresses","status":"publish","type":"post","link":"https:\/\/binaryterms.com\/memory-location-and-addresses.html","title":{"rendered":"Memory Locations and Addresses"},"content":{"rendered":"<p>Memory locations and addresses determine how the computer\u2019s memory is organized so that the user can efficiently store or retrieve information from the computer. The computer\u2019s memory is made of a silicon chip which has millions of storage cell, where each storage cell is capable to store a <em>bit<\/em> of information which value is either 0 or 1.<\/p>\n<p>But the fact is, computer memory holds instructions and data. And a single bit is very small to hold this information so bits are rarely used individually. As a solution to this, the bits are grouped in fixed sizes of n bits. The memory of the computer is organized in such a way that the group of these n bits can be stored and retrieved easily by the computer in a single operation.<\/p>\n<p>The group of n bit is termed as <strong><em>word<\/em><\/strong> where n is termed as the <em>word length<\/em>. The word length of the computer has evolved from 8, 16, 24, 32 to 64 bits. General-purpose computers nowadays have 32 to 64 bits. The group of 8 bit is called a <em>byte<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2436\" src=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg\" alt=\"Memory Locations and Addresses\" width=\"549\" height=\"383\" srcset=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg 549w, https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses-300x209.jpg 300w\" sizes=\"auto, (max-width: 549px) 100vw, 549px\" \/><\/p>\n<p>Now, whenever you want to store any instruction or data may it be of a byte or a word you have to access a memory location. To access the memory location either you must know the memory location by its unique name or it is required to provide a unique address to each memory location.<\/p>\n<p>The memory locations are addressed from 0 to 2<sup>K<\/sup>-1 i.e. a memory has 2<sup>K<\/sup> addressable locations. And thus the address space of the computer has 2<sup>K<\/sup> addresses. Let us try some suitable values for K.<\/p>\n<p>2<sup>10<\/sup> = 1024 = 1K (Kilobyte)<br \/>\n2<sup>20<\/sup> = 1,048,576 = 1M (Megabyte)<br \/>\n2<sup>30<\/sup> = 1073741824 = 1G (Gigabyte)<br \/>\n2<sup>40<\/sup> = 1.0995116e+12 = 1T (Terabyte)<\/p>\n<h3>Byte Addressability<\/h3>\n<p>Till now we have gone through three information storing quantities bit, byte and word. We have seen above that 8 bits together form a byte and this is the fix for every memory. But the word length varies from memory to memory and it ranges from 16 to 64 bit.<\/p>\n<p>Well, it is impossible to allot a unique address to each bit in memory. As a solution, most modern computers assign successive addresses to successive byte locations in memory. This assignment of addresses to individual byte locations is termed byte addressability and memory is referred to as byte-addressable memory.<\/p>\n<p>If we assign an address to individual byte locations in the memory like 0, 1, 2, 3\u2026. .Now if the word length of the machine is 16 bit then the successive words are located at addresses 0, 2, 4, 6\u2026 where each word would have 2 bytes of information. Similarly, if we have a machine with a word length of 32 bit then the successive words are located at the addresses 0, 4, 8, 12\u2026 where each word would have 4 bytes of information and it could store or retrieve 4 bytes of instruction or data in a single and basic operation.<\/p>\n<h3>Big-Endian and Little-Endian Assignments in Byte Addresses<\/h3>\n<p>The big-endian and little-endian are two methods of assigning byte addresses across the words in the memory. In the <strong>big-endian assignmen<\/strong>t, the lower byte addresses are used for the leftmost bytes of the word. Observe the word 0 in the image below, the leftmost bytes of the word have lower byte addresses.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2433\" src=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Big-endian-Assignment.jpg\" alt=\"Big-endian Assignment\" width=\"348\" height=\"338\" srcset=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Big-endian-Assignment.jpg 348w, https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Big-endian-Assignment-300x291.jpg 300w\" sizes=\"auto, (max-width: 348px) 100vw, 348px\" \/><\/p>\n<p>In the<strong> little-endian assignment,<\/strong> the lower byte addresses are used for the rightmost bytes of the word. Observe the word 0 in the image below the rightmost bytes of word 0 has lower byte addresses.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2435\" src=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Little-endian-Assignment.jpg\" alt=\"Little-endian Assignment\" width=\"391\" height=\"337\" srcset=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Little-endian-Assignment.jpg 391w, https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Little-endian-Assignment-300x259.jpg 300w\" sizes=\"auto, (max-width: 391px) 100vw, 391px\" \/><\/p>\n<p>The leftmost bytes of the word are termed as <em>most significant bytes<\/em> and the rightmost bytes of the words are termed as least significant bytes.<\/p>\n<p>Thus the big-endian and little-endian specify the ordering of bytes inside a word. Similarly, the bits must be labelled inside the byte or a word and the most common way of labelling bits in a byte or word is as shown in the figure below i.e. labelling the bits as\u00a0 b<sub>7<\/sub>, b<sub>6<\/sub>,\u2026\u2026.,b<sub>1<\/sub>, b<sub>0<\/sub> from left to write as we do in little-endian assignment.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2434\" src=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Labelling-bits-within-a-byte.jpg\" alt=\"Labelling bits within a byte\" width=\"455\" height=\"170\" srcset=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Labelling-bits-within-a-byte.jpg 455w, https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Labelling-bits-within-a-byte-300x112.jpg 300w\" sizes=\"auto, (max-width: 455px) 100vw, 455px\" \/><\/p>\n<h3>Word Alignment<\/h3>\n<p>In a machine with word length 32-bit, the word boundaries occur at the bytes addresses 0, 4, 8\u2026 It is said that the word has <em>aligned addresses<\/em> if they begin with the byte address that is multiple of the number of bytes present in that word. For example, the word address 4 has four bytes in it with byte address 4, 5 and 6. The word address 4 starts with the byte address 4 which is multiple of the number of bytes in word 4.<\/p>\n<p>In case if the word address begins with the arbitrary byte address the word is said to have <em>unaligned addresses<\/em>. But conventionally the words have aligned addresses as this lets the access of memory operand more efficiently.<\/p>\n<p>So, this is all about the memory locations and how they are addressed to store and retrieve the instructions or data more efficiently. With memory addresses, it becomes easy to identify a specific memory location.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Memory locations and addresses determine how the computer\u2019s memory is organized so that the user can efficiently store or retrieve information from the computer. The computer\u2019s memory is made of a silicon chip which has millions of storage cell, where each storage cell is capable to store a bit of information which value is either [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[3],"tags":[],"class_list":{"0":"post-2431","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-computer-architecture","7":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is Memory Locations and Addresses? - Binary Terms<\/title>\n<meta name=\"description\" content=\"Memory locations and addresses determine how the computer\u2019s memory is organizedand make the access to memory operand more efficient.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/binaryterms.com\/memory-location-and-addresses.html\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Memory Locations and Addresses? - Binary Terms\" \/>\n<meta property=\"og:description\" content=\"Memory locations and addresses determine how the computer\u2019s memory is organizedand make the access to memory operand more efficient.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/binaryterms.com\/memory-location-and-addresses.html\" \/>\n<meta property=\"og:site_name\" content=\"Binary Terms\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-17T10:56:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-17T11:39:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg\" \/>\n<meta name=\"author\" content=\"Neha T\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Neha T\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/binaryterms.com\/memory-location-and-addresses.html#article\",\"isPartOf\":{\"@id\":\"https:\/\/binaryterms.com\/memory-location-and-addresses.html\"},\"author\":{\"name\":\"Neha T\",\"@id\":\"https:\/\/binaryterms.com\/#\/schema\/person\/e495f1d57f5c0a4c521cc3dba95661fe\"},\"headline\":\"Memory Locations and Addresses\",\"datePublished\":\"2021-03-17T10:56:43+00:00\",\"dateModified\":\"2021-03-17T11:39:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/binaryterms.com\/memory-location-and-addresses.html\"},\"wordCount\":789,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/binaryterms.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/binaryterms.com\/memory-location-and-addresses.html#primaryimage\"},\"thumbnailUrl\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg\",\"articleSection\":[\"Computer Architecture\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/binaryterms.com\/memory-location-and-addresses.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/binaryterms.com\/memory-location-and-addresses.html\",\"url\":\"https:\/\/binaryterms.com\/memory-location-and-addresses.html\",\"name\":\"What is Memory Locations and Addresses? - Binary Terms\",\"isPartOf\":{\"@id\":\"https:\/\/binaryterms.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/binaryterms.com\/memory-location-and-addresses.html#primaryimage\"},\"image\":{\"@id\":\"https:\/\/binaryterms.com\/memory-location-and-addresses.html#primaryimage\"},\"thumbnailUrl\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg\",\"datePublished\":\"2021-03-17T10:56:43+00:00\",\"dateModified\":\"2021-03-17T11:39:39+00:00\",\"description\":\"Memory locations and addresses determine how the computer\u2019s memory is organizedand make the access to memory operand more efficient.\",\"breadcrumb\":{\"@id\":\"https:\/\/binaryterms.com\/memory-location-and-addresses.html#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/binaryterms.com\/memory-location-and-addresses.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/binaryterms.com\/memory-location-and-addresses.html#primaryimage\",\"url\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg\",\"contentUrl\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg\",\"width\":549,\"height\":383,\"caption\":\"Memory Locations and Addresses\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/binaryterms.com\/memory-location-and-addresses.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/binaryterms.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Memory Locations and Addresses\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/binaryterms.com\/#website\",\"url\":\"https:\/\/binaryterms.com\/\",\"name\":\"Binary Terms\",\"description\":\"The Computer Science &amp; IT Guide\",\"publisher\":{\"@id\":\"https:\/\/binaryterms.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/binaryterms.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/binaryterms.com\/#organization\",\"name\":\"Binary Terms\",\"url\":\"https:\/\/binaryterms.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/binaryterms.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2020\/05\/binary-terms-logo1.png\",\"contentUrl\":\"https:\/\/binaryterms.com\/wp-content\/uploads\/2020\/05\/binary-terms-logo1.png\",\"width\":400,\"height\":63,\"caption\":\"Binary Terms\"},\"image\":{\"@id\":\"https:\/\/binaryterms.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/binaryterms.com\/#\/schema\/person\/e495f1d57f5c0a4c521cc3dba95661fe\",\"name\":\"Neha T\",\"url\":\"https:\/\/binaryterms.com\/author\/author\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Memory Locations and Addresses? - Binary Terms","description":"Memory locations and addresses determine how the computer\u2019s memory is organizedand make the access to memory operand more efficient.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/binaryterms.com\/memory-location-and-addresses.html","og_locale":"en_GB","og_type":"article","og_title":"What is Memory Locations and Addresses? - Binary Terms","og_description":"Memory locations and addresses determine how the computer\u2019s memory is organizedand make the access to memory operand more efficient.","og_url":"https:\/\/binaryterms.com\/memory-location-and-addresses.html","og_site_name":"Binary Terms","article_published_time":"2021-03-17T10:56:43+00:00","article_modified_time":"2021-03-17T11:39:39+00:00","og_image":[{"url":"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg","type":"","width":"","height":""}],"author":"Neha T","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Neha T","Estimated reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/binaryterms.com\/memory-location-and-addresses.html#article","isPartOf":{"@id":"https:\/\/binaryterms.com\/memory-location-and-addresses.html"},"author":{"name":"Neha T","@id":"https:\/\/binaryterms.com\/#\/schema\/person\/e495f1d57f5c0a4c521cc3dba95661fe"},"headline":"Memory Locations and Addresses","datePublished":"2021-03-17T10:56:43+00:00","dateModified":"2021-03-17T11:39:39+00:00","mainEntityOfPage":{"@id":"https:\/\/binaryterms.com\/memory-location-and-addresses.html"},"wordCount":789,"commentCount":2,"publisher":{"@id":"https:\/\/binaryterms.com\/#organization"},"image":{"@id":"https:\/\/binaryterms.com\/memory-location-and-addresses.html#primaryimage"},"thumbnailUrl":"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg","articleSection":["Computer Architecture"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/binaryterms.com\/memory-location-and-addresses.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/binaryterms.com\/memory-location-and-addresses.html","url":"https:\/\/binaryterms.com\/memory-location-and-addresses.html","name":"What is Memory Locations and Addresses? - Binary Terms","isPartOf":{"@id":"https:\/\/binaryterms.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/binaryterms.com\/memory-location-and-addresses.html#primaryimage"},"image":{"@id":"https:\/\/binaryterms.com\/memory-location-and-addresses.html#primaryimage"},"thumbnailUrl":"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg","datePublished":"2021-03-17T10:56:43+00:00","dateModified":"2021-03-17T11:39:39+00:00","description":"Memory locations and addresses determine how the computer\u2019s memory is organizedand make the access to memory operand more efficient.","breadcrumb":{"@id":"https:\/\/binaryterms.com\/memory-location-and-addresses.html#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/binaryterms.com\/memory-location-and-addresses.html"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/binaryterms.com\/memory-location-and-addresses.html#primaryimage","url":"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg","contentUrl":"https:\/\/binaryterms.com\/wp-content\/uploads\/2021\/03\/Memory-Locations-and-Addresses.jpg","width":549,"height":383,"caption":"Memory Locations and Addresses"},{"@type":"BreadcrumbList","@id":"https:\/\/binaryterms.com\/memory-location-and-addresses.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/binaryterms.com\/"},{"@type":"ListItem","position":2,"name":"Memory Locations and Addresses"}]},{"@type":"WebSite","@id":"https:\/\/binaryterms.com\/#website","url":"https:\/\/binaryterms.com\/","name":"Binary Terms","description":"The Computer Science &amp; IT Guide","publisher":{"@id":"https:\/\/binaryterms.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/binaryterms.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/binaryterms.com\/#organization","name":"Binary Terms","url":"https:\/\/binaryterms.com\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/binaryterms.com\/#\/schema\/logo\/image\/","url":"https:\/\/binaryterms.com\/wp-content\/uploads\/2020\/05\/binary-terms-logo1.png","contentUrl":"https:\/\/binaryterms.com\/wp-content\/uploads\/2020\/05\/binary-terms-logo1.png","width":400,"height":63,"caption":"Binary Terms"},"image":{"@id":"https:\/\/binaryterms.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/binaryterms.com\/#\/schema\/person\/e495f1d57f5c0a4c521cc3dba95661fe","name":"Neha T","url":"https:\/\/binaryterms.com\/author\/author"}]}},"_links":{"self":[{"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/posts\/2431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/comments?post=2431"}],"version-history":[{"count":10,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/posts\/2431\/revisions"}],"predecessor-version":[{"id":2445,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/posts\/2431\/revisions\/2445"}],"wp:attachment":[{"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/media?parent=2431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/categories?post=2431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/binaryterms.com\/wp-json\/wp\/v2\/tags?post=2431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}