TactivergeLite

Lite / Engineering Complex Systems / Term 3 worksheet

Worksheet: Engineering Complex Systems, term 3

Signals and Computing Hardware · Questions only. Check your answers in each Lite lesson, where they are graded on our server.

Name:   Date:

Week 19: From a wave to a list of numbers

1. Which signal is discrete in time but NOT quantised?

2. A signal is sampled at fs = 1 kHz from t = 0. At what time, in seconds, is sample x[250] taken?

Answer: s

3. x(t) = 3·cos(2π·2·t) is sampled at fs = 12 Hz, so x[n] = x(n/12). Find x[5] (to 2 decimal places).

Answer:

4. What is the energy E = Σ x[n]² of the sequence x = [2, −3, 1, 0, 1]?

Answer:

5. Code computes x[n] = sin(2π·5·n) for n = 0, 1, 2… and every value is (almost) zero. What went wrong?

6. A voltage is v(t) = 3 + 5·sin(2π·100·t) volts. What is its RMS value, in volts (to 2 decimal places)?

Answer: V

Check these in the lesson

Week 19: Amplitude, frequency, phase

1. Which property of a sinusoid does the phase φ change?

2. A motor shaft vibrates at f = 25 Hz. What is its angular frequency ω, in rad/s (to 1 decimal place)?

Answer: rad/s

3. UK mains is 230 V RMS. What is its peak voltage, in volts (nearest volt)?

Answer: V

4. A signal is x(t) = 1 + 6·sin(2π·440·t). What is its average power (mean of x², as for a 1 Ω load)?

Answer:

5. 3·sin(2π·5t) + 4·cos(2π·5t) is…

Check these in the lesson

Week 19: Rounding to the nearest step

1. An ideal 10-bit ADC spans 0 to 3.3 V. What is its step Δ, in millivolts (to 2 decimal places)?

Answer: mV

2. Adding one bit to an ideal ADC…

3. Using SNR ≈ 6.02·N + 1.76 dB, what is the best signal-to-quantisation-noise ratio of an ideal 10-bit ADC for a full-scale sine wave, in dB?

Answer: dB

4. A full-scale sine on an ideal 12-bit ADC gives 74 dB SNR. The same ADC sees a sine at one tenth of full scale. About what SNR, in dB?

Answer: dB

5. When does 'quantisation error behaves like even, random noise' break down?

Check these in the lesson

Week 20: How fast is fast enough?

1. An audio system samples at 48 kHz. What is its Nyquist frequency, in kHz?

Answer: kHz

2. A signal's highest frequency is 300 Hz. Which sample rate is the smallest of these that works?

3. A 330 Hz sinusoid is sampled at fs = 250 Hz. At what frequency (between 0 and fs/2) does it appear in the samples, in hertz?

Answer: Hz

4. A 20 Hz sinusoid is sampled at exactly 20 Hz. What do the samples show?

5. A control loop's fastest dynamics are at 8 Hz and the rule of thumb is to sample 20 times faster. What sample rate, in Hz?

Answer: Hz

Check these in the lesson

Week 20: Predicting the impostor

1. A 900 Hz whistle is sampled at 1 kHz. What alias frequency, in Hz, appears?

Answer: Hz

2. Sampled at fs = 100 Hz, which frequency gives exactly the same samples as a 20 Hz cosine?

3. A 330 Hz sinusoid is sampled at fs = 250 Hz. At what frequency (between 0 and fs/2) does it appear in the samples, in hertz?

Answer: Hz

4. A wheel turns 23 times a second and is filmed at 24 frames per second. How many times per second does it appear to turn (use a negative number for backwards)?

Answer: rev/s

5. A 1730 Hz tone is sampled at 500 Hz. What alias, in Hz?

Answer: Hz

Check these in the lesson

Week 20: Stopping aliases before they start

1. An RC low-pass has R = 1.6 kΩ and C = 100 nF. What is fc = 1/(2πRC), in Hz (nearest 5 Hz)?

Answer: Hz

2. Why can't a digital filter after the ADC remove aliases?

3. A first-order RC low-pass has fc = 2 kHz. Using |H| = 1/√(1 + (f/fc)²), what is its gain at 20 kHz (3 decimal places)?

Answer:

4. Why does oversampling make the analog anti-aliasing filter easier to design?

5. A 1210 Hz sinusoid is sampled at fs = 1000 Hz. At what frequency (between 0 and fs/2) does it appear in the samples, in hertz?

Answer: Hz

Check these in the lesson

Week 21: Seeing a signal's ingredients

1. You change only the phase of one component. What changes?

2. x(t) = 2·sin(2π·50t) + 1·sin(2π·150t). What is its average power?

Answer:

3. 3·sin(2π·5t) + 4·sin(2π·5t + 90°) is a single 5 Hz sinusoid. What is its amplitude?

Answer:

4. A signal is x(t) = 1 + 6·sin(2π·440·t). What is its average power (mean of x², as for a 1 Ω load)?

Answer:

5. Where does a constant offset appear in a spectrum?

Check these in the lesson

Week 21: A square wave made of curves

1. What is the amplitude of the fundamental of a ±1 square wave (3 decimal places)?

Answer:

2. What is the amplitude of the 4th harmonic of a symmetric square wave?

3. A square wave swings between +2 and −2 at f₀ = 200 Hz. What is the amplitude of its harmonic number n = 5 (the component at 1000 Hz)? Give 3 decimal places.

Answer:

4. What percentage of a square wave's power is in its fundamental alone (8/π² as a percentage, 1 decimal place)?

Answer: %

5. You add more and more harmonics. What happens to the overshoot near each jump?

Check these in the lesson

Week 21: The DFT: asking 'how much of this wave?'

1. In an N-point DFT, what does bin k measure?

2. x = [1, 0, −1, 0]. What is |X[1]| of its 4-point DFT?

Answer:

3. x[n] = [-1, 1, 1, 1] for n = 0…3. Compute |X[1]|, the magnitude of the 4-point DFT X[k] = Σ x[n]·e^(−j2πkn/4). Give 2 decimal places.

Answer:

4. A 1024-point DFT is taken of a signal sampled at 8 kHz. What frequency, in Hz, does bin k = 64 represent?

Answer: Hz

5. You need to tell 100 Hz and 102 Hz apart. What helps most?

Check these in the lesson

Week 22: The moving average, seen in frequency

1. A moving average with M = 10 runs at fs = 500 Hz. What is the lowest frequency it removes completely, in Hz?

Answer: Hz

2. A 2-point moving average y[n] = (x[n] + … + x[n−1])/2 filters x = [8, 2, 1, 8, 9, 0, 9] (n = 0…6). What is y[1]?

Answer:

3. How many samples of delay does a 9-point moving average add?

Answer: samples

4. An M = 4 point moving average runs at fs = 8000 Hz. Using |H(f)| = |sin(πMf/fs) / (M·sin(πf/fs))|, what is its gain at f = 2000 Hz? Give 3 decimal places.

Answer:

5. Noise on a sensor is random with standard deviation 4 mV. Roughly what is it after a 16-point moving average?

Check these in the lesson

Week 22: A filter with memory: first-order IIR

1. y[n] = 0.5x[n] + 0.5y[n−1], y[−1] = 0, and x[n] = 4 for n ≥ 0. What is y[1]?

Answer:

2. For a constant input X, the first-order IIR low-pass settles at…

3. y[n] = 0.2·x[n] + 0.8·y[n−1], with y[−1] = 0. The input is a step: x[n] = 5 for n ≥ 0. What is y[3]? Give 3 decimal places.

Answer:

4. Using n ≈ −1/ln(1 − α), about how many samples is the time constant for α = 0.1 (1 decimal place)?

Answer: samples

5. A gyroscope reading has a slow, steady bias of 0.3 °/s. Which output removes it?

Check these in the lesson

Week 22: Transforms: why engineers change the question

1. Filtering in time corresponds to what in frequency?

2. Which job needs a high-pass filter?

3. A first-order IIR low-pass has α = 0.2. Using α/(2 − α), what is its gain at the Nyquist frequency (3 decimal places)?

Answer:

4. An M = 4 point moving average runs at fs = 8000 Hz. Using |H(f)| = |sin(πMf/fs) / (M·sin(πf/fs))|, what is its gain at f = 2000 Hz? Give 3 decimal places.

Answer:

5. y[n] = 0.5·x[n] + 0.5·y[n−1], with y[−1] = 0. The input is a step: x[n] = 2 for n ≥ 0. What is y[0]? Give 3 decimal places.

Answer:

6. What does the Laplace transform mainly do for an engineer?

Check these in the lesson

Week 23: Doped silicon and the p–n junction

1. Doping silicon with boron (3 outer electrons) makes…

2. A silicon diode (0.7 V drop) is forward biased in series with a 1 kΩ resistor across 5 V. What current flows, in mA?

Answer: mA

3. A diode is reverse biased. What happens to the depletion region?

4. What controls a MOSFET's channel?

5. You want 10 mA through a diode (0.7 V drop) from a 3.7 V cell. What series resistance, in ohms?

Answer: Ω

Check these in the lesson

Week 23: Building gates from switches

1. A pMOS transistor conducts when its gate is…

2. A static CMOS gate with inputs A and B is built from two nMOS in series in the pull-down network and two pMOS in parallel in the pull-up network. Write its output Y for AB = 00, 01, 10, 11 as a 4-bit binary number (Y for 00 is the leftmost bit) and give that number in decimal.

Answer:

3. How many transistors are in a static CMOS 3-input NAND gate?

Answer: transistors

4. A student wires both networks of a gate so that, for input 11, both conduct. What happens?

5. A static CMOS gate with inputs A and B is built from a NOR stage (parallel nMOS, series pMOS) followed by a CMOS inverter. Write its output Y for AB = 00, 01, 10, 11 as a 4-bit binary number (Y for 00 is the leftmost bit) and give that number in decimal.

Answer:

Check these in the lesson

Week 23: Where a chip's power goes

1. α = 0.1, C = 1 nF, V = 1.0 V, f = 1 GHz. What is P = αCV²f, in watts?

Answer: W

2. Halving V (with α, C, f unchanged) changes dynamic power by a factor of…

3. A CMOS block switches C = 2 nF of total capacitance with activity factor α = 0.1, at V = 1.2 V and f = 200 MHz. Using P = αCV²f, what is its dynamic power, in watts (to 3 decimal places)?

Answer: W

4. Clock gating switches off the clock to idle blocks. Which term does it reduce?

5. How much energy, in picojoules, does one full charge-and-discharge cycle of a 10 fF node at 1 V cost (CV²)?

Answer: pJ

Check these in the lesson

Week 24: Specifying a state machine

1. In a Moore machine the output depends on…

2. A Moore machine outputs 1 for one clock whenever the last 2 input bits were 11 (overlaps allowed). Input, first bit first: 011001011100. How many clocks have output 1?

Answer:

3. A 101 detector has just output 1. The next input is 0. Where should it go?

4. A state machine has 6 states. How many flip-flops does a binary state encoding need?

Answer: flip-flops

5. A Moore machine outputs 1 for one clock whenever the last 3 input bits were 110 (overlaps allowed). Input, first bit first: 110011111111. How many clocks have output 1?

Answer:

Check these in the lesson

Week 24: A state machine in hardware

1. Which part of a hardware FSM holds the current state?

2. A controller has 9 states with binary encoding. How many flip-flops?

Answer: flip-flops

3. The same 9-state controller uses one-hot encoding. How many flip-flops?

Answer: flip-flops

4. A Moore machine outputs 1 for one clock whenever the last 3 input bits were 101 (overlaps allowed). Input, first bit first: 000101110111. How many clocks have output 1?

Answer:

5. Why does the state register load only on the clock edge?

Check these in the lesson

Week 24: A state machine in software

1. Why avoid long blocking delays inside a state machine's loop?

2. A super-loop pass takes at most 5 ms. What is the worst-case time, in ms, from an event to the start of the pass that acts on it?

Answer: ms

3. Which is a strength of a hardware FSM over a software one?

4. A Moore machine outputs 1 for one clock whenever the last 3 input bits were 101 (overlaps allowed). Input, first bit first: 000101110111. How many clocks have output 1?

Answer:

5. A junction controller passes a safety audit 'no conflicting greens in any reachable state'. Why check every reachable state, not just a normal cycle?

Check these in the lesson

Week 25: The contract between code and silicon

1. Which of these is NOT part of an ISA?

2. Two processors implement the same ISA. One is three times faster. What can you say?

3. An ISA has a 6-bit opcode field. At most how many different operations can it encode?

Answer: operations

4. TV-16 instructions are 16 bits: opcode = bits 15–12, rd = bits 11–9, rs = bits 8–6, imm = bits 5–0. The word is 0x67B2. What is the rs field, in decimal?

Answer:

5. On the 4-bit Nibble machine, A = 9 and M1 = 8. After ADD 1, what does A hold?

Answer:

Check these in the lesson

Week 25: Instructions are just numbers

1. Encode TV-16 'LDI R2, 5' (opcode 1, rd 2, rs 0, imm 5) and give the word in decimal.

Answer:

2. What is the 8-bit Nibble machine code for STORE 7 (STORE has opcode 3), in decimal?

Answer:

3. TV-16 instructions are 16 bits: opcode = bits 15–12, rd = bits 11–9, rs = bits 8–6, imm = bits 5–0. The word is 0x5738. What is the rs field, in decimal?

Answer:

4. TV-16's immediate field is 6 bits, unsigned. What is the largest constant LDI can load in one instruction?

Answer:

5. A designer wants 16 registers instead of 8 in TV-16, keeping 16-bit words and two register fields. What must shrink?

6. TV-16 instructions are 16 bits: opcode = bits 15–12, rd = bits 11–9, rs = bits 8–6, imm = bits 5–0. The word is 0xD6BB. What is the rs field, in decimal?

Answer:

Check these in the lesson

Week 25: Tracing a program, counting cycles

1. A straight-line program executes 6 instructions on a machine that takes 3 cycles per instruction. How many cycles?

Answer: cycles

2. In the Nibble machine, which instruction does NOT change the Z flag?

3. Using cycles = 9m + 6 for the count-down program, how many cycles does it take from M0 = 7?

Answer: cycles

4. A program spends 2 cycles on setup, then runs a loop 15 times with 8 cycles per pass. A new instruction cuts the loop body to 6 cycles. What is the speed-up (old cycles ÷ new cycles), to 2 decimal places?

Answer:

5. Two 8-bit registers start at A = 0, B = 4. On every clock edge both transfers happen at once: A ← B and B ← (A + B) mod 256. What does B hold after 6 clock cycles?

Answer:

Check these in the lesson

Week 26: Thinking in register transfers

1. Why does A ← B, B ← A in one cycle swap correctly in hardware?

2. An 8-bit register R starts at 210. Each clock edge performs R ← (R + 7) mod 256. What does R hold after 3 cycles?

Answer:

3. A = 1, B = 1. Each cycle: A ← B, B ← A + B. What is B after 4 cycles?

Answer:

4. Which block lets a register choose between keeping its value and loading a new one?

5. Two 8-bit registers start at A = 0, B = 4. On every clock edge both transfers happen at once: A ← B and B ← (A + B) mod 256. What does B hold after 6 clock cycles?

Answer:

Check these in the lesson

Week 26: The control unit is a state machine

1. In the stepper's model, what does the decode step change?

2. Which control signal is asserted for every instruction in the model?

3. A microcoded machine has 16 opcodes, 4 steps per instruction and a 12-bit control word. How many bits of microcode ROM?

Answer: bits

4. An 8-bit register R starts at 238. Each clock edge performs R ← (R + 25) mod 256. What does R hold after 4 cycles?

Answer:

5. During JNZ's execute step with Z = 1, what happens?

Check these in the lesson

Week 26: How fast can the clock tick?

1. t_clk→Q = 0.2 ns, logic = 1.0 ns, t_setup = 0.1 ns. What is f_max, in MHz (nearest whole number)?

Answer: MHz

2. What sets the maximum clock frequency of a synchronous design?

3. A register-to-register path has clock-to-Q delay 0.15 ns, 12 gates of 0.1 ns each on its longest path, and setup time 0.1 ns. What is the maximum clock frequency, in MHz (to 1 decimal place)?

Answer: MHz

4. Adding a pipeline register halfway along the critical path usually…

5. A register-to-register path has clock-to-Q delay 0.3 ns, 11 gates of 0.05 ns each on its longest path, and setup time 0.1 ns. What is the maximum clock frequency, in MHz (to 1 decimal place)?

Answer: MHz

Check these in the lesson

Week 27: Project: program the processor

1. Step counts are 25 for y = 3 and 41 for y = 5. Assuming N = b·y + s, what is b?

Answer: instructions

2. The Nibble machine multiplies 5 × 4 in 4-bit arithmetic. What value ends up in the answer cell?

Answer:

3. Why state a loop invariant before writing the program?

4. A program spends 2 cycles on setup, then runs a loop 15 times with 8 cycles per pass. A new instruction cuts the loop body to 6 cycles. What is the speed-up (old cycles ÷ new cycles), to 2 decimal places?

Answer:

5. Two 8-bit registers start at A = 0, B = 4. On every clock edge both transfers happen at once: A ← B and B ← (A + B) mod 256. What does B hold after 6 clock cycles?

Answer:

Check these in the lesson

Week 27: Project: then speed it up

1. Setup 1 instruction, loop of 7 instructions run 10 times. A change cuts the loop to 4. Speed-up (2 decimal places)?

Answer: ×

2. As the loop count grows very large, the speed-up from shrinking the body from b to b' approaches…

3. A program spends 2 cycles on setup, then runs a loop 8 times with 8 cycles per pass. A new instruction cuts the loop body to 5 cycles. What is the speed-up (old cycles ÷ new cycles), to 2 decimal places?

Answer:

4. A change makes 60 % of a program's run time 3 times faster. Using Amdahl's law, what is the overall speed-up (2 decimal places)?

Answer: ×

5. A design halves cycle count but makes the clock period 1.5 times longer. Net effect?

Check these in the lesson

Week 27: Signals meet hardware: the cycle budget

1. A 16 MHz microcontroller samples at 8 kHz. How many clock cycles are available per sample?

Answer: cycles

2. A 8 MHz processor needs 400 clock cycles to filter one sample. Ignoring everything else, what is the highest sample rate it can keep up with, in kHz?

Answer: kHz

3. A system is at 95 % load. Which change reduces load WITHOUT reducing the frequencies you can capture?

4. A 48 MHz processor filters a 48 kHz signal, using 400 cycles per sample. What percentage of its cycles does the filter use?

Answer: %

5. An ideal 16-bit ADC spans 0 to 2.5 V. What is its quantisation step Δ = V / 2^N, in millivolts?

Answer: mV

6. A 13920 Hz sinusoid is sampled at fs = 8000 Hz. At what frequency (between 0 and fs/2) does it appear in the samples, in hertz?

Answer: Hz

Check these in the lesson