1. Home
  2. Explore
  3. Computer Science
  4. CPU and Memory Basics

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

CPU and Memory Basics

  • 73Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: CPU And Memory
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is the primary job of the CPU?

Tap to flipClick to flipspace

To execute programs, or code.

Or swipe the card

73 cards

  1. What is the primary job of the CPU?

    To execute programs, or code.

  2. How does a CPU read a program from memory?

    It reads the program sequentially, byte by byte, from external memory.

  3. What happens to program execution while power remains applied?

    The CPU continues executing the program and does not stop on its own.

  4. How is computer memory organized?

    As an array of numbered bytes.

  5. What values can a byte represent?

    Any integer from 000 through 255255255.

  6. What is a memory address?

    The ordinal number used to identify a memory cell, starting from zero.

  7. What is the address of the 300th memory cell?

    Address 299299299.

  8. 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.

  9. What typically does ROM contain?

    Pre-programmed code intended for execution by the CPU.

  10. What typically does RAM contain?

    Temporary data generated by the CPU or loaded from external media during execution.

  11. What are examples of RAM and ROM in a computer?

    A DIMM stick is RAM, while a BIOS chip is ROM.

  12. What is firmware?

    A device-specific program, usually stored in ROM, that is intended to run on a particular device.

  13. What is the address bus used for?

    To communicate the address of the memory cell or device that the CPU wants to access.

  14. What is the physical structure of an address bus?

    A set of electrical wires that encode addresses using binary values.

  15. Why is the address bus unidirectional?

    Addresses travel from the CPU to external devices, not from those devices back to the CPU.

  16. How are devices connected to the address bus?

    They are connected in parallel.

  17. 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.

  18. For the address 442064420644206, where is the least significant bit placed?

    On address line A0.

  19. What is the control bus used for?

    To carry signals that specify and coordinate operations such as reading and writing.

  20. What are the two primary memory-operation signals on the control bus?

    READ (RD) and WRITE (WR).

  21. What does it mean that READ and WRITE are active low?

    The CPU activates a signal by pulling its line to logic low.

  22. Can the READ and WRITE signals be active simultaneously?

    No. They are mutually exclusive.

  23. Why are many control signals active low?

    Primarily because of power-consumption considerations.

  24. What is the data bus used for?

    To transfer data between the CPU and external devices.

  25. Why is the data bus bidirectional?

    The CPU receives data during reads and sends data during writes.

  26. 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.

  27. What does it mean to call a computer an 888-bit, 161616-bit, 323232-bit, or 646464-bit system in this context?

    It refers to the width of the system's data bus.

  28. 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.

  29. What does a memory read operation require from the CPU?

    The CPU places an address on the address bus and activates the READ signal.

  30. Why does a ROM chip need a READ signal?

    To know when it should place the requested data on the data bus.

  31. What is an opcode?

    An operation code, or machine-code instruction, that tells the CPU what task to perform.

  32. In the example, what does the value 112112112 represent when read from ROM?

    It represents an instruction telling the CPU to perform a particular task.

  33. What does an 888-bit data bus imply about the size of one memory cell?

    One memory cell is 888 bits, or exactly 111 byte.

  34. 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.

  35. What is address decoding?

    Using logic circuitry to activate a device when a specified pattern of address bits is present.

  36. Why is address decoding necessary when multiple memory chips share the buses?

    To ensure that only the addressed device responds.

  37. How is a computer's address space divided among memory devices?

    Each device is assigned a fixed address range.

  38. What determines the size of the total address space?

    The number of address-bus lines.

  39. How many bytes can a CPU with 161616 address lines address?

    216=65,5362^{16} = 65{,}536216=65,536 bytes, or 646464 kilobytes.

  40. What are the first and last addresses in a 161616-bit address space?

    The first address is 000 and the last address is 65,53565{,}53565,535.

  41. In the example system, which address ranges are assigned to ROM and RAM?

    ROM occupies addresses 000–32,76732{,}76732,767; RAM occupies addresses 32,76832{,}76832,768–65,53565{,}53565,535.

  42. Why is ROM placed at the beginning of the address space?

    The CPU typically begins execution at address 000 after reset, so the first firmware instruction must be there.

  43. How does the most significant address bit select ROM or RAM in the example?

    When A15 is 000, the address is below 0x8000 and selects ROM; when A15 is 111, the address is at least 0x8000 and selects RAM.

  44. What do CS and CE mean in a memory chip?

    CS means Chip Select and CE means Chip Enable; both identify the chip-activation control function.

  45. What does it mean that CS is active low?

    The memory chip is selected when its CS or CE input is at logic low.

  46. What is the high-impedance, or Z-state, of a memory output?

    A state in which the output is effectively disconnected from the bus.

  47. What is the purpose of the OE signal?

    OE means Output Enable and controls whether a memory chip drives the data bus.

  48. How are the memory-control signals connected in the example circuit?

    READ connects to both chips' OE inputs; WRITE connects to RAM's Write Enable input and is not used by ROM.

  49. 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 inverted A15 signal.

  50. 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 000.

  51. Why does RAM not interfere when the CPU reads address 000 in the example?

    Address line A15 is low, so ROM is selected while RAM is inactive and its outputs remain in the Z-state.

  52. What occurs when the CPU writes 0xAA to address 0xB000?

    The CPU places the address and data on the buses, pulls WRITE low, and RAM stores 0xAA at address 0xB000.

  53. How does the CPU later read the value stored at 0xB000?

    It places 0xB000 on the address bus, pulls READ low, and receives the RAM contents on the data bus.

  54. What is the purpose of the values 0xAA and 0x55 in programming?

    They are commonly used as alternating-bit patterns for memory testing.

  55. What is hexadecimal notation?

    A base-161616 numbering system using digits 000–999 and letters A–F.

  56. Why is hexadecimal useful for representing binary data?

    Each hexadecimal digit corresponds directly to a group of 444 binary bits.

  57. How many hexadecimal digits represent 888 bits and 161616 bits?

    888 bits require 222 hexadecimal digits; 161616 bits require 444 hexadecimal digits.

  58. What are a nibble, a byte, and a word?

    A nibble is 444 bits, a byte is 888 bits, and a word is 161616 bits or more.

  59. What hexadecimal ranges represent the ROM and RAM regions in the example?

    ROM occupies 0x0000–0x7FFF; RAM occupies 0x8000–0xFFFF.

  60. How are hexadecimal numbers commonly designated in C and assembly language?

    C uses the prefix 0x, while assembly commonly appends H to the number.

  61. What is VRAM?

    Video RAM is memory whose contents determine what appears on the computer screen.

  62. 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.

  63. 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.

  64. What are IOREQ and MEMREQ?

    Control-bus signals indicating an input-output request and a memory request, respectively.

  65. 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.

  66. 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.

  67. What signals must be decoded for a write-only port at address 0xFF?

    All eight address bits matching 0xFF, an active-low WRITE signal, and an active-low IOREQ signal.

  68. Why must IOREQ be decoded for a port at address 0xFF?

    To distinguish a write to port 0xFF from a write to memory address 0xFF.

  69. How does the one-bit port control an LED?

    The LED follows the least significant data bit, D0, stored in the flip-flop.

  70. What sequence turns the LED on through the output port?

    The CPU addresses 0xFF, places a 111 on D0, and pulls both WRITE and IOREQ low.

  71. 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.

  72. What did configuring an ISA Sound Blaster card's address and interrupt line accomplish?

    It configured the card's decoder and interrupt settings.

  73. How does PCI Express differ from the traditional shared-bus approach?

    Each motherboard slot has independent communication lines for its installed expansion board.

Card 1 of 73
Card 1 of 73

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent