Chapter 1.2: Computer Hardware

Computer Hardware · Study Questions
CPUClock speed and coresMotherboard and ROMMemory hierarchy and cacheConnections and powerInput and output devicesStorage and compatibility
Sercan KÜLCÜ · Giresun University · Computer Engineering

Multiple Choice · Hardware and the CPU

Question 1: Where Does the CPU Run a Program From?

A program stored on the SSD is opened by double-clicking it. Where does the CPU fetch the program’s instructions from and execute them?

B: The CPU runs from RAM, not directly from the SSD: SSD → RAM → cache → registers. The SSD is permanent but slow (~0.1 ms), RAM is temporary but fast (~100 ns). UEFI is firmware that runs only at startup.

Output Question · Hardware and the CPU

Question 2: Clock Speed Calculations

Clock speed is the number of cycles per second (1 GHz = 10⁹ cycles/s).
a) How long does one cycle take on a 4 GHz processor, in ns?
b) How many cycles does a 2.5 GHz processor make in 1 second?
c) If each instruction takes 4 cycles, how many instructions per second does a 3 GHz processor execute?

Show answer

a) 0.25 ns   b) 2.5 billion   c) 750 million

  • a) 1 ÷ (4 × 10⁹) s = 0.25 × 10⁻⁹ s = 0.25 ns. (At 3 GHz it is ≈ 0.33 ns.)
  • b) 2.5 × 10⁹ = 2,500,000,000 cycles.
  • c) 3 × 10⁹ ÷ 4 = 750 × 10⁶ instructions/s.

GHz alone does not determine performance: the number of cores, the cache and the architecture matter too.

Multiple Choice · Hardware and the CPU

Question 3: Do 8 Cores Mean 8 Times the Speed?

A single-threaded program (its work cannot be split) is run on an 8-core processor instead of a 1-core one at the same clock speed. What is expected?

A: A core runs an independent stream of instructions; more cores speed things up only if the work can be split. “8 cores = 8 times the speed” is false. If other programs run at the same time, they can be spread over the other cores.

Output Question · Hardware and the CPU

Question 4: Distributing Work Across Cores

There are independent jobs that each take 6 seconds on one core. The jobs cannot be split, and a core does one job at a time. What is the total time?
a) 4 jobs, 1 core   b) 4 jobs, 4 cores   c) 5 jobs, 4 cores

Show answer

a) 24 s   b) 6 s   c) 12 s

1 coreABCD24 s4 cores6 s4 cores, 5 jobs12 s06121824
  • a) Jobs one after another: 4 × 6 = 24 s. b) All four at once: 6 s (4 times faster).
  • c) 4 jobs finish in the first 6 s, and the 5th job (E) waits for a core to become free: 12 s. Adding cores does not always give a proportional speedup.

Multiple Choice · Motherboard and Memory

Question 5: The Memory Hierarchy

Which statement about the memory hierarchy is true?

D: 0.1 ms = 100,000 ns; 100,000 ÷ 100 = 1,000, ÷ 50 = 2,000. The upper levels (registers, cache) are fast, small and expensive. RAM is temporary, SSD/HDD are permanent; since an HDD is mechanical, it is about 100 times slower than an SSD.

Step-by-Step Trace · Motherboard and Memory

Question 6: Cache Hits and Misses

The cache starts empty. On a miss, the data is fetched from RAM in ~80 ns and copied into the cache together with its neighbor (pairs such as 2000–2001); a hit takes ~1 ns. What is the total time?

The CPU checks the cache first for every address.

2000 is not there → miss: 80 ns from RAM. 2001 comes along with it.

2001 is in the cache → hit, 1 ns. Fetching the neighbor paid off.

2000 requested again → hit.

2002 is not there → miss, +80 ns; 2002–2003 are copied.

2003 → hit.

2002 → hit.

Cache2000–20012002–20034 hits2 misses4·1 + 2·80 = 164 nsno cache: 6 × 80 = 480 ns

Total 164 ns. Without a cache it would take 6 × 80 = 480 ns.

addresses ← 2000, 2001, 2000,
             2002, 2003, 2002
time ← 0
for each address a:
    if a is in the cache then
        time ← time + 1   ; hit
    else
        time ← time + 80  ; miss
        a + neighbor → cache
print(time)

Multiple Choice · Motherboard and Memory

Question 7: From Fast to Slow

Which is the order of the memory hierarchy levels from fastest to slowest by access time?

D: Register < 1 ns, cache ~1–10 ns, RAM ~100 ns, SSD ~0.1 ms, HDD ~10 ms. The upper levels are faster, smaller and more expensive; the lower levels are slower and larger.

Output Question · Connections and Power

Question 8: Copying over USB

A 2 GB (2,000 MB) file is copied at the highest theoretical speeds. In speed units, a small “b” is a bit and a capital “B” is a byte.
a) How many seconds does it take over USB 2.0 (480 Mbit/s)?
b) How many seconds does it take over USB 3.2 Gen 1 (5 Gbit/s = 5,000 Mbit/s)?

Show answer

a) ≈ 33.3 s   b) 3.2 s

bbbbbbbb8 bits = 1 byte480 Mbit/s ÷ 8= 60 MB/s
  • a) 480 ÷ 8 = 60 MB/s → 2,000 ÷ 60 ≈ 33.3 s.
  • b) 5,000 ÷ 8 = 625 MB/s → 2,000 ÷ 625 = 3.2 s.

Real speeds are lower because of the disk and the cable. The connector shape (A, C) and the version (speed) are separate things.

Multiple Choice · Connections and Power

Question 9: Is Every USB-C the Same?

A laptop has two USB-C ports. Which statement is true?

C: USB-C is a connector shape; the speed is set by the USB version (2.0, 3.2, USB4). Video and power support also depend on the model, so check the port’s specifications. The older connection that carries analog video is VGA.

Output Question · Connections and Power

Question 10: Size of an Audio Recording

The sound card’s ADC measures the microphone signal 44,100 times per second; each sample is 16 bits (2 bytes), and the recording is stereo (2 channels). How many bytes does an uncompressed 1-minute recording take? About how many MiB is that?

Show answer

10,584,000 bytes ≈ 10.1 MiB

  • Per second: 44,100 samples × 2 bytes × 2 channels = 176,400 bytes.
  • 1 minute: 176,400 × 60 = 10,584,000 bytes.
  • ÷ 1,048,576 ≈ 10.09 MiB.

The ADC converts analog to digital; during playback the DAC turns the numbers back into the signal that drives the speaker.

Output Question · Connections and Power

Question 11: Choosing a Power Supply

In a system the CPU draws 105 W, the graphics card 285 W and the other components 60 W. A 30% safety margin will be left. Which of the 450 / 550 / 650 / 750 W models on the market is chosen?

Show answer

650 W

CPU 105GPU 28560+%30450 W585 W
  • Total: 105 + 285 + 60 = 450 W.
  • With the margin: 450 × 1.3 = 585 W → the smallest model above 585 is 650 W.
  • The example in the lecture: 420 × 1.3 ≈ 546 W → 550 W.

Besides wattage, efficiency, connectors (CPU 8-pin, GPU) and protection features are also checked.

Multiple Choice · Input and Output

Question 12: Both Input and Output

Which of the following devices is both an input and an output device?

D: A touchscreen receives touch (input) and shows the image (output). The criterion is the direction of the data flow: the scanner and microphone are input, the projector is output. A headset with microphone, a multifunction printer, an SSD and a network card are also two-way.

Step-by-Step Trace · Input and Output

Question 13: Keyboard Shortcuts

A text box contains “abc”, the cursor is at the end of the text, and the clipboard (copied) holds “12”. The keys below are pressed in order. What is the text after each key?

▏ marks the cursor position.

Ctrl + V pastes the clipboard at the cursor. The clipboard does not change.

Backspace deletes the character to the left of the cursor (2).

Delete removes the character to the right of the cursor; since the cursor is at the end, nothing happens.

Pasted again: “abc1” + “12”.

Ctrl + Z undoes the last action (the paste). Result: abc1.

; start: text “abc”, cursor at the end
; clipboard: “12”
Ctrl + V
Backspace
Delete
Ctrl + V
Ctrl + Z

Output Question · Input and Output

Question 14: PPI and Refresh Rate

a) What is the PPI of a 14-inch, 1920 × 1080 laptop screen?
b) What is the PPI of a 32-inch, 3840 × 2160 monitor? Which one is sharper?
c) On a 240 Hz monitor, how many ms does one frame stay on the screen?

Show answer

a) ≈ 157 PPI   b) ≈ 138 PPI; the laptop is sharper   c) ≈ 4.2 ms

1920 pixels1080√(1920² + 1080²) ≈ 2203÷ 14 inches≈ 157 PPI
  • b) √(3840² + 2160²) ≈ 4406 ÷ 32 ≈ 137.7. The resolution is higher, but the screen is also bigger.
  • c) 1,000 ÷ 240 ≈ 4.17 ms (16.7 ms at 60 Hz). Refresh rate is not the same thing as response time.

Multiple Choice · Input and Output

Question 15: True Black on OLED

Why does black look “truly black” on OLED screens compared with LCDs (IPS, VA, TN)?

A: In an LCD the backlight (LED) is always on; for black, the liquid crystal only tries to block the light, and some leaks through. IPS, VA and TN are all types of LCD; the difference is in how the liquid crystals are arranged.

Multiple Choice · Storage

Question 16: A Property of the SSD

Compared with an HDD, which statement is true for an SSD?

B: In an SSD the controller reads data from several NAND flash chips in parallel. A and D describe the HDD (the head moves to the track and waits for the sector to rotate → milliseconds). For archives and high capacity, an HDD is still cheaper.

Step-by-Step Trace · Storage

Question 17: HDD Access Time

An HDD at 5400 rpm has an average seek time of 9 ms and a transfer rate of 100 MB/s. Calculate step by step the average access time for a 4 KB sector (1 MB = 1000 KB).

Seek: the arm moves the head to the target track; mechanical movement takes milliseconds.

1 minute = 60,000 ms; 60,000 ÷ 5400 ≈ 11.11 ms per full rotation.

Rotational latency: the sector is on average half a rotation away.

4 KB = 0.004 MB; 0.004 ÷ 100 = 0.00004 s = 0.04 ms.

seek 9rotation 5.56≈ 14,6 mstransfer (0.04 ms) is almost invisible on the bar

Total ≈ 14.6 ms; almost all of it is mechanical waiting. An SSD (~0.1 ms) does this job ~146 times faster.

This is why many small files are slow on an HDD; a 7200 rpm disk waits half a rotation in ≈ 4.2 ms.

rpm ← 5400
seek ← 9              ; ms
rotation ← 60000 / rpm    ; ms
latency ← rotation / 2
transfer ← 4 KB / 100 MB/s
total ← seek + latency + transfer

Multiple Choice · Compatibility

Question 18: Component Compatibility

Which statement about component compatibility is true?

C: PCIe slots are backward compatible. A is wrong: DDR4 and DDR5 are physically different and do not fit each other’s slots. M.2 is a form factor; a slot may support SATA, NVMe or both. Physical (form factor) compatibility is also required.

The End

Computer Hardware: Study Questions
Lecture slides: Chapter 1.2: Computer Hardware · Lecture notes
1 / 1 Sercan KÜLCÜ. All rights reserved.