Memory

Computer memory is a very fast memory device used to store . . .

  • Program instructions
  • Program variables (= data) used by program instructions

  • Computer memory consists of sequence memory cells
  • Each memory cell has 8 bits and it’s called a byte of memory
    • A bit can “remember” (store) either the value 0 (= “off” state) or the value 1 (= “on” state)
      • (I.e.: bit = one electronical switch – can be on or off)
    • Each byte in the memory is uniquely identified by an address
  • Each memory byte can store a 8 bit pattern (= a pattern consisting of 8 binary bits)
  • Each byte of memory can contain one of the following 256 possible binary patterns (= binary numbers)
  • Bytes at address 0 and 1 can form a 16 bits memory cell (with the address 0)
  • Bytes at address 0,1,2 and 3 can form a 32 bits memory cell (with the address 0)
  • The memory (RAM) has the capability to combine a number of adjacent memory bytes to represent larger values with some limitations
  • A memory byte at an even address can be combined with the subsequence memory byte to form a 16 bits memory cell
  • A memory byte at an address divisible by 4 can be combined with 3 subsequence memory bytes to form a 32 bits memory cell
    • Each quartet of memory cells can store 232 = 4294967296 different patterns
    • Each pattern is used to represent a unique value 
READ
When the CPU wants to read the value stored in memory address 4, the CPU sends the following signals onto the system bus.

When the memory receives these signals, it will send out the data stored at the requested address onto the data bus.

The CPU will receive the data and it can use it in subsequent operationsNotice that the value in memory location 4 is unchanged
.
WRITE
CPU sends the following signals onto the system bus:

The address 4 (in binary) on the address bus

The value 1010101010101010 on the data bus

A “Write” command on the control bus — the write command can be represented by the value “0” on the Read/write (R/W) signal wire of the control bus.

When the memory receives these signals, it will store the data in the memory bytes at the requested address location.
  • Each wire of the data bus can transfer 1 bit of information between the CPU and memory
  • The computer will always transfer 16 bits when the computer read or write to the memory
    • The memory can activate adjacent consecutive memory cells to perform read/write operations
    • So to transfer 16 bits simulatanously, the computer will activate 2 (adjacent consecutive) memory cells (because each memory cells has 8 bits)
      • The first byte is located at an even address N
      • The second byte is located at the odd address (N+1)
        • memory cell 0 + memory cell 1
        • memory cell 2 + memory cell 3
        • memory cell 4 + memory cell 5   
          • That’s why only bytes that is located at an even address can be combined with the byte at the next address

Reference

  1. Structure of the computer memory (RAM). (n.d.). Retrieved August 4, 2021, from http://www.mathcs.emory.edu/~cheung/Courses/255/Syl-ARM/4-intro/memory1.html
  2. Data transfer between CPU and memory. (n.d.). Retrieved August 4, 2021, from http://www.mathcs.emory.edu/~cheung/Courses/255/Syl-ARM/4-intro/mem-access.html

--- :: Skyferia Tech's Related Posts :: ---