BSEH Secondary Computer Science study materials
BSEH Secondary Computer Science study resources

BSEH Secondary Computer Science practice questions

One question at a time. Build your BSEH Secondary Computer Science 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 Fundamentals and Number Systems

Which logic gate produces a HIGH output only when both of its inputs are HIGH?

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

Explanation

An AND gate outputs 1 only for the input combination 1,1; every other combination gives 0. This follows directly from the truth table of conjunction, where the output is the product of the inputs.

Question 2Computer Fundamentals and Number Systems

What is the denary (decimal) value of the binary number 1011?

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

Explanation

Binary 1011 has place values 8, 4, 2 and 1. Adding the weights where a 1 appears gives 8 + 2 + 1 = 11.

Question 3Computer Fundamentals and Number Systems

Which of these is a volatile form of computer memory?

  1. Flash memory
  2. RAM Correct answer.
  3. ROM
  4. Hard disk drive

Explanation

RAM loses its stored contents when power is removed, which is the definition of volatile memory. ROM, hard disks and flash memory all retain data without power.

Question 4Computer Fundamentals and Number Systems

How many bits are there in one byte?

  1. 32
  2. 8 Correct answer.
  3. 4
  4. 16

Explanation

A byte is defined as a group of 8 bits. This grouping allows a byte to represent 256 distinct values, from 0 to 255.

Question 5Computer Fundamentals and Number Systems

Which number base does the hexadecimal system use?

  1. Base 2
  2. Base 8
  3. Base 16 Correct answer.
  4. Base 10

Explanation

Hexadecimal is base 16, using digits 0-9 and letters A-F to represent values ten through fifteen. Each hex digit maps neatly to four binary bits.

Question 6Computer Fundamentals and Number Systems

Which component of the CPU performs arithmetic and logical operations?

  1. Cache
  2. Arithmetic Logic Unit Correct answer.
  3. Program Counter
  4. Control Unit

Explanation

The Arithmetic Logic Unit (ALU) carries out calculations such as addition and comparisons such as AND and OR. The control unit coordinates the fetch-decode-execute cycle rather than performing the arithmetic itself.

Question 7Computer Fundamentals and Number Systems

Which of the following is an example of system software?

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

Explanation

System software manages the hardware and provides a platform for applications; an operating system is the main example. Spreadsheets, browsers and photo editors are application software written to perform user tasks.

Question 8Computer Fundamentals and Number Systems

Convert the denary number 45 into 8-bit binary.

  1. 00101011
  2. 01001101
  3. 00111101
  4. 00101101 Correct answer.

Explanation

45 = 32 + 8 + 4 + 1, so bits 5, 3, 2 and 0 are set. Writing that in 8 bits gives 00101101.

Question 9Computer Fundamentals and Number Systems

What is the hexadecimal equivalent of the binary value 1110 1010?

  1. E9
  2. FA
  3. EA Correct answer.
  4. AE

Explanation

Split the byte into two nibbles: 1110 is E (14) and 1010 is A (10). Reading the two hex digits in order gives EA.

Question 10Computer Fundamentals and Number Systems

Using two's complement, what is the 8-bit representation of -5?

  1. 00000101
  2. 11111011 Correct answer.
  3. 11111010
  4. 10000101

Explanation

Write +5 as 00000101, invert the bits to get 11111010, then add 1 to obtain 11111011. The leading 1 confirms a negative value.

Question 11Computer Fundamentals and Number Systems

A file is 3 MB in size. Approximately how many bits does it contain?

  1. About 3000 bits
  2. About 24 million bits Correct answer.
  3. About 3 million bits
  4. About 192 million bits

Explanation

3 MB is 3 × 2^20 bytes, which is roughly 3 million bytes. Multiplying by 8 bits per byte gives about 24 million bits.

Question 12Computer Fundamentals and Number Systems

Which statement correctly describes the role of the control unit during the fetch-decode-execute cycle?

  1. It sends control signals to coordinate the other CPU components. Correct answer.
  2. It converts decimal input into binary.
  3. It permanently stores the program being run.
  4. It stores the results of arithmetic operations.

Explanation

The control unit issues timing and control signals that direct data movement and tell the ALU and registers what to do at each stage. It coordinates the cycle rather than performing storage or arithmetic itself.

Question 13Computer Fundamentals and Number Systems

What is the main purpose of cache memory in a computer system?

  1. To increase the capacity of the hard disk
  2. To convert analogue signals to digital form
  3. To provide permanent backup storage
  4. To hold frequently used instructions and data close to the CPU Correct answer.

Explanation

Cache is small, very fast memory that keeps recently or frequently accessed data near the processor. This reduces the average time the CPU waits for main memory.

Question 14Computer Fundamentals and Number Systems

Which logic gate has an output that is the inverse of the AND gate?

  1. XOR
  2. NAND Correct answer.
  3. NOR
  4. XNOR

Explanation

The NAND gate outputs 0 only when both inputs are 1, which is exactly the complement of the AND output. Its name reflects the NOT-AND combination.

Question 15Computer Fundamentals and Number Systems

An 8-bit register currently holds 11111111. If 1 is added using 8-bit unsigned arithmetic, what happens?

  1. The register holds 100000000 and the carry bit is set.
  2. The register holds 00000001 and the carry bit is clear.
  3. The register holds 11111110 and the carry bit is set.
  4. The register holds 00000000 and the carry bit is set. Correct answer.

Explanation

Adding 1 to all ones produces a carry out of the most significant bit. In 8-bit storage only the low 8 bits remain, giving 00000000, and the carry flag records the overflow.

Question 16Computer Fundamentals and Number Systems

Which statement best explains why hexadecimal is often used to display memory addresses?

  1. Computers store data internally in hexadecimal form.
  2. Each hex digit represents exactly four bits, making binary values compact and easy to convert. Correct answer.
  3. Hexadecimal numbers are always shorter than binary numbers of the same value.
  4. Hexadecimal allows negative numbers to be stored without a sign.

Explanation

Because one hex digit maps to a nibble of four bits, long binary strings can be written compactly and converted by inspection. Computers still process binary internally; hex is a convenient human notation.

Question 17Computer Fundamentals and Number Systems

What is the denary value of the hexadecimal number 2C?

  1. 32
  2. 44 Correct answer.
  3. 28
  4. 46

Explanation

The high digit 2 has weight 16, giving 32, and C represents 12. Adding gives 32 + 12 = 44.

Question 18Computer Fundamentals and Number Systems

Which type of software translates a high-level language program into machine code one line at a time while it runs?

  1. Assembler
  2. Linker
  3. Compiler
  4. Interpreter Correct answer.

Explanation

An interpreter translates and executes each statement in turn, stopping at the first error it meets. This differs from a compiler, which translates the whole program before execution.

Question 19Computer Fundamentals and Number Systems

A computer uses 8-bit two's complement. What is the denary value of 11010110?

  1. 214
  2. -41
  3. -43
  4. -42 Correct answer.

Explanation

The leading 1 means the value is negative. Invert the bits to get 00101001 (41) and add 1 to get 42, so the stored value is -42.

Question 20Computer Fundamentals and Number Systems

What is the result of the binary subtraction 1010 - 0110?

  1. 0100 Correct answer.
  2. 0101
  3. 1100
  4. 0010

Explanation

1010 is 10 and 0110 is 6 in denary, so the result is 4, which is 0100 in binary. Borrowing across the bit columns gives the same answer.

Question 21Computer Fundamentals and Number Systems

Which combination of gates implements the Boolean expression Q = (A AND B) OR (NOT A AND NOT B)?

  1. A single NAND gate
  2. Two XOR gates in series
  3. Two AND gates feeding an OR gate, with one input inverted before each AND Correct answer.
  4. Two OR gates feeding an AND gate with no inversion

Explanation

The expression is true when A and B are both 1 or both 0, which is the XNOR function. It is built from two AND gates whose outputs feed an OR gate, with the second AND receiving inverted inputs.

Question 22Computer Fundamentals and Number Systems

A sound file is sampled 44 100 times per second with 16-bit samples in stereo. What is the approximate bit rate of the uncompressed stream?

  1. About 706 kbps
  2. About 88 kbps
  3. About 3528 kbps
  4. About 1411 kbps Correct answer.

Explanation

Each sample uses 16 bits and there are two channels, so each sampling instant needs 32 bits. Multiplying 44 100 by 32 gives roughly 1 411 200 bits per second, about 1411 kbps.

Question 23Computer Fundamentals and Number Systems

A bitmap image is 800 × 600 pixels with a colour depth of 24 bits. What is its approximate uncompressed file size?

  1. About 480 kB
  2. About 2.88 MB
  3. About 14.4 MB
  4. About 1.44 MB Correct answer.

Explanation

The image has 480 000 pixels, and at 24 bits each that is 11 520 000 bits. Dividing by 8 gives 1 440 000 bytes, which is about 1.44 MB.

Question 24Computer Fundamentals and Number Systems

In an 8-bit two's complement system, adding 01111111 and 00000001 produces 10000000. Why is this result incorrect as a signed value?

  1. Two's complement cannot add numbers with different signs.
  2. The operands should first be converted to one's complement.
  3. Signed overflow occurred because the sum exceeds the maximum positive value. Correct answer.
  4. The carry flag was cleared during the addition.

Explanation

The largest positive 8-bit two's complement value is 127, and adding 1 gives 128, which is stored as -128. Adding two positives to get a negative indicates signed overflow, so the result is invalid.

Question 25Computer Hardware, Software and Operating System Basics

Which component of a computer system is responsible for temporarily holding programs and data that the CPU is actively using?

  1. Power supply unit
  2. Read-only memory
  3. Random access memory Correct answer.
  4. Hard disk drive

Explanation

RAM is volatile working memory: the CPU reads instructions and operands from it while programs run, and its contents are lost when power is removed. ROM and disks hold non-volatile data, and the power supply only converts electrical energy.

Question 26Computer Hardware, Software and Operating System Basics

A student needs storage that keeps data after the computer is switched off. Which type of memory satisfies this requirement?

  1. Non-volatile memory Correct answer.
  2. Cache memory
  3. Volatile memory
  4. Register memory

Explanation

Non-volatile memory retains its contents without power, which is what secondary storage such as flash and magnetic disks provides. Volatile memory, cache and registers all lose their contents when power is removed.

Question 27Computer Hardware, Software and Operating System Basics

Which of the following is an example of system software rather than application software?

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

Explanation

System software manages the hardware and provides services on which other programs depend; the operating system kernel is the core example. Spreadsheets, browsers and photo editors are application software written to perform user tasks.

Question 28Computer Hardware, Software and Operating System Basics

In a computer, which unit performs arithmetic such as addition and logical operations such as AND?

  1. The memory management unit
  2. The control unit
  3. The input/output controller
  4. The arithmetic logic unit Correct answer.

Explanation

The arithmetic logic unit (ALU) inside the CPU executes arithmetic and bitwise logical operations. The control unit coordinates instruction fetch and decode, while the other units handle memory addressing and peripheral transfers.

Question 29Computer Hardware, Software and Operating System Basics

What is the main purpose of an interrupt in a computer system?

  1. To signal the processor that an event needs attention Correct answer.
  2. To convert source code into machine code
  3. To permanently erase data from secondary storage
  4. To increase the clock speed of the processor

Explanation

An interrupt temporarily suspends the current instruction stream so the CPU can service a device or software event, after which execution resumes. It does not change clock speed, delete data, or perform compilation.

Question 30Computer Hardware, Software and Operating System Basics

Which characteristic distinguishes a solid-state drive from a magnetic hard disk drive?

  1. It stores data in flash memory with no moving parts Correct answer.
  2. It is always slower for random access
  3. It requires a spinning platter to read sectors
  4. It cannot be used as secondary storage

Explanation

An SSD uses NAND flash cells addressed electronically, so it has no rotating platters or moving heads. This generally gives faster random access than a magnetic HDD, and both are used as secondary storage.

Question 31Computer Hardware, Software and Operating System Basics

Which of the following best describes an operating system?

  1. A device driver supplied by a hardware manufacturer
  2. A utility that compresses files before transmission
  3. Software that manages hardware resources and provides services to programs Correct answer.
  4. A language translator that converts high-level code to machine code

Explanation

The operating system is the layer that allocates CPU time, memory and devices, and offers abstractions such as files and processes to applications. Compilers, drivers and compression utilities are separate pieces of software that run on top of it.

Question 32Computer Hardware, Software and Operating System Basics

A program is being executed and the operating system switches the CPU from it to another ready program. What is this activity called?

  1. Paging
  2. Context switching Correct answer.
  3. Compilation
  4. Fragmentation

Explanation

A context switch saves the register state and program counter of the running process and restores those of the next scheduled process. Paging and fragmentation concern memory management, and compilation produces executable code.

Question 33Computer Hardware, Software and Operating System Basics

A system uses fixed-size blocks as its unit of both main memory allocation and disk transfer. What memory management scheme is this?

  1. Paging Correct answer.
  2. Segmentation
  3. Dynamic partitioning
  4. Contiguous allocation

Explanation

Paging divides virtual and physical memory into equal-size pages and frames, eliminating external fragmentation. Segmentation uses variable-length logical segments, and contiguous allocation gives a process one unbroken block.

Question 34Computer Hardware, Software and Operating System Basics

Which scheduling policy is most likely to let a long CPU-bound job wait indefinitely while short jobs keep arriving?

  1. Round robin
  2. Shortest job first Correct answer.
  3. First-in first-out with a single queue
  4. First come, first served

Explanation

Shortest job first always picks the job with the least expected CPU time, so a long job can be starved by a steady stream of shorter ones. First-come-first-served and round robin eventually reach every job in the queue.

Question 35Computer Hardware, Software and Operating System Basics

What is the function of a device driver in an operating system?

  1. It checks source code for syntax errors
  2. It schedules processes onto the CPU
  3. It stores the user's documents in permanent form
  4. It translates generic OS requests into commands a specific device understands Correct answer.

Explanation

A driver is device-specific software that implements the interface between the operating system and one hardware model, hiding register-level details. Document storage, scheduling and syntax checking belong to other subsystems.

Question 36Computer Hardware, Software and Operating System Basics

A file system stores, for each file, the list of blocks that belong to it. Which problem does this design avoid compared with a fully contiguous file layout?

  1. External fragmentation of free disk space Correct answer.
  2. The need for directory entries
  3. The need for access permissions
  4. The need for any file metadata

Explanation

Allowing a file's blocks to be scattered lets the system use any free block, so it does not need one continuous run of space that leaves unusable gaps. Directories, permissions and metadata are still required in both designs.

Question 37Computer Hardware, Software and Operating System Basics

In a two-level page table, what is the main benefit of splitting the page table into levels?

  1. It eliminates all page faults
  2. It removes the need for a translation lookaside buffer
  3. It allows pages to be variable in size
  4. Unused regions of the address space need no page-table pages allocated Correct answer.

Explanation

A single flat page table must cover the whole virtual address space, which is wasteful when the space is sparsely used. Multi-level tables allocate second-level tables only for regions actually in use, saving memory.

Question 38Computer Hardware, Software and Operating System Basics

Which statement correctly distinguishes a process from a thread?

  1. Threads of one process share its address space, while separate processes do not by default Correct answer.
  2. Threads always execute on different physical processors
  3. A process cannot contain more than one thread
  4. Each thread has its own private address space and file descriptors

Explanation

Threads within a process share code, data and open files, but keep separate stacks and register state, which makes communication cheap. Separate processes have independent address spaces unless they set up shared memory explicitly.

Question 39Computer Hardware, Software and Operating System Basics

A compiler and an interpreter differ in that a compiler:

  1. never reports syntax errors to the programmer
  2. executes the source program one statement at a time without producing an executable
  3. translates the whole source program into an executable before it runs Correct answer.
  4. can only process assembly language

Explanation

A compiler performs translation of the entire program ahead of execution and produces object or machine code. An interpreter analyses and executes statements as it encounters them, which is why it reports errors during the run.

Question 40Computer Hardware, Software and Operating System Basics

Which memory in the hierarchy is closest to the CPU and therefore has the shortest access time?

  1. Magnetic disk
  2. L2 cache
  3. Registers Correct answer.
  4. Main memory

Explanation

Registers are built into the processor core and accessed within a single clock cycle, making them the fastest storage in the hierarchy. Cache is slightly slower, main memory slower still, and disk is orders of magnitude slower.

Question 41Computer Hardware, Software and Operating System Basics

A technician installs more physical RAM in a machine running a demand-paged system. Which effect is most directly expected?

  1. A higher CPU clock frequency
  2. Fewer page faults because more pages can remain resident Correct answer.
  3. Larger virtual address space per process
  4. Faster disk seek times

Explanation

Adding RAM enlarges the pool of frames available, so more of each working set stays in memory and fewer references miss. Clock frequency, virtual address width and disk mechanics are unaffected by the amount of RAM.

Question 42Computer Hardware, Software and Operating System Basics

Which of the following is a function performed by the operating system's file system rather than by application software?

  1. Mapping file names to physical disk blocks Correct answer.
  2. Encrypting a message with a user-chosen password
  3. Formatting a chart in a document
  4. Choosing fonts for a printed report

Explanation

The file system maintains directories and metadata and translates a logical file name and offset into physical block addresses. Font selection, user-driven encryption and chart formatting are tasks of applications.

Question 43Computer Hardware, Software and Operating System Basics

Which of the following best explains why a virtual memory system allows a program larger than physical RAM to run?

  1. Physical memory is expanded automatically by the operating system
  2. Only the currently referenced pages need to be resident in physical memory Correct answer.
  3. The CPU compresses all instructions before execution
  4. The program is rewritten by the compiler to fit in RAM

Explanation

Demand paging keeps only the active pages in frames and stores the rest on backing store, swapping them in on fault. The address space can therefore exceed installed RAM without any change to the compiled program.

Question 44Computer Hardware, Software and Operating System Basics

An operating system uses a time slice of 10 ms with round-robin scheduling. What happens when a process exhausts its slice without blocking?

  1. It is permanently terminated
  2. It is moved to secondary storage
  3. It is placed at the back of the ready queue Correct answer.
  4. It keeps the CPU until it finishes

Explanation

Round robin preempts a process at the end of its quantum and returns it to the tail of the ready queue, giving other processes a turn. Termination, non-preemptive running and swapping out are different policies.

Question 45Computer Hardware, Software and Operating System Basics

Which statement about read-only memory in a typical computer is accurate?

  1. It retains firmware such as the boot loader when power is off Correct answer.
  2. It is faster than the CPU registers
  3. It loses its contents whenever the machine restarts
  4. It is used as the main working store for running programs

Explanation

ROM and its variants hold non-volatile firmware, including the initial boot code executed at power-on. Main working storage is RAM, and no memory is faster than the CPU registers.

Question 46Computer Hardware, Software and Operating System Basics

A user reports that a program stops responding but the operating system and other programs keep working. Which explanation is most consistent with this observation?

  1. The power supply has failed completely
  2. The process has entered an infinite loop while the scheduler still runs other processes Correct answer.
  3. The CPU has been physically removed from its socket
  4. The machine's RAM has been entirely erased

Explanation

A single runaway process consumes CPU time but is preempted by the scheduler, so other processes continue. Complete power loss, removal of the CPU or total loss of RAM would halt all activity, not just one program.

Question 47Computer Hardware, Software and Operating System Basics

Which of the following is the best example of an embedded operating system?

  1. A desktop system used for video editing
  2. A workstation running a software development suite
  3. A server hosting a shared database
  4. The firmware controlling a washing machine's cycle Correct answer.

Explanation

An embedded operating system runs on dedicated hardware with a narrow, fixed function and tight resource limits, as in appliance controllers. Desktop, server and workstation systems are general-purpose platforms.

Question 48Computer Hardware, Software and Operating System Basics

Which of the following correctly describes the relationship between the kernel and user-mode programs?

  1. User programs and the kernel share unrestricted access to all hardware registers
  2. User programs execute privileged instructions directly on the CPU
  3. The kernel runs only when the machine is first switched on
  4. User programs request privileged operations through system calls handled by the kernel Correct answer.

Explanation

The processor runs user code in an unprivileged mode, so hardware access must be requested via system calls that trap into the kernel. The kernel remains active throughout operation and controls all privileged instructions.

Question 49Programming Fundamentals and Problem Solving

A student writes a loop that must run exactly once when a counter variable named count starts at 1 and increases by 1 each iteration. Which loop condition expresses this requirement?

  1. while (count <= 1) Correct answer.
  2. while (count != 1)
  3. while (count >= 1)
  4. while (count < 1)

Explanation

The loop body executes while the condition is true. With count starting at 1, the condition count <= 1 is true on entry, the body runs once, count becomes 2, and the condition is then false. A condition that is false on entry runs the body zero times.

Question 50Programming Fundamentals and Problem Solving

In a program, a variable declared inside a function body is described as having local scope. What does this mean for that variable?

  1. It can be read and modified only within the block where it was declared. Correct answer.
  2. It keeps its value after the function returns and can be reused later.
  3. It is automatically shared with every other function in the program.
  4. It must be declared with the same name in every function that uses it.

Explanation

Local scope means the identifier is visible only inside the block or function where it is declared. Once execution leaves that block the variable ceases to exist, so other functions cannot refer to it by name.