2IC30 · assessmentModule quizzes01 · Module 1 — Digital Logic02 · Module 2 — Numbers & Arithmetic03 · Module 3 — Sequential Logic04 · Module 4 — Finite State Machines05 · Module 5 — Processor Architecture06 · Module 6 — Assembly & Programming07 · Module 7 — Compilers & System08 · Module 8 — OS & Memory1/8○ Not startedModule 1 — Digital LogicQuestion 11.For how many of its 4 input rows is a NAND gate's output 0?○0○1○3○4Question 22.¬(a ∧ b) equals:○¬a ∧ ¬b○¬a ∨ ¬b○a ∨ b○¬(a ∨ b)Question 33.A minterm is read from a truth-table row where the output is:○0○1○don't care○eitherQuestion 44.In a 4-variable K-map, a group of 8 cells yields a term with how many literals?○1○2○3○4Question 55.Which set is NOT functionally complete?○{NAND}○{NOR}○{AND, OR}○{OR, NOT}Question 66.Two-level AND-OR logic is equivalent to:○NOR-NOR○NAND-NAND○XOR-XOR○AND-ANDQuestion 77.Why are K-map axes labelled 00,01,11,10?○Alphabetical○It is Gray code so neighbours differ in one bit○Random○To save spaceQuestion 88.A 2-input multiplexer computes:○a0∧a1○a0∨a1○a0∧¬s ∨ a1∧s○a0⊕a1Check answersModule 2 — Numbers & ArithmeticQuestion 11.Converting decimal to base b, you read the remainders:○top to bottom○bottom to top○left to right○largest firstQuestion 22.The 4-bit 2's-complement of 0011 (3) is:○1100○1101○1011○0011Question 33.Range of an 8-bit 2's-complement number:○0…255○−128…127○−127…127○−128…128Question 44.Adding two negative numbers gives a positive result. This means:○No overflow○Carry only○Signed overflow (V=1)○Zero flag setQuestion 55.Which flag indicates UNSIGNED overflow?○N○Z○V○CQuestion 66.A full adder's sum output is:○a∧b∧cin○a∨b∨cin○a⊕b⊕cin○a∧bQuestion 77.Sign-extending −4 (1100) to 8 bits gives:○0000 1100○1111 1100○1000 0100○1100 0000Question 88.A single parity bit can:○Correct 1 error○Detect 1 error○Correct 2 errors○Compress dataCheck answersModule 3 — Sequential LogicQuestion 11.The forbidden input of an SR latch is:○S=0,R=0○S=1,R=0○S=0,R=1○S=1,R=1Question 22.A transparent D-latch passes D to Q:○only on the rising edge○while the enable is 1○while the enable is 0○neverQuestion 33.Setup time is the interval D must be stable:○after the clock edge○before the clock edge○during reset○between edgesQuestion 44.Max clock frequency is bounded by:○t_su only○t_pd,comb + t_pd,FF + t_su○t_pd,FF only○the data-bus widthQuestion 55.On a shared bus, how many output enables may be active at once?○Zero always○Exactly one○Two○Any numberQuestion 66.The 'Z' state of a 3-state output means:○logic 0○logic 1○high impedance / disconnected○clock lowQuestion 77.A 2→4 decoder plus 3-state buffers builds a:○flip-flop○multiplexer○adder○register fileQuestion 88.A JK flip-flop toggles when:○J=1,K=0○J=0,K=1○J=K=1○J=K=0Check answersModule 4 — Finite State MachinesQuestion 11.A Moore machine's output depends on:○state only○input only○state and input○the clockQuestion 22.Which machine usually needs fewer states?○Moore○Mealy○Both equal○Neither has statesQuestion 33.Two states may be merged if they have the same output and:○the same name○the same successors for every input○one transition○an even codeQuestion 44.One-hot encoding for 5 states uses how many flip-flops?○3○4○5○2Question 55.Gray-coding cyclic states helps because:○it uses fewer states○only one state bit changes per transition○it needs no clock○outputs vanishQuestion 66.Synchronous circuits tolerate combinational glitches because:○glitches can't occur○FFs sample only at the edge after glitches settle○the clock removes them○outputs are asyncQuestion 77.In the FSM design flow, Karnaugh maps are used to:○assign states○derive next-state and output functions○choose the clock○minimise statesCheck answersModule 5 — Processor ArchitectureQuestion 11.The von Neumann architecture stores:○program and data separately○program and data in the same memory○only data○only registersQuestion 22.Which is an IMPLEMENTATION-only register?○IP○R2○CC○IRQuestion 33.Instruction fetch takes how many cycles (no prefetch)?○1○2○3○5Question 44.'LOAD R3 [R1]' uses which addressing?○immediate○direct register○register indirect○indexedQuestion 55.A STOR instruction's destination operand must be:○a literal○a register○a memory location○the IPQuestion 66.The Conductor is:○the ALU○a control FSM driving the datapath○a register file○a cacheQuestion 77.With prefetch, 'ADD RA RB' drops from 4 cycles to:○3○2○1○0Question 88.When polling input, the carry flag C=1 means:○new data ready○no new data○overflow○data overwrittenCheck answersModule 6 — Assembly & ProgrammingQuestion 11.Pushing onto the stack:○increments SP○decrements SP○leaves SP○clears SPQuestion 22.Return addresses are kept on a stack to allow:○faster clocks○recursion and nesting○more registers○smaller codeQuestion 33.RTI differs from RTS in that it also restores:○the stack pointer○the condition flags○the program○the cacheQuestion 44.On ARM, which register is the link register?○R13○R14○R15○R12Question 55.ARM 'ADDEQ R1,R1,#1' executes:○always○only if Z is set○only if carry set○neverQuestion 66.On ARM, 'MOV R0,R1,LSL #2' computes:○R1/4○R1×4○R1+2○R1−2Question 77.To load an arbitrary 32-bit constant on ARM you use:○MOV R0,#value○LDR R0,=value○ADD R0,#value○PUSH valueQuestion 88.After 'SUB SP locals', a parameter previously at SP+1 is now at:○SP+1○SP+1+locals○SP−1○SP+localsCheck answersModule 7 — Compilers & SystemQuestion 11.A compiler differs from an interpreter in that it:○executes directly○translates to machine code first○needs no memory○is always slower at runtimeQuestion 22.BNF is used to describe a language's:○semantics○syntax (grammar)○runtime○registersQuestion 33.In the translation convention, an expression's result is left:○in R0○on the stack○in memory[0]○in the IPQuestion 44.A 20-bit address bus can address:○20 locations○2^20 locations○20^2 locations○2×20 locationsQuestion 55.DRAM differs from SRAM in that it:○needs no power○stores charge in capacitors and needs refresh○is faster○uses no addressesQuestion 66.Caches were introduced because:○memory was too small○CPU speed outran external memory speed○to save power only○for graphicsQuestion 77.Out-of-order execution preserves:○all instruction orderings○only true data dependencies○nothing○only branchesQuestion 88.An atomic synchronisation instruction is:○LOAD○compare_and_swap○ADD○BRACheck answersModule 8 — OS & MemoryQuestion 11.A context switch is usually triggered by:○a page fault○a timer interrupt○a compile error○a cache missQuestion 22.Semaphores are needed because operations like x:=x+1 are:○atomic○non-atomic (load-add-store)○too fast○read-onlyQuestion 33.The page table maps:○registers to memory○virtual pages to physical frames○files to disc○cache to RAMQuestion 44.On a page fault, after swapping in the page the CPU:○skips the instruction○re-executes the faulting instruction○halts○clears registersQuestion 55.The executable bit on a page controls whether the page may be:○read○written○fetched as instructions○swappedQuestion 66.The optimal page-replacement policy is not implementable because it:○is too slow○requires knowing future accesses○uses too much RAM○needs a clockQuestion 77.Segmentation (vs paging) primarily provides:○fixed-size frames○independent growable address spaces○no fragmentation○faster clocksCheck answers← Previous question02 · Module 2 — Numbers & Arithmetic →
2IC30 · assessmentModule quizzes01 · Module 1 — Digital Logic02 · Module 2 — Numbers & Arithmetic03 · Module 3 — Sequential Logic04 · Module 4 — Finite State Machines05 · Module 5 — Processor Architecture06 · Module 6 — Assembly & Programming07 · Module 7 — Compilers & System08 · Module 8 — OS & Memory1/8○ Not startedModule 1 — Digital LogicQuestion 11.For how many of its 4 input rows is a NAND gate's output 0?○0○1○3○4Question 22.¬(a ∧ b) equals:○¬a ∧ ¬b○¬a ∨ ¬b○a ∨ b○¬(a ∨ b)Question 33.A minterm is read from a truth-table row where the output is:○0○1○don't care○eitherQuestion 44.In a 4-variable K-map, a group of 8 cells yields a term with how many literals?○1○2○3○4Question 55.Which set is NOT functionally complete?○{NAND}○{NOR}○{AND, OR}○{OR, NOT}Question 66.Two-level AND-OR logic is equivalent to:○NOR-NOR○NAND-NAND○XOR-XOR○AND-ANDQuestion 77.Why are K-map axes labelled 00,01,11,10?○Alphabetical○It is Gray code so neighbours differ in one bit○Random○To save spaceQuestion 88.A 2-input multiplexer computes:○a0∧a1○a0∨a1○a0∧¬s ∨ a1∧s○a0⊕a1Check answersModule 2 — Numbers & ArithmeticQuestion 11.Converting decimal to base b, you read the remainders:○top to bottom○bottom to top○left to right○largest firstQuestion 22.The 4-bit 2's-complement of 0011 (3) is:○1100○1101○1011○0011Question 33.Range of an 8-bit 2's-complement number:○0…255○−128…127○−127…127○−128…128Question 44.Adding two negative numbers gives a positive result. This means:○No overflow○Carry only○Signed overflow (V=1)○Zero flag setQuestion 55.Which flag indicates UNSIGNED overflow?○N○Z○V○CQuestion 66.A full adder's sum output is:○a∧b∧cin○a∨b∨cin○a⊕b⊕cin○a∧bQuestion 77.Sign-extending −4 (1100) to 8 bits gives:○0000 1100○1111 1100○1000 0100○1100 0000Question 88.A single parity bit can:○Correct 1 error○Detect 1 error○Correct 2 errors○Compress dataCheck answersModule 3 — Sequential LogicQuestion 11.The forbidden input of an SR latch is:○S=0,R=0○S=1,R=0○S=0,R=1○S=1,R=1Question 22.A transparent D-latch passes D to Q:○only on the rising edge○while the enable is 1○while the enable is 0○neverQuestion 33.Setup time is the interval D must be stable:○after the clock edge○before the clock edge○during reset○between edgesQuestion 44.Max clock frequency is bounded by:○t_su only○t_pd,comb + t_pd,FF + t_su○t_pd,FF only○the data-bus widthQuestion 55.On a shared bus, how many output enables may be active at once?○Zero always○Exactly one○Two○Any numberQuestion 66.The 'Z' state of a 3-state output means:○logic 0○logic 1○high impedance / disconnected○clock lowQuestion 77.A 2→4 decoder plus 3-state buffers builds a:○flip-flop○multiplexer○adder○register fileQuestion 88.A JK flip-flop toggles when:○J=1,K=0○J=0,K=1○J=K=1○J=K=0Check answersModule 4 — Finite State MachinesQuestion 11.A Moore machine's output depends on:○state only○input only○state and input○the clockQuestion 22.Which machine usually needs fewer states?○Moore○Mealy○Both equal○Neither has statesQuestion 33.Two states may be merged if they have the same output and:○the same name○the same successors for every input○one transition○an even codeQuestion 44.One-hot encoding for 5 states uses how many flip-flops?○3○4○5○2Question 55.Gray-coding cyclic states helps because:○it uses fewer states○only one state bit changes per transition○it needs no clock○outputs vanishQuestion 66.Synchronous circuits tolerate combinational glitches because:○glitches can't occur○FFs sample only at the edge after glitches settle○the clock removes them○outputs are asyncQuestion 77.In the FSM design flow, Karnaugh maps are used to:○assign states○derive next-state and output functions○choose the clock○minimise statesCheck answersModule 5 — Processor ArchitectureQuestion 11.The von Neumann architecture stores:○program and data separately○program and data in the same memory○only data○only registersQuestion 22.Which is an IMPLEMENTATION-only register?○IP○R2○CC○IRQuestion 33.Instruction fetch takes how many cycles (no prefetch)?○1○2○3○5Question 44.'LOAD R3 [R1]' uses which addressing?○immediate○direct register○register indirect○indexedQuestion 55.A STOR instruction's destination operand must be:○a literal○a register○a memory location○the IPQuestion 66.The Conductor is:○the ALU○a control FSM driving the datapath○a register file○a cacheQuestion 77.With prefetch, 'ADD RA RB' drops from 4 cycles to:○3○2○1○0Question 88.When polling input, the carry flag C=1 means:○new data ready○no new data○overflow○data overwrittenCheck answersModule 6 — Assembly & ProgrammingQuestion 11.Pushing onto the stack:○increments SP○decrements SP○leaves SP○clears SPQuestion 22.Return addresses are kept on a stack to allow:○faster clocks○recursion and nesting○more registers○smaller codeQuestion 33.RTI differs from RTS in that it also restores:○the stack pointer○the condition flags○the program○the cacheQuestion 44.On ARM, which register is the link register?○R13○R14○R15○R12Question 55.ARM 'ADDEQ R1,R1,#1' executes:○always○only if Z is set○only if carry set○neverQuestion 66.On ARM, 'MOV R0,R1,LSL #2' computes:○R1/4○R1×4○R1+2○R1−2Question 77.To load an arbitrary 32-bit constant on ARM you use:○MOV R0,#value○LDR R0,=value○ADD R0,#value○PUSH valueQuestion 88.After 'SUB SP locals', a parameter previously at SP+1 is now at:○SP+1○SP+1+locals○SP−1○SP+localsCheck answersModule 7 — Compilers & SystemQuestion 11.A compiler differs from an interpreter in that it:○executes directly○translates to machine code first○needs no memory○is always slower at runtimeQuestion 22.BNF is used to describe a language's:○semantics○syntax (grammar)○runtime○registersQuestion 33.In the translation convention, an expression's result is left:○in R0○on the stack○in memory[0]○in the IPQuestion 44.A 20-bit address bus can address:○20 locations○2^20 locations○20^2 locations○2×20 locationsQuestion 55.DRAM differs from SRAM in that it:○needs no power○stores charge in capacitors and needs refresh○is faster○uses no addressesQuestion 66.Caches were introduced because:○memory was too small○CPU speed outran external memory speed○to save power only○for graphicsQuestion 77.Out-of-order execution preserves:○all instruction orderings○only true data dependencies○nothing○only branchesQuestion 88.An atomic synchronisation instruction is:○LOAD○compare_and_swap○ADD○BRACheck answersModule 8 — OS & MemoryQuestion 11.A context switch is usually triggered by:○a page fault○a timer interrupt○a compile error○a cache missQuestion 22.Semaphores are needed because operations like x:=x+1 are:○atomic○non-atomic (load-add-store)○too fast○read-onlyQuestion 33.The page table maps:○registers to memory○virtual pages to physical frames○files to disc○cache to RAMQuestion 44.On a page fault, after swapping in the page the CPU:○skips the instruction○re-executes the faulting instruction○halts○clears registersQuestion 55.The executable bit on a page controls whether the page may be:○read○written○fetched as instructions○swappedQuestion 66.The optimal page-replacement policy is not implementable because it:○is too slow○requires knowing future accesses○uses too much RAM○needs a clockQuestion 77.Segmentation (vs paging) primarily provides:○fixed-size frames○independent growable address spaces○no fragmentation○faster clocksCheck answers← Previous question02 · Module 2 — Numbers & Arithmetic →