The operations that the CPU can perform on the memory
 

The CPU can only perform these 2 operations on the memory are:

  1. The CPU can read (= retrieve) data from a specific location in the memory

  2. The CPU can write (= store) data into a specific location in the memory

The amount of data read/written can be: 1 byte, 2 bytes, 4 bytes, or 8 bytes (not used in CS255)

 
 

In this webpage, we will study:

  • How do the CPU specify which operation (read or write) it wants to perform ??


  • How do the CPU specify which memory location the read/write operation will be performed on ???

Review: the computer buses
 

 
  • The address bus is used to convey address (= identification) information
  • The data bus is used to transfer data
  • The command bus is used to convey (R or W) command issued by the CPU

Signaling method used inside a computer

Each (electrical) wire of the system bus can be used to transmit a electrical signal:

Signaling method used inside a computer

Computers use 2 signal levels:     (1) a high (voltage) is used to send the (binary) number 1:

The meaning of the value 1 remains to be determined

Signaling method used inside a computer

Computers use 2 signal levels:     (2) a low (voltage) is used to send the (binary) number 0:

The meaning of the value 0 remains to be determined

How is the address bus used

The signals transmitted on the address bus represent the address (in binary) of the memory that the CPU wants to access (= read or write):

How is the data bus used

The signals transmitted on the data bus represent the data (= information) that is being transfered between the CPU and the memory:

Background information: some information about the Control bus

The control bus has many control signals and the following 3 signals is essential for our discussion:

Enable: indicate whether the CPU is active (= 1) or idle (= 0)
MEM/IO: indicate whether the CPU want to access the memory (= 1) or an IO device (= 0)
R/W: indicate the operation performed (R/W=1 means read and R/W=0 means write)

When the CPU is not performing any transfer operations

When the CPU is not performing any transfer operation, the Enable signal = 0

The CPU is idle

How a read operation is performed using the System bus signals - Step 1

How the CPU sends out the command "Read data from memory address 4" on the system bus:

Enable=1, Mem/IO=1, R/W=1 signals indicates: a read operation to the memory
The address bus sends out the address 4 (in binary)

How a read operation is performed using the System bus signals - Step 2

How the memory will respond to "Read data from memory address 4" command:

The memory will send the data stored in the memory location 4 back to the CPU using the data bus

How a read operation is performed using the System bus signals - Step 3

Finally: the CPU receives the requested data:

The CPU will also change Enable=0 to indicate "no operation" being performed.
The CPU can perform another transfer operation if it need to... (and so on)

How a write operation is performed using the System bus signals - Step 1

How the CPU sends out the command "Write 1010101011111111 to memory location 4":

Enable=1, Mem/IO=1, R/W=0 signals indicates: a write operation to the memory
Address bus sends out address 4 (in binary) and data bus sends out 1010101011111111

How a write operation is performed using the System bus signals - Step 2

How the memory will respond to the "Write data to memory address 4" command:

The memory will store the data into the memory location 4
Afterwards, the CPU will end the Write command by sending out Enable=0