Structure of the (computer) memory
 

Bit (Binary digit) = elementary memory device (switch)

Byte = 8 bits

Structure of memory - example
 

Different binary numbers that can be stored in 1 byte of memory
 
 

Different binary numbers that can be stored in 1 byte of memory
 
 

Solution:

Combining 2 adjacent memory bytes (cells)
 

Example: cells 0, 1 can be combined into a 16 bit memory cell with address 0
Example: cells 8, 9 can be combined into a 16 bit memory cell with address 8
Example: cells 7, 8 cannot be combined !!

Combining 2 adjacent memory bytes (cells) - Example
 

The computer instruction will specify the number of bytes to that it wants to access

Combining 2 adjacent memory bytes (cells) - an analogy
 

Combining 4 adjacent memory bytes (cells)
 

Combining 4 adjacent memory bytes (cells) - Example
 

Postscript
 
  • Computer memory can also combine 8 consecutive bytes

    Limitation:

      • The first memory byte address of the 8 consecutive bytes must be divisible by 8

    Variables of the data types double and long are stored in 8 consecutive memory bytes


  • Computers only combine 2n bytes of consecutive memory cells