---
title: Problem set 1
heading: "Problem set 1: prefixes, notation and estimates"
eyebrow: A1 · Problem set 1
type: problems
---

::: hook
These problems use lessons 1 to 5: prefixes, notation, powers of two, estimation and scaling. Each one takes a few steps, and every learner gets their own numbers. Work them on paper, keep the units with every number, and check each answer for size before you enter it. "Another set" deals a fresh batch.
:::

::: pool
pick: 10

::: check
kind: parts
given: fs = 100 | 250 | 1000 | 4000; M = 4 | 8 | 16 | 64

## A data logger samples a sensor {fs} times a second. Each sample comes from a 12-bit ADC and is stored in 2 bytes. The logger has {M} MiB of memory.

::: part
answer: 2*fs
tolerance: 0.5%

### How many bytes does it store each second?

::: misses
- [fs] Each sample takes 2 bytes.
- [12*fs/8] A 12-bit sample is stored in two whole bytes, so count 2 bytes for each.
- [any] Multiply the samples each second by the bytes each sample takes.
:::
:::

::: part
answer: M*2^20/(2*fs)/3600
tolerance: 1%

### How many hours until the memory is full?

::: misses
- [M*1e6/(2*fs)/3600] A MiB is $2^{20}$ = 1 048 576 bytes, not a million.
- [M*2^20/fs/3600] Each sample takes 2 bytes, so divide by twice the sample rate.
- [M*2^20/(2*fs)] That's in seconds. Divide by 3600 for hours.
- [any] Divide the memory in bytes by the bytes stored each second, then turn seconds into hours.
:::
:::

::: right
Right. A data logger's life is almost always memory divided by data rate, and the factor of 1024 against 1000 makes a 5% difference at this size.
:::
:::

::: check
kind: parts
given: I = 1n..10m E3 A; t = 10 | 60 | 120

## A current of {I} flows for {t} s.

::: part
answer: I*t
unit: C

### How much charge passes?

::: misses
- [I/t] Charge is current times time.
- [any] $Q = It$.
:::
:::

::: part
answer: I*t/1.602176634e-19
tolerance: 1%

### How many electrons is that? Each carries $1.602 \times 10^{-19}$ C.

::: misses
- [I*t*1.602176634e-19] Divide the charge by the charge of one electron.
- [any] Divide the total charge by $1.602 \times 10^{-19}$ C.
:::
:::

::: right
Right. Even a nanoamp for a second is billions of electrons, which is why current behaves like a smooth flow.
:::
:::

::: check
kind: parts
given: Q = 3000..5000 step 500; P = 0.5 | 0.8 | 1.2 | 2

## A phone battery is rated {Q} mAh at 3.85 V, and the phone draws an average of {P} W.

::: part
answer: Q*1e-3*3.85
unit: Wh

### How much energy does the battery hold?

::: misses
- [Q*3.85] Write the charge in amp-hours first: {Q} mAh is $\given{Q} \times 10^{-3}$ Ah.
- [Q*1e-3] That's the charge in Ah. Multiply by the voltage for energy.
- [any] Energy is charge times voltage: Ah times V gives Wh.
:::
:::

::: part
answer: Q*1e-3*3.85*3600
unit: J

### How many joules is that?

::: misses
- [Q*1e-3*3.85*60] An hour has 3600 seconds.
- [any] 1 Wh is 3600 J.
:::
:::

::: part
answer: Q*1e-3*3.85/P
tolerance: 1%

### How many hours does a full charge last?

::: misses
- [P/(Q*1e-3*3.85)] That's upside down. Divide the energy by the power.
- [Q*1e-3/P] Use the energy in Wh, not the charge in Ah.
- [any] Hours = energy in Wh divided by power in W.
:::
:::
:::

::: check
kind: parts
given: R = 100..10k E12 Ω; V = 2 | 3 | 5 | 9; k = 2 | 3

## A {R} resistor has {V} V across it.

::: part
answer: V^2/R
unit: W

### What power does it turn into heat?

::: misses
- [V/R] That's the current. Power is $V^2/R$.
- [V^2*R] Divide by the resistance: $P = V^2/R$.
- [any] $P = V^2/R$.
:::
:::

::: part
answer: k^2
tolerance: 0.5%

### The voltage is raised {k} times. By what factor does the power go up?

::: misses
- [k] Power goes as the square of the voltage.
- [any] Square the factor.
:::
:::

::: part
answer: sqrt(0.25*R)
unit: V

### The resistor is rated 0.25 W. What is the highest voltage it can take?

::: misses
- [0.25*R] That's $V^2$. Take the square root.
- [sqrt(0.25/R)] Rearrange $P = V^2/R$ to $V = \sqrt{PR}$.
- [any] $V = \sqrt{PR}$.
:::
:::
:::

::: check
kind: parts
given: A = 10..20 int; w = 16 | 32

## A memory chip has {A} address lines, and each location holds {w} bits.

::: part
answer: 2^A
tolerance: 0.5

### How many locations does it have?

::: misses
- [2*A] Each address line doubles the number of locations.
- [2^A - 1] That's the highest address. Counting address 0, there's one more location.
- [any] {A} lines name $2^{\given{A}}$ locations.
:::
:::

::: part
answer: 2^A*w/8
tolerance: 0.5

### How many bytes does it hold?

::: misses
- [2^A*w] That's the number of bits. Divide by 8 for bytes.
- [2^A] Each location holds {w} bits, which is $\given{w}/8$ bytes.
- [any] Locations times bits per location, divided by 8.
:::
:::

::: part
answer: 2^A*w/8/1024
tolerance: 0.5%

### How many KiB is that?

::: misses
- [2^A*w/8/1000] A KiB is 1024 bytes.
- [any] Divide the bytes by 1024.
:::
:::
:::

::: check
kind: parts
given: fps = 24 | 30 | 60; r = 1 | 2.5 | 5

## A camera makes 1920 × 1080 pixel frames at {fps} frames a second, with 3 bytes per pixel. It sends them over a {r} Gb/s link. Take M and G as powers of ten.

::: part
answer: 1920*1080*3/1e6
tolerance: 0.5%

### How many MB is one frame?

::: misses
- [1920*1080/1e6] Each pixel takes 3 bytes.
- [1920*1080*3*8/1e6] That's megabits. The question asks for megabytes.
- [any] Pixels times bytes per pixel, in millions.
:::
:::

::: part
answer: 1920*1080*3*8*fps/1e9
tolerance: 0.5%

### How many Gb/s does the uncompressed video need?

::: misses
- [1920*1080*3*fps/1e9] That's gigabytes per second. Link speeds are in bits: multiply by 8.
- [1920*1080*3*8/1e9] That's one frame. Multiply by {fps} frames a second.
- [any] Bytes per frame, times 8 bits, times frames each second.
:::
:::

::: part
answer: 1920*1080*3*8*fps/1e9/r
tolerance: 1%

### By what factor must the video be compressed to fit the link?

::: misses
- [r/(1920*1080*3*8*fps/1e9)] That's upside down. The video needs more than the link carries.
- [any] Divide the video's rate by the link's rate.
:::
:::
:::

::: check
kind: parts
given: P = 5..50 step 5; c = 0.06 | 0.08 | 0.1

## A data center draws {P} MW day and night. Electricity costs {c} dollars per kWh.

::: part
answer: P*8760/1000
unit: GWh
tolerance: 1%

### How much energy does it use in a year, in GWh? A year is 8760 hours.

::: misses
- [P*8760] That's in MWh. A GWh is 1000 MWh.
- [P*365/1000] A year has 8760 hours, not 365.
- [any] Megawatts times hours gives MWh. Divide by 1000 for GWh.
:::
:::

::: part
answer: P*8760*1000*c/1e6
tolerance: 1%

### What does that cost per year, in millions of dollars?

::: misses
- [P*8760*c/1e6] Convert to kWh first: a MWh is 1000 kWh.
- [P*8760*1000*c] That's in dollars. Divide by a million.
- [any] Energy in kWh times the price, in millions.
:::
:::
:::

::: check
kind: parts
given: N = 10 | 12 | 16; V = 3.3 | 5; s = 10 | 20

## A temperature sensor puts out {s} mV per °C into an ADC with {N} bits and a range of 0 to {V} V.

::: part
answer: V/2^N
unit: V

### How big is one step of the ADC?

::: misses
- [V/N] {N} bits make $2^{\given{N}}$ steps.
- [any] Divide the range by $2^{\given{N}}$.
:::
:::

::: part
answer: V/2^N*1000/s
unit: °C

### What temperature change does one step stand for?

::: misses
- [V/2^N/s] Put the step in millivolts first, to match the sensor's mV per °C.
- [s/(V/2^N*1000)] That's upside down. Divide the step by the sensor's millivolts per degree.
- [any] Divide the step, in mV, by {s} mV/°C.
:::
:::

::: part
answer: V*1000/s
unit: °C

### What is the highest temperature above 0 °C it can read before the ADC runs out of range?

::: misses
- [V/s] Use millivolts: {V} V is $\given{V} \times 1000$ mV.
- [any] Divide the full range, in mV, by the sensor's mV per °C.
:::
:::
:::

::: check
kind: parts
given: C = 1..470 E6; V = 5 | 12 | 25; k = 2 | 4 | 9

## A capacitor stores energy $E = \frac{1}{2}CV^2$. Here $C$ = {C} µF, charged to {V} V.

::: part
answer: 0.5*C*1e-6*V^2
unit: J

### How much energy does it store?

::: misses
- [0.5*C*V^2] Put the capacitance in farads: {C} µF is $\given{C} \times 10^{-6}$ F.
- [C*1e-6*V^2] Include the factor of one half.
- [0.5*C*1e-6*V] The voltage is squared.
- [any] $E = \frac{1}{2}CV^2$ with $C$ in farads.
:::
:::

::: part
answer: sqrt(k)*V
unit: V

### To what voltage must it be charged to store {k} times as much?

::: misses
- [k*V] Energy goes as $V^2$, so the voltage only needs to rise by $\sqrt{\given{k}}$.
- [k^2*V] Energy goes as $V^2$, so take a square root to go back to voltage.
- [any] Multiply the voltage by $\sqrt{\given{k}}$.
:::
:::
:::

::: check
kind: parts
given: E = 2 | 2.5 | 3; p = 0.4 | 0.5 | 0.8; g = 0.12 | 0.15 | 0.2

## An AA alkaline cell holds about {E} Wh and costs {p} dollars. Grid electricity costs {g} dollars per kWh.

::: part
answer: E*3600
unit: J

### How many joules does one cell hold?

::: misses
- [E*60] An hour has 3600 seconds.
- [any] 1 Wh is 3600 J.
:::
:::

::: part
answer: 1000/E
tolerance: 1%

### How many cells would it take to hold 1 kWh?

::: misses
- [1/E] A kWh is 1000 Wh.
- [any] Divide 1000 Wh by the energy per cell.
:::
:::

::: part
answer: 1000/E*p/g
tolerance: 1%

### How many times more expensive is energy from AA cells than from the grid?

::: misses
- [1000/E*p] That's the dollars per kWh from cells. Divide by the grid's price.
- [g/(1000/E*p)] That's upside down. Cell energy is the expensive one.
- [any] Find the cost of a kWh from cells, then divide by {g}.
:::
:::
:::

::: check
kind: parts
given: Is = 2 | 5; Iw = 5 | 10; tw = 5 | 10 | 20; T = 10 | 30 | 60; Q = 220 | 620

## A sensor sleeps drawing {Is} µA. Every {T} s it wakes for {tw} ms and draws {Iw} mA. It runs from a {Q} mAh coin cell.

::: part
answer: (Iw*1e-3*tw*1e-3 + Is*1e-6*(T - tw*1e-3))/T*1e6
unit: µA
tolerance: 1%

### What is its average current, in µA?

::: misses
- [(Iw*1e-3 + Is*1e-6)/2*1e6] Averaging the two currents ignores how long each lasts. Weight each by its time.
- [Iw*1e-3*tw*1e-3/T*1e6] That's only the awake part. Add the sleep current too.
- [any] Add up the charge used in one cycle (current times time for each part), then divide by the cycle's length.
:::
:::

::: part
answer: Q*1e3/((Iw*1e-3*tw*1e-3 + Is*1e-6*(T - tw*1e-3))/T*1e6)/24
tolerance: 1%

### How many days does the cell last?

::: misses
- [Q*1e3/((Iw*1e-3*tw*1e-3 + Is*1e-6*(T - tw*1e-3))/T*1e6)] That's in hours. Divide by 24.
- [any] Write the capacity in µAh ({Q} mAh is $\given{Q} \times 1000$ µAh), divide by the average current for hours, then turn hours into days.
:::
:::

::: right
Right. Duty cycling is how a coin cell runs a sensor for months: the short bursts dominate the average.
:::
:::

::: check
kind: parts
given: Pt = 100 | 200 | 500; Pp = 1 | 3 | 10; n = 5..20 int

## A {Pt} W TV is left on standby, drawing {Pp} W, for the 24 hours a day it's not watched, except for the {n} hours a week it's on.

::: part
answer: Pp*(168 - n)/1000
tolerance: 1%

### How many kWh does standby use in a week? A week is 168 hours.

::: misses
- [Pp*168/1000] Take out the {n} hours it's on.
- [Pp*(168 - n)] That's in Wh. Divide by 1000.
- [any] Standby power times standby hours, in kWh.
:::
:::

::: part
answer: Pt*n/1000
tolerance: 1%

### How many kWh does watching use in a week?

::: misses
- [Pt*n] That's in Wh. Divide by 1000.
- [any] Power times hours, in kWh.
:::
:::

::: part
answer: Pp*(168 - n)/(Pt*n)*100
tolerance: 1%

### What is standby's energy, as a percent of the watching energy?

::: misses
- [Pt*n/(Pp*(168 - n))*100] That's upside down. Divide standby by watching.
- [any] Divide the standby kWh by the watching kWh, times 100.
:::
:::
:::
:::
