A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Memory Organization and Addressing

College Depth 92 in the knowledge graph I know this Set as goal
89topics build on this
352prerequisites beneath it
See this on the map →
Binary Number SystemAssembly Language Basics+2 moreDynamic RAM (DRAM) Organization and Refresh CyclesI/O Systems and Buses+7 more
memory addressing byte-ordering address-space endianness

Core Idea

Memory in a computer system is organized as an array of addressable locations, each identified by a unique binary address. The address space size is determined by the address bus width: a 32-bit address bus can address 232 ≈ 4 GB. Memory is typically byte-addressable, meaning each address refers to one byte even when words are larger. Byte ordering (endianness) determines whether multi-byte values store the most significant byte at the lowest address (big-endian) or highest address (little-endian), affecting data interchange and debugging.

How It's Best Learned

Draw a memory map of a small address space and identify regions for code, data, and stack. Compare big-endian and little-endian storage of a 4-byte integer. Examine how array indexing translates to memory addresses in a low-level language like C.

Common Misconceptions

Explainer

Every value your program works with — variables, instructions, arrays — lives somewhere in memory. To fetch or store that value, the hardware needs a way to identify exactly where "somewhere" is. Memory organization is the system that makes this possible: it defines what an address is, how large the address space is, and how multi-byte values are laid out.

The fundamental model is an array. Memory is a sequence of byte-sized slots, each assigned a unique binary number called an address, starting at 0 and going up to the maximum the hardware supports. The address bus — a set of wires connecting the processor to the memory system — carries these binary addresses. If the address bus is n bits wide, it can represent 2n distinct addresses, so it can address up to 2n bytes. A 32-bit address bus (as in older x86 processors) gives 232 = 4 GB; a 64-bit bus gives 264 bytes, an astronomically large space that no current machine comes close to populating. This is why upgrading a system from a 32-bit operating system to 64-bit allowed it to use more than 4 GB of RAM — the old addressing scheme simply ran out of room.

The term byte-addressable means that the finest granularity you can name is a single byte. Each byte has its own address, even though the data you care about (integers, floats, pointers) typically spans 4 or 8 bytes. When you declare `int x` in C on a 32-bit system, x occupies four consecutive byte addresses. Which byte goes first? That depends on endianness. In a little-endian system (x86, ARM by default), the least significant byte is stored at the lowest address — the "little end" comes first. In a big-endian system (network byte order, some RISC architectures), the most significant byte comes first. For the 32-bit value 0x12345678 at address 0x1000: little-endian stores 78, 56, 34, 12 at addresses 0x1000 through 0x1003; big-endian stores 12, 34, 56, 78. Within a single machine this is invisible, but when programs exchange binary data with other systems — over a network, through a shared file — endianness must be explicitly handled.

Despite memory being byte-addressable, processors do not typically read one byte at a time. The data bus between processor and memory is 32 or 64 bits wide, and hardware reads a full word per cycle. When you access a single byte, the processor loads the containing word, extracts the byte, and discards the rest. For this to work cleanly, most processors prefer or require aligned accesses: a 4-byte integer should start at an address divisible by 4. An unaligned integer (e.g., at address 0x1001) would straddle two aligned words, requiring two memory reads and bit-shifting to assemble — some architectures handle this automatically but slowly; others raise a hardware exception. This is why C compilers insert padding bytes between struct fields: to keep each field aligned.

The addresses your program sees are virtual addresses — numbers produced by the compiler and used by your code. The hardware's memory management unit (MMU) translates these to physical addresses — actual locations in the RAM chips — using a page table maintained by the operating system. This indirection is invisible during normal execution but becomes visible in system programming, memory-mapped I/O, and debugging. Understanding virtual versus physical addressing is the entry point to cache design, virtual memory, and operating system memory management — all of which build directly on the byte-addressable array model introduced here.

Practice Questions 3 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesBoolean AlgebraBoolean Type and Truth ValuesComparison Operators and Boolean TestsLogical Operators and Boolean AlgebraBoolean Algebra and Fundamental LawsLogic Gates FundamentalsImplementing Boolean Functions with GatesKarnaugh Map SimplificationCombinational Circuit DesignFlip-Flops and LatchesBinary Counters: Design and AnalysisBinary ArithmeticFixed-Point Number RepresentationTwo's Complement RepresentationOverflow and Underflow DetectionBinary Adders: Half-Adders and Full-AddersFull Adder and Carry PropagationCarry Lookahead Adder DesignHalf Adder Circuit DesignMultiplication Circuit DesignSequential Circuit DesignRegisters and Register FilesInstruction Set Architecture (ISA)Assembly Language BasicsMemory Organization and Addressing

Longest path: 93 steps · 352 total prerequisite topics

Prerequisites (4)

Leads To (9)