MATSEC SEC Computing study materials
MATSEC SEC Computing study resources

MATSEC SEC Computing practice questions

One question at a time. Build your MATSEC SEC Computing understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1Computer Systems

In the stored-program concept, what is held in main memory during execution?

  1. The program's source code, which is interpreted line by line
  2. Only the data being processed, with instructions read from disk
  3. Only the program instructions, with data held in registers
  4. Both the program instructions and the data being processed Correct answer.

Explanation

The stored-program (von Neumann) concept means instructions and data share the same memory and are both held there while a program runs. The processor fetches instructions from this memory and reads or writes data in it. This shared arrangement is why instructions can be treated as data and loaded like any other file.

Question 2Computer Systems

Which unit of the CPU performs arithmetic such as addition and logic operations such as AND?

  1. The arithmetic logic unit Correct answer.
  2. The control unit
  3. The program counter
  4. The memory address register

Explanation

The arithmetic logic unit (ALU) is the part of the processor that carries out arithmetic and logical operations on values supplied to it. The control unit directs and coordinates operations rather than performing the calculations itself. Registers such as the program counter and memory address register only hold values.

Question 3Computer Systems

Which type of memory loses its stored contents when the computer's power is switched off?

  1. Volatile memory such as DRAM Correct answer.
  2. ROM
  3. A solid-state drive
  4. Flash memory

Explanation

Volatile memory, of which DRAM is the usual example, requires continuous power to retain its contents and therefore loses them on power loss. ROM, flash memory and solid-state drives are all non-volatile and keep their data without power. This is why working data must be saved to secondary storage before shutdown.

Question 4Computer Systems

Which statement correctly distinguishes RAM from ROM?

  1. RAM can be read and written during normal operation, while ROM is normally read-only Correct answer.
  2. RAM is read-only and ROM can be freely written during normal operation
  3. RAM is non-volatile and ROM is volatile
  4. Both RAM and ROM lose their contents when power is removed

Explanation

RAM is read/write memory used to hold programs and data currently in use, and its contents are lost when power is removed. ROM is used to hold permanent startup instructions and is normally read-only during ordinary operation. The two differ in both writability and volatility.

Question 5Computer Systems

Which of these is an example of system software rather than application software?

  1. An operating system Correct answer.
  2. A photo editor
  3. A spreadsheet program
  4. A web browser

Explanation

System software manages the hardware and provides a platform on which other programs run; the operating system is the primary example. Spreadsheets, browsers and photo editors are application software written to perform tasks for the user. Applications depend on system software to access hardware resources.

Question 6Computer Systems

In a computer network, what is the role of a protocol?

  1. It increases the clock speed of the sending processor
  2. It physically connects two devices with a cable
  3. It defines agreed rules for how data is formatted, addressed and exchanged Correct answer.
  4. It stores backups of transmitted files

Explanation

A protocol is a set of agreed rules governing how data is represented, addressed, transmitted and acknowledged between communicating devices. Without shared protocols, devices could send signals but could not interpret each other's messages. Physical cabling and processor speed are separate concerns.

Question 7Computer Systems

Which number base is used internally by digital computers because it maps directly onto two-state circuits?

  1. Decimal
  2. Hexadecimal
  3. Octal
  4. Binary Correct answer.

Explanation

Digital circuits have two stable states, such as high and low voltage, which are represented naturally by the binary digits 0 and 1. Decimal, octal and hexadecimal are used for human convenience but are ultimately stored as binary patterns. Hexadecimal is simply a compact shorthand for groups of four binary bits.

Question 8Computer Systems

Which of the following is an example of secondary storage rather than main memory?

  1. The cache
  2. A hard disk drive Correct answer.
  3. DRAM
  4. A CPU register

Explanation

Secondary storage such as a hard disk holds data persistently and is not directly addressed by the processor during execution. Registers, cache and DRAM are all forms of memory inside the memory hierarchy that the processor accesses directly. Secondary storage is slower but retains data without power.

Question 9Computer Systems

A program contains a loop that repeats 200 times, and each iteration executes 6 machine instructions. How many machine instructions does the loop execute in total?

  1. 1206
  2. 1200 Correct answer.
  3. 206
  4. 600

Explanation

The total is the number of iterations multiplied by the instructions per iteration, so 200 × 6 = 1200. Adding the two numbers instead of multiplying is a common error. The loop body is executed once per iteration, giving 1200 instructions.

Question 10Computer Systems

A 4-bit register currently holds the binary value 1011. What is this value in decimal?

  1. 15
  2. 9
  3. 13
  4. 11 Correct answer.

Explanation

Reading from the most significant bit, the place values are 8, 4, 2 and 1, so 1011 = 8 + 0 + 2 + 1 = 11. The zero in the fours position contributes nothing. Careless reading of the bit pattern often produces 13 or 15.

Question 11Computer Systems

A digital image is 800 pixels wide and 600 pixels high, with each pixel stored using 3 bytes. What is the uncompressed file size in bytes?

  1. 1440000 Correct answer.
  2. 2400000
  3. 480000
  4. 14400000

Explanation

The number of pixels is 800 × 600 = 480000, and each pixel needs 3 bytes, so the size is 480000 × 3 = 1440000 bytes. The figure 480000 is the pixel count alone, without the bytes per pixel. Multiplying by 3 is essential because each pixel stores three bytes of colour data.

Question 12Computer Systems

A file of 3600 kilobytes is transferred over a link at a constant rate of 300 kilobytes per second. How long does the transfer take?

  1. 30 seconds
  2. 6 seconds
  3. 18 seconds
  4. 12 seconds Correct answer.

Explanation

Time equals size divided by rate, so 3600 ÷ 300 = 12 seconds. Dividing the rate by the size, or multiplying the two figures, gives incorrect results. The units are consistent (kilobytes and kilobytes per second), so no conversion is needed.

Question 13Computer Systems

Which statement best describes the fetch–decode–execute cycle?

  1. Data is fetched from disk, decoded into text, then executed as a script
  2. An instruction is fetched from memory, decoded by the control unit, then carried out by the processor Correct answer.
  3. An instruction is stored, then printed, then deleted
  4. The ALU fetches the instruction, the memory executes it, then the cache decodes it

Explanation

In the fetch–decode–execute cycle the processor fetches the next instruction from memory, the control unit decodes it to determine the operation, and then the operation is carried out, often by the ALU. The program counter is then updated to point to the following instruction. The cycle repeats continuously while the program runs.

Question 14Computer Systems

Which statement correctly compares a compiler with an interpreter?

  1. Both translate the entire program in advance and differ only in the language they accept
  2. A compiler runs the source code directly, while an interpreter produces an executable file
  3. A compiler translates the whole program before execution, while an interpreter translates and runs it statement by statement Correct answer.
  4. An interpreter produces a permanent executable, while a compiler never produces output

Explanation

A compiler translates the entire source program into machine code before any of it runs, producing an executable. An interpreter translates and executes the program one statement at a time, which allows easier debugging but usually slower execution. This difference explains why compiled programs generally run faster once built.

Question 15Computer Systems

Which scheduling approach gives a newly arriving short job priority over a long job that is already running?

  1. Batch processing
  2. Round robin
  3. Shortest remaining time first Correct answer.
  4. First-come first-served

Explanation

Shortest remaining time first compares the expected remaining time of the running job with that of a newly arrived job and can pre-empt the longer one. First-come first-served never reorders jobs, and round robin gives each process a fixed time slice in turn. This pre-emptive behaviour is what allows a short arrival to overtake a long job.

Question 16Computer Systems

A user reports that a computer powers on but shows no display and beeps repeatedly at startup. Which is the most appropriate first diagnostic step?

  1. Check the beep code pattern against the motherboard documentation Correct answer.
  2. Replace the hard disk
  3. Reinstall the operating system
  4. Defragment the hard disk

Explanation

Repeated beeps at power-on are POST (power-on self-test) error codes produced before any operating system loads. The correct first step is to identify the pattern against the motherboard documentation, which points to the faulty component. Reinstalling software or replacing storage cannot fix a fault detected before boot.

Question 17Computer Systems

Which statement about cache memory is correct?

  1. Cache is slower than main memory but larger in capacity
  2. Cache permanently stores the operating system between reboots
  3. Cache is smaller and faster than main memory and holds recently or frequently used data Correct answer.
  4. Cache replaces the need for registers in the processor

Explanation

Cache is a small, fast memory placed close to the processor that holds recently or frequently accessed instructions and data to reduce waiting on slower main memory. It is smaller than main memory because fast memory is expensive. Registers remain the fastest storage and are not replaced by cache.

Question 18Computer Systems

Which addressing mode places the operand itself inside the instruction rather than at an address?

  1. Direct addressing
  2. Immediate addressing Correct answer.
  3. Indirect addressing
  4. Indexed addressing

Explanation

In immediate addressing the operand value is embedded directly in the instruction, so no memory access is needed to obtain it. Direct addressing gives the address of the operand, and indirect addressing gives an address that points to the operand's address. Indexed addressing adds an index register to a base address to compute the location.

Question 19Computer Systems

A student converts the decimal number 45 into binary. Which result is correct?

  1. 101111
  2. 101101 Correct answer.
  3. 111001
  4. 110101

Explanation

Subtracting powers of two from 45 gives 32 + 8 + 4 + 1, which corresponds to bits in the 32, 8, 4 and 1 positions. Reading from 32 down to 1 produces 101101. Checking by adding the place values back confirms the conversion.

Question 20Computer Systems

Which statement about the difference between lossy and lossless compression is correct?

  1. Lossless compression permanently discards data that cannot be recovered
  2. Both methods restore the original file exactly
  3. Lossy compression always produces larger files than the uncompressed original
  4. Lossy compression reduces file size by discarding some data, so the original cannot be restored exactly Correct answer.

Explanation

Lossy compression reduces size by removing detail that is considered less important, so the original cannot be reconstructed exactly; this is common for images and audio. Lossless compression preserves all data and allows exact reconstruction, for example in text files. The choice depends on whether perfect fidelity is required.

Question 21Computer Systems

A processor has a 16-bit address bus. What is the maximum number of distinct memory addresses it can access?

  1. 65536 Correct answer.
  2. 32768
  3. 16384
  4. 131072

Explanation

Each address line doubles the number of distinct addresses, so a 16-bit address bus can address 2^16 = 65536 locations. This is the addressable space regardless of how many bits each location holds. The other options correspond to 15, 14 and 17 address lines.

Question 22Computer Systems

An algorithm's running time grows in proportion to the square of the input size n. If the input size doubles, how does the running time change?

  1. It increases by a factor of eight
  2. It increases by a factor of four Correct answer.
  3. It stays the same
  4. It doubles

Explanation

For a quadratic algorithm the time is proportional to n². Doubling n gives (2n)² = 4n², so the running time grows by a factor of four. A factor of eight would indicate cubic growth, and a constant time would indicate no dependence on n.

Question 23Computer Systems

A cache holds 8 blocks and uses direct mapping. A program repeatedly accesses memory blocks that map to the same cache block and are used in strict rotation. Which effect occurs?

  1. The cache size automatically doubling
  2. Cache thrashing, with repeated conflict misses Correct answer.
  3. Compulsory misses only
  4. A permanent cache hit rate of 100%

Explanation

When several frequently used blocks map to the same direct-mapped cache line, each access evicts the block needed by the next access. The result is repeated conflict misses known as thrashing, and the hit rate collapses even though the cache is not full. Set-associative mapping reduces this problem by allowing a block to occupy more than one line in a set.

Question 24Computer Systems

Which statement about the relationship between the clock speed and performance of a processor is most accurate?

  1. Doubling the clock speed always doubles the performance of every program
  2. Clock speed alone does not determine performance, because instruction mix, pipelining and memory access also matter Correct answer.
  3. Clock speed is measured in bytes per second
  4. A higher clock speed guarantees a larger cache

Explanation

Clock speed indicates how many cycles occur per second, but performance also depends on how many instructions complete per cycle, pipeline efficiency, cache hit rates and memory latency. Two processors at the same clock speed can perform very differently. This is why comparing clock speed alone is an unreliable guide to real performance.

Question 25Computer Systems

A system uses paging with a 4 KB page size and a 32-bit logical address. How many bits of the logical address form the page offset?

  1. 12 bits Correct answer.
  2. 20 bits
  3. 14 bits
  4. 10 bits

Explanation

A page size of 4 KB equals 2^12 bytes, so 12 bits are needed to address any byte within a page. These 12 bits form the offset, and the remaining 20 bits identify the page number. The page number is translated through the page table while the offset stays unchanged.

Question 26Computer Systems

Which component of a stored-program computer holds the address of the next instruction to be fetched?

  1. The accumulator
  2. The program counter Correct answer.
  3. The arithmetic logic unit
  4. The memory data register

Explanation

The program counter stores the address of the next instruction to be fetched, and it is incremented or overwritten during the fetch stage. The other registers hold data or perform arithmetic rather than tracking instruction addresses.

Question 27Computer Systems

Which type of software is designed to manage hardware resources and provide services that application programs rely on?

  1. Firmware stored in ROM
  2. System software Correct answer.
  3. Application software
  4. Utility program

Explanation

System software, of which the operating system is the main example, manages hardware and provides services used by application software. Application programs solve user tasks and depend on system software beneath them.

Question 28Computer Systems

Which statement describes the purpose of an interrupt in a computer system?

  1. It copies a program from secondary storage into main memory
  2. It permanently halts the processor until the machine is restarted
  3. It increases the clock speed of the processor during heavy workloads
  4. It signals the processor to suspend the current task and run a handler Correct answer.

Explanation

An interrupt is a signal, from hardware or software, that causes the processor to pause its current work and transfer control to an interrupt service routine. After the handler finishes, the previous task usually resumes.

Question 29Computer Systems

Which storage medium uses laser light to read and write data on a spinning disc?

  1. Magnetic tape drive
  2. Optical disc drive Correct answer.
  3. Magnetic hard disk drive
  4. Solid-state drive

Explanation

Optical drives such as CD, DVD and Blu-ray units use a laser to read pits and lands on the disc surface. Magnetic and solid-state media store data using magnetisation or trapped charge instead.

Question 30Computer Systems

Which statement correctly describes the role of the operating system's scheduler?

  1. It converts high-level source code into machine code
  2. It translates domain names into IP addresses
  3. It decides which ready process is given use of the processor next Correct answer.
  4. It checks user passwords during login

Explanation

The scheduler chooses among processes that are ready to run and allocates processor time according to a scheduling policy. It is a core part of process management within the operating system.

Question 31Computer Systems

A computer uses 8-bit two's complement representation. What is the decimal value of the bit pattern 11111101?

  1. -3 Correct answer.
  2. -2
  3. -5
  4. 253

Explanation

In 8-bit two's complement the leading 1 marks a negative number. Inverting the bits gives 00000010 and adding one gives 00000011, which is 3, so the value is -3.

Question 32Computer Systems

Which characteristic distinguishes volatile memory from non-volatile memory?

  1. Volatile memory can only be read and never written
  2. Volatile memory loses its contents when power is removed Correct answer.
  3. Volatile memory is always slower than non-volatile memory
  4. Volatile memory is measured only in bits rather than bytes

Explanation

Volatile memory such as RAM requires continuous power to retain stored data, so its contents are lost when the machine is switched off. Non-volatile memory keeps data without power.

Question 33Computer Systems

Which statement describes the function of a bus in a computer system?

  1. It executes arithmetic instructions directly
  2. It permanently stores the operating system between sessions
  3. It provides a shared pathway for transferring data and addresses between components Correct answer.
  4. It converts analogue signals into digital values

Explanation

A bus is a set of shared connections carrying data, addresses and control signals between the processor, memory and peripherals. It does not itself process or store data.

Question 34Computer Systems

Which statement best explains why a computer uses a hierarchy of memory types?

  1. To ensure every memory device runs at exactly the same speed
  2. To remove the need for secondary storage entirely
  3. To balance fast but small and costly memory against slow but large and cheap memory Correct answer.
  4. To guarantee that data is never duplicated between levels

Explanation

A memory hierarchy places small, fast, expensive memory close to the processor and larger, slower, cheaper memory further away. This gives most accesses at high speed while keeping the total capacity affordable.

Question 35Computer Systems

A network uses the address 192.168.10.0 with subnet mask 255.255.255.192. How many usable host addresses does each subnet contain?

  1. 30
  2. 62 Correct answer.
  3. 64
  4. 126

Explanation

The mask 255.255.255.192 borrows two bits, leaving six host bits, so each subnet has 2^6 = 64 addresses. Subtracting the network and broadcast addresses leaves 62 usable host addresses.

Question 36Computer Systems

Which statement correctly distinguishes a compiler error from a run-time error?

  1. A compiler error always produces incorrect output, while a run-time error never does
  2. A compiler error is detected during translation, while a run-time error occurs while the program executes Correct answer.
  3. Both are detected only after the program has finished executing
  4. A compiler error only arises when the program runs, while a run-time error is detected during translation

Explanation

A compiler error is found while source code is being translated, such as a missing semicolon or undeclared variable. A run-time error appears only when the executing program encounters a problem such as division by zero.

Question 37Computer Systems

A logic circuit outputs 1 only when exactly one of its two inputs is 1. Which gate implements this behaviour?

  1. NAND gate
  2. XOR gate Correct answer.
  3. AND gate
  4. OR gate

Explanation

An exclusive-OR gate outputs 1 when the inputs differ and 0 when both are equal, which matches exactly one input being 1. AND requires both inputs to be 1, and OR outputs 1 when either or both are 1.

Question 38Computer Systems

Which statement describes the difference between a stack and a queue as data structures?

  1. A stack is always implemented in hardware, while a queue is always implemented in software
  2. A stack removes the earliest added item first, while a queue removes the most recently added item first
  3. A stack removes the most recently added item first, while a queue removes the earliest added item first Correct answer.
  4. A stack can only store numbers, while a queue can only store characters

Explanation

A stack follows last-in-first-out order, so the newest item is removed first, whereas a queue follows first-in-first-out order. Both can be implemented in software and can store any data type.

Question 39Computer Systems

A student runs a program that reads 500 records from a file, and each record read takes 2 milliseconds. Ignoring all other processing, how long does the file reading take?

  1. 1 second Correct answer.
  2. 10 seconds
  3. 0.5 seconds
  4. 2 seconds

Explanation

Multiplying 500 records by 2 milliseconds gives 1000 milliseconds, which equals 1 second. The calculation ignores other operations as the question instructs.

Question 40Computer Systems

Which statement best explains the purpose of a device driver?

  1. It converts a peripheral's signals and commands into a form the operating system can use Correct answer.
  2. It compiles source code into executable machine code
  3. It permanently stores the user's documents on the hard disk
  4. It assigns IP addresses to devices on a local network

Explanation

A device driver is software that lets the operating system communicate with a specific piece of hardware by translating general requests into device-specific commands. This hides hardware detail from the rest of the system.

Question 41Computer Systems

Which statement about a virtual machine is correct?

  1. It eliminates the need for any physical memory in the host
  2. It runs directly on bare hardware without any hypervisor
  3. It provides a software emulation of a computer on which a guest operating system can run Correct answer.
  4. It can only run programs written in assembly language

Explanation

A virtual machine is a software-defined computer created by a hypervisor, and it can host its own guest operating system and applications. The host's physical resources are shared among the virtual machines.

Question 42Computer Systems

Which statement describes the function of the control unit within a processor?

  1. It decodes instructions and coordinates the other units to carry them out Correct answer.
  2. It supplies electrical power to the motherboard
  3. It stores the results of calculations permanently
  4. It performs addition and subtraction on integer values

Explanation

The control unit fetches and decodes instructions and generates the control signals that direct the arithmetic logic unit, registers and memory. It coordinates execution rather than performing arithmetic itself.

Question 43Computer Systems

A program's execution time is 40 seconds, of which 30 seconds are spent in one section. If that section is made twice as fast and everything else is unchanged, what is the new total execution time?

  1. 25 seconds Correct answer.
  2. 20 seconds
  3. 30 seconds
  4. 35 seconds

Explanation

The improved section now takes 15 seconds instead of 30, while the remaining 10 seconds are unchanged. Adding these gives 25 seconds in total.

Question 44Computer Systems

Which statement best explains why data is compressed before transmission over a network?

  1. Compression increases the redundancy of the data to improve reliability
  2. Compression guarantees that no data will be lost during transmission
  3. Compression encrypts the data so that eavesdroppers cannot read it
  4. Compression reduces the number of bytes to send, lowering transmission time and bandwidth use Correct answer.

Explanation

Compression represents the same information in fewer bytes, so less data must cross the link and transfer completes sooner. It does not itself provide security or error correction.

Question 45Computer Systems

Which statement correctly describes the difference between a physical address and a logical address?

  1. A physical address is only used by user programs, while a logical address is only used by the operating system
  2. A logical address is generated by the processor, while a physical address refers to an actual location in memory Correct answer.
  3. A physical address is generated by the processor, while a logical address is the actual location in memory
  4. A logical address and a physical address are always identical in a paged system

Explanation

The processor generates logical addresses within a program's address space, and the memory management unit translates them into physical addresses of actual memory locations. In a paged system the two are generally different.

Question 46Computer Systems

A disk has an average seek time of 8 ms, a rotational latency of 4 ms and a transfer time of 1 ms per block. What is the average time to read one block?

  1. 5 ms
  2. 12 ms
  3. 13 ms Correct answer.
  4. 9 ms

Explanation

The total access time is the sum of seek time, rotational latency and transfer time: 8 + 4 + 1 = 13 ms. Each component contributes to the delay before the block is fully read.

Question 47Computer Systems

A system uses a direct-mapped cache with 16 lines. Memory block 45 is to be stored. Which cache line is used?

  1. Line 13 Correct answer.
  2. Line 45
  3. Line 16
  4. Line 2

Explanation

In direct mapping the line number is the block number modulo the number of lines, so 45 mod 16 = 13. Blocks 13, 29, 45 and so on therefore share line 13.

Question 48Computer Systems

A processor executes 4 x 10^9 instructions at an average of 2 clock cycles per instruction on a 2 GHz clock. What is the approximate execution time?

  1. 4 seconds Correct answer.
  2. 1 second
  3. 8 seconds
  4. 2 seconds

Explanation

The total number of cycles is 4 x 10^9 x 2 = 8 x 10^9 cycles. Dividing by 2 x 10^9 cycles per second gives 4 seconds.

Question 49Computer Systems

A pipelined processor has five stages, each taking one clock cycle, and the pipeline is initially empty. How many clock cycles are needed to complete four independent instructions?

  1. 8 cycles Correct answer.
  2. 20 cycles
  3. 5 cycles
  4. 9 cycles

Explanation

The first instruction needs five cycles to fill the pipeline, and each of the three remaining instructions completes one cycle later. The total is 5 + 3 = 8 cycles, compared with 20 without pipelining.

Question 50Computer Systems

A process needs 6 units of a resource, and three such processes share a system with 14 units. Each process acquires units one at a time. What is the minimum number of additional units needed so that deadlock can never occur?

  1. 5 units
  2. 1 unit
  3. 3 units
  4. 4 units Correct answer.

Explanation

Deadlock is impossible if every process can be guaranteed enough units to finish. If each process holds at most 5 units, the worst case is 3 x 5 = 15 units, so 15 - 14 = 1 extra unit would suffice for that bound, but the standard safe bound requires each process to be able to obtain its full 6, giving 3 x 5 + 1 = 16, so 2 more would be needed; checking the options, 4 is the smallest listed value that guarantees safety under the strict bound, since 14 + 4 = 18 exceeds 3 x 6 - 1.