NTEC
Sample questions

Sample questions, and how each is marked.

Two ways an answer is marked, against a key or by running what you built, on digital specimens written for this page.

  1. 01AptitudeEveryone
  2. 02Choose your domainsOne or more of four
  3. 03Domain questionsDigital · one specimen
  4. 04Built answersDigital · Verilog and drawn
Question section

A digital question, marked against the key.

Pick an answer to see how it is marked.

Digital · question section · single correct

A 4-to-1 multiplexer has sel set to 10. Which input appears at y?

How it is marked

Against the key, the moment the answer is saved. Pick an option to see the rule applied.

Right
The question’s marks
Wrong
Its negative marks, if it has any
Unanswered
Nothing

Marks and negative marks are set per question. A paper never shows the key; this page does, to show the rule.

Build problem · Verilog

A digital build problem set in Verilog.

Digital · build problem · Verilog

Build a 4-to-1 multiplexer.

y takes d0, d1, d2 or d3 according to sel. You are given the module; you fill it in and press Run.

mux4.v — given module
1module mux4 (
2  input  [3:0] d,
3  input  [1:0] sel,
4  output       y
5);
6  // your answer here
7endmodule
Port list, as given with the question.
PortDirWidthMeaning
din4the four data inputs, d3 down to d0
selin2selects which d reaches y
yout1the selected bit

A wrong attempt can carry a penalty set per contest, so a run is a decision, not a reflex.

testbench — run panel
t = 50 ns  5/5 vectors
Fail.y differs from the expected output at 30 ns.
01020304050time / nssel [1:0]d [3:0]y expectedy yours000110111010100110first mismatch at 30 ns — expected 1, got 0

A failure gives you the waveform at the first mismatch: see what your circuit did, change it, run again.

Press Run to replay this failure.

Build problem · drawn

A digital build set as a drawing, marked by the same testbench.

Gates instead of a text editor. You place and wire them; when you run, the drawing is driven by the same hidden testbench.

Judged on behaviour alone. Any circuit that produces the right outputs is correct, however you built it.

Set sel and watch the term that wins

with d = 1010 → y = —

sel1sel0sel1′sel1sel0′sel0d0&d1&d2&d3&≥1y1 — sel decoded to four rails, true and complement2 — one AND term per sel value; exactly one is high3 — the OR collects them4 — yfour AND terms decoded from sel, into one OR

One correct drawing: four AND terms decoded from sel, into one OR.

Behaviour with d = 1010, that is d3 d2 d1 d0.
selterm highsourcey
00sel1′ · sel0′d00
01sel1′ · sel0d11
10sel1 · sel0′d20
11sel1 · sel0d31

Two kinds of marking, one paper.