CPU and Memory Basics
- 73Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What is the primary job of the CPU?
To execute programs, or code.
Or swipe the card
73 cards
What is the primary job of the CPU?
To execute programs, or code.
How does a CPU read a program from memory?
It reads the program sequentially, byte by byte, from external memory.
What happens to program execution while power remains applied?
The CPU continues executing the program and does not stop on its own.
How is computer memory organized?
As an array of numbered bytes.
What values can a byte represent?
Any integer from 0 through 255.
What is a memory address?
The ordinal number used to identify a memory cell, starting from zero.
What is the address of the 300th memory cell?
Address 299.
What is the difference between ROM and RAM?
ROM is generally read-only and stores persistent program code; RAM can be read and written and stores temporary data.
What typically does ROM contain?
Pre-programmed code intended for execution by the CPU.
What typically does RAM contain?
Temporary data generated by the CPU or loaded from external media during execution.
What are examples of RAM and ROM in a computer?
A DIMM stick is RAM, while a BIOS chip is ROM.
What is firmware?
A device-specific program, usually stored in ROM, that is intended to run on a particular device.
What is the address bus used for?
To communicate the address of the memory cell or device that the CPU wants to access.
What is the physical structure of an address bus?
A set of electrical wires that encode addresses using binary values.
Why is the address bus unidirectional?
Addresses travel from the CPU to external devices, not from those devices back to the CPU.
How are devices connected to the address bus?
They are connected in parallel.
How are address bits assigned to address lines?
The least significant bit goes on the lowest-numbered address line, and the most significant bit goes on the highest-numbered line.
For the address 44206, where is the least significant bit placed?
On address line
A0.What is the control bus used for?
To carry signals that specify and coordinate operations such as reading and writing.
What are the two primary memory-operation signals on the control bus?
READ(RD) andWRITE(WR).What does it mean that
READandWRITEare active low?The CPU activates a signal by pulling its line to logic low.
Can the
READandWRITEsignals be active simultaneously?No. They are mutually exclusive.
Why are many control signals active low?
Primarily because of power-consumption considerations.
What is the data bus used for?
To transfer data between the CPU and external devices.
Why is the data bus bidirectional?
The CPU receives data during reads and sends data during writes.
What does the width of a data bus indicate?
How many bits can be transferred at once and, consequently, a major aspect of system performance.
What does it mean to call a computer an 8-bit, 16-bit, 32-bit, or 64-bit system in this context?
It refers to the width of the system's data bus.
During a read operation, which devices act as data-bus outputs and inputs?
The memory chip drives the data bus as an output, and the CPU receives it through input lines.
What does a memory read operation require from the CPU?
The CPU places an address on the address bus and activates the
READsignal.Why does a ROM chip need a
READsignal?To know when it should place the requested data on the data bus.
What is an opcode?
An operation code, or machine-code instruction, that tells the CPU what task to perform.
In the example, what does the value 112 represent when read from ROM?
It represents an instruction telling the CPU to perform a particular task.
What does an 8-bit data bus imply about the size of one memory cell?
One memory cell is 8 bits, or exactly 1 byte.
What happens during a memory write operation?
The CPU places an address and data on their buses, then activates
WRITE; the selected writable memory stores the data.What is address decoding?
Using logic circuitry to activate a device when a specified pattern of address bits is present.
Why is address decoding necessary when multiple memory chips share the buses?
To ensure that only the addressed device responds.
How is a computer's address space divided among memory devices?
Each device is assigned a fixed address range.
What determines the size of the total address space?
The number of address-bus lines.
How many bytes can a CPU with 16 address lines address?
216=65,536 bytes, or 64 kilobytes.
What are the first and last addresses in a 16-bit address space?
The first address is 0 and the last address is 65,535.
In the example system, which address ranges are assigned to ROM and RAM?
ROM occupies addresses 0–32,767; RAM occupies addresses 32,768–65,535.
Why is ROM placed at the beginning of the address space?
The CPU typically begins execution at address 0 after reset, so the first firmware instruction must be there.
How does the most significant address bit select ROM or RAM in the example?
When
A15is 0, the address is below0x8000and selects ROM; whenA15is 1, the address is at least0x8000and selects RAM.What do
CSandCEmean in a memory chip?CSmeans Chip Select andCEmeans Chip Enable; both identify the chip-activation control function.What does it mean that
CSis active low?The memory chip is selected when its
CSorCEinput is at logic low.What is the high-impedance, or Z-state, of a memory output?
A state in which the output is effectively disconnected from the bus.
What is the purpose of the
OEsignal?OEmeans Output Enable and controls whether a memory chip drives the data bus.How are the memory-control signals connected in the example circuit?
READconnects to both chips'OEinputs;WRITEconnects to RAM's Write Enable input and is not used by ROM.How does the example circuit decode ROM and RAM using an inverter?
ROM's chip-enable input is driven directly by
A15, while RAM's chip-enable input is driven by an invertedA15signal.What happens immediately after the CPU is reset?
The program counter is set to zero, all address lines are initially low, and the CPU begins reading the instruction at address 0.
Why does RAM not interfere when the CPU reads address 0 in the example?
Address line
A15is low, so ROM is selected while RAM is inactive and its outputs remain in the Z-state.What occurs when the CPU writes
0xAAto address0xB000?The CPU places the address and data on the buses, pulls
WRITElow, and RAM stores0xAAat address0xB000.How does the CPU later read the value stored at
0xB000?It places
0xB000on the address bus, pullsREADlow, and receives the RAM contents on the data bus.What is the purpose of the values
0xAAand0x55in programming?They are commonly used as alternating-bit patterns for memory testing.
What is hexadecimal notation?
A base-16 numbering system using digits 0–9 and letters A–F.
Why is hexadecimal useful for representing binary data?
Each hexadecimal digit corresponds directly to a group of 4 binary bits.
How many hexadecimal digits represent 8 bits and 16 bits?
8 bits require 2 hexadecimal digits; 16 bits require 4 hexadecimal digits.
What are a nibble, a byte, and a word?
A nibble is 4 bits, a byte is 8 bits, and a word is 16 bits or more.
What hexadecimal ranges represent the ROM and RAM regions in the example?
ROM occupies
0x0000–0x7FFF; RAM occupies0x8000–0xFFFF.How are hexadecimal numbers commonly designated in C and assembly language?
C uses the prefix
0x, while assembly commonly appendsHto the number.What is VRAM?
Video RAM is memory whose contents determine what appears on the computer screen.
How are VRAM addresses typically mapped to screen positions?
Lower addresses generally correspond to the upper-left of the screen, while higher addresses correspond toward the lower-right.
How are input-output ports different from memory devices?
Ports are accessed using read and write operations in a separate address space with separate machine-language instructions.
What are
IOREQandMEMREQ?Control-bus signals indicating an input-output request and a memory request, respectively.
Why must the memory request signal be decoded?
To ensure that memory chips respond only to memory operations, not to port operations using the same address bus.
How can a simple one-bit output port be implemented?
With a D-type flip-flop whose data input is connected to the data bus and whose clock is triggered by decoded control signals.
What signals must be decoded for a write-only port at address
0xFF?All eight address bits matching
0xFF, an active-lowWRITEsignal, and an active-lowIOREQsignal.Why must
IOREQbe decoded for a port at address0xFF?To distinguish a write to port
0xFFfrom a write to memory address0xFF.How does the one-bit port control an LED?
The LED follows the least significant data bit,
D0, stored in the flip-flop.What sequence turns the LED on through the output port?
The CPU addresses
0xFF, places a 1 onD0, and pulls bothWRITEandIOREQlow.How do ISA and PCI buses traditionally connect expansion cards?
Slots are connected in parallel, and decoding on the expansion card selects its individual address and control signals.
What did configuring an ISA Sound Blaster card's address and interrupt line accomplish?
It configured the card's decoder and interrupt settings.
How does PCI Express differ from the traditional shared-bus approach?
Each motherboard slot has independent communication lines for its installed expansion board.

Ask anything
We've read this whole study set, so questions about it get the best answers.