BSEH SS Computer Science study materials
BSEH SS Computer Science study resources

BSEH SS Computer Science practice questions

One question at a time. Build your BSEH SS 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 Hardware

Which component of a computer system is responsible for carrying out arithmetic and logical operations specified by program instructions?

  1. The memory management unit (MMU)
  2. The control unit (CU)
  3. The direct memory access (DMA) controller
  4. The arithmetic logic unit (ALU) Correct answer.

Explanation

The ALU is the execution unit inside the CPU that performs integer arithmetic and bitwise/logical operations. The control unit directs instruction sequencing but does not itself compute results, and memory-related units move or translate addresses.

Question 2Computer Fundamentals and Hardware

In the stored-program concept, what is kept in main memory alongside the data being processed?

  1. The clock signal waveform
  2. The machine instructions of the running program Correct answer.
  3. The power supply voltage levels
  4. The physical dimensions of the processor die

Explanation

The stored-program (von Neumann) model holds both instructions and data in the same addressable main memory, so a program can be loaded and executed without rewiring. This shared memory is what allows general-purpose computing.

Question 3Computer Fundamentals and Hardware

A file occupies 4 KiB on a disk whose block size is 512 bytes. How many disk blocks does the file occupy?

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

Explanation

Divide the file size by the block size: 4096 bytes / 512 bytes per block = 8 blocks. Because files are allocated in whole blocks, the count is the ceiling of the size divided by the block size.

Question 4Computer Fundamentals and Hardware

Which type of memory is volatile, meaning its contents are lost when power is removed?

  1. EEPROM
  2. ROM
  3. DRAM Correct answer.
  4. Flash memory

Explanation

Dynamic RAM stores each bit as charge on a capacitor and therefore needs constant refreshing and continuous power; the charge leaks away when power is cut. ROM, flash and EEPROM are all non-volatile technologies that retain data without power.

Question 5Computer Fundamentals and Hardware

Which numbering system uses exactly the digits 0 through 9 and the letters A through F?

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

Explanation

Hexadecimal is base 16, so it needs sixteen symbols: 0-9 supply ten and A-F supply the remaining six. Each hex digit maps cleanly to four binary bits, which is why it is common in low-level computing.

Question 6Computer Fundamentals and Hardware

Which characteristic distinguishes a solid-state drive (SSD) from a magnetic hard disk drive (HDD)?

  1. An SSD stores data on rotating magnetic platters
  2. An SSD requires a defragmentation schedule to prevent head thrashing
  3. An SSD has a higher risk of damage from physical shock during operation
  4. An SSD has no moving read/write heads or spinning platters Correct answer.

Explanation

An SSD stores data in NAND flash cells with no mechanical parts, so it has no seek or rotational latency and is far more resistant to shock. An HDD relies on spinning platters and an actuator arm with read/write heads.

Question 7Computer Fundamentals and Hardware

What is the primary function of the power supply unit (PSU) in a desktop computer?

  1. To store the firmware that initializes the hardware at boot
  2. To convert alternating current from the wall outlet into regulated direct current for internal components Correct answer.
  3. To regulate the clock frequency delivered to the CPU
  4. To convert direct current from the battery into alternating current for the monitor

Explanation

A desktop PSU rectifies and steps down mains AC and produces regulated DC rails (such as +12 V, +5 V and +3.3 V) that the motherboard and drives require. It supplies electrical power rather than timing signals or firmware.

Question 8Computer Fundamentals and Hardware

A technician installs a CPU into a socket whose pin arrangement does not match the processor. Which specification must be compared to confirm compatibility?

  1. The monitor refresh rate
  2. The drive rotational speed
  3. The CPU socket type Correct answer.
  4. The RAM CAS latency

Explanation

A processor physically and electrically fits only a socket of the matching type, such as LGA1700 or AM5, and the motherboard chipset must also support it. Memory timings, display refresh and disk speed do not determine whether a CPU can be seated.

Question 9Computer Fundamentals and Hardware

Which cache level is normally the smallest and fastest, and is private to a single CPU core?

  1. Main memory
  2. L1 cache Correct answer.
  3. L2 cache
  4. L3 cache

Explanation

The cache hierarchy trades size for speed: L1 is closest to the core, smallest, and fastest, typically only tens of kilobytes per core. L2 is larger and slower, and L3 is larger still and often shared across cores.

Question 10Computer Fundamentals and Hardware

What is the decimal value of the binary number 1011 0110?

  1. 190
  2. 182 Correct answer.
  3. 166
  4. 174

Explanation

Sum the place values for the set bits: 128 + 32 + 16 + 4 + 2 = 182. Each bit position represents a power of two, so only the positions holding a 1 contribute to the total.

Question 11Computer Fundamentals and Hardware

Which statement correctly describes the role of the program counter (PC) during instruction execution?

  1. It holds the result of the most recent arithmetic operation
  2. It records the base address of the stack segment
  3. It stores the instruction currently being decoded
  4. It holds the address of the next instruction to be fetched Correct answer.

Explanation

The program counter (also called the instruction pointer) tracks the address of the next instruction so the fetch unit knows where to read. It is updated by incrementing or by a branch, but it does not hold data results or the decoded instruction itself.

Question 12Computer Fundamentals and Hardware

A computer has 20 address lines on its memory bus. What is the maximum number of distinct byte addresses it can directly reference?

  1. 524,288
  2. 2,097,152
  3. 1,048,576 Correct answer.
  4. 10,485,760

Explanation

With n address lines the address space is 2^n locations, so 2^20 = 1,048,576 bytes, which is 1 MiB. Each additional address line doubles the addressable range.

Question 13Computer Fundamentals and Hardware

In the fetch-decode-execute cycle, what happens during the decode stage?

  1. The next instruction address is incremented in the program counter
  2. The control unit interprets the opcode and determines which operations and operands are required Correct answer.
  3. The result is stored in a general-purpose register
  4. The operands are written back to main memory

Explanation

Decoding translates the fetched binary instruction into control signals by interpreting the opcode and identifying the operands. Fetch retrieves the instruction, and execute performs the operation and writes back results.

Question 14Computer Fundamentals and Hardware

Which statement best explains why a system with a 64-bit processor and 32-bit operating system cannot use more than about 4 GiB of RAM?

  1. The 32-bit address width limits the operating system to 2^32 distinct addresses Correct answer.
  2. The BIOS disables all memory above 4 GiB regardless of the operating system
  3. The processor physically cannot accept more than 4 GiB of memory modules
  4. The 64-bit processor runs at half speed when paired with a 32-bit system

Explanation

A 32-bit address register can represent only 2^32 distinct byte addresses, about 4 GiB, so the operating system cannot map memory beyond that limit even on 64-bit hardware. The hardware may have more physical memory, but the OS address space caps what it can use.

Question 15Computer Fundamentals and Hardware

Which bus carries the address of the memory location or I/O port being accessed?

  1. The address bus Correct answer.
  2. The control bus
  3. The data bus
  4. The power bus

Explanation

The address bus is unidirectional from the processor and selects which memory location or port is being read or written. The data bus carries the actual contents, while the control bus carries signals such as read and write.

Question 16Computer Fundamentals and Hardware

A user wants a workstation for real-time 3D rendering and video editing. Which upgrade most directly improves performance for these workloads?

  1. Replacing the optical drive with a faster model
  2. Adding a second network interface card
  3. Increasing the monitor's refresh rate
  4. Adding a discrete GPU with dedicated video memory Correct answer.

Explanation

3D rendering and video encoding are heavily parallel and benefit from a discrete GPU with its own high-bandwidth memory, which offloads work from the CPU. Display refresh, optical drives and network adapters do not accelerate these computations.

Question 17Computer Fundamentals and Hardware

Which memory technology must be periodically refreshed to preserve its stored data?

  1. NOR flash
  2. Mask ROM
  3. Dynamic RAM Correct answer.
  4. Static RAM

Explanation

DRAM stores each bit as charge on a capacitor that leaks, so the memory controller must refresh every row within a fixed interval. SRAM uses cross-coupled transistors that hold state as long as power is applied and needs no refresh.

Question 18Computer Fundamentals and Hardware

What advantage does a unified extensible firmware interface (UEFI) provide over legacy BIOS when booting a modern system?

  1. It removes the need for any non-volatile firmware storage
  2. It eliminates the need for a bootloader of any kind
  3. It supports GPT partitioning, which allows boot disks larger than 2 TiB Correct answer.
  4. It guarantees that the operating system will boot without drivers

Explanation

UEFI can read GPT partition tables, so boot disks may exceed the 2 TiB limit imposed by the MBR scheme used with legacy BIOS. It still resides in non-volatile flash and still relies on boot entries or a bootloader to start an OS.

Question 19Computer Fundamentals and Hardware

A system has a 4-way set-associative cache. What does the associativity value indicate?

  1. Each memory block can be placed in any of 4 cache lines within its assigned set Correct answer.
  2. The cache holds exactly 4 blocks in total
  3. Each block is split into 4 sub-blocks stored in different levels of the hierarchy
  4. The cache is searched linearly across all 4 ways before any hit is declared

Explanation

Set associativity means the cache is divided into sets, each containing several ways or lines; a block maps to one set but may occupy any line within it. Higher associativity reduces conflict misses at the cost of more comparators and search logic.

Question 20Computer Fundamentals and Hardware

Which RAID level provides disk mirroring, writing identical data to two drives so the array survives the failure of one drive?

  1. RAID 6
  2. RAID 1 Correct answer.
  3. RAID 5
  4. RAID 0

Explanation

RAID 1 mirrors data across paired disks, so either disk alone holds a complete copy and a single failure causes no data loss. RAID 0 has no redundancy, while RAID 5 and RAID 6 use distributed parity.

Question 21Computer Fundamentals and Hardware

A CPU has a base clock of 3.0 GHz and the memory delivers one 8-byte word per 2 ns. What is the maximum sustained memory bandwidth in bytes per second?

  1. 2.4 × 10^10 bytes per second
  2. 8 × 10^9 bytes per second
  3. 4 × 10^9 bytes per second Correct answer.
  4. 1.5 × 10^9 bytes per second

Explanation

One 8-byte word every 2 ns gives 4 words per 8 ns, which is 4 × 10^9 bytes per second. The CPU clock rate is irrelevant here because the transfer is limited by the memory rate, not by instruction issue.

Question 22Computer Fundamentals and Hardware

Why does adding more levels of cache generally improve performance despite increasing total access latency on a miss?

  1. Lower levels capture most references quickly, so fewer requests reach slower memory Correct answer.
  2. Cache levels operate without any address translation
  3. Adding levels increases the CPU clock frequency automatically
  4. Each cache level stores a complete copy of main memory

Explanation

Locality of reference means the small, fast upper levels satisfy the majority of accesses, so the average access time is a weighted blend dominated by hits. The deeper levels and main memory handle the minority of misses, which is why the hierarchy outperforms a single large memory.

Question 23Computer Fundamentals and Hardware

An instruction pipeline has 5 stages and each stage takes 1 ns. Ignoring hazards, how long does it take to complete 100 independent instructions once the pipeline is full?

  1. About 104 ns Correct answer.
  2. About 20 ns
  3. About 100 ns
  4. About 500 ns

Explanation

The first instruction needs 5 cycles to fill the pipeline, and each subsequent instruction completes one per cycle, giving 5 + 99 = 104 cycles at 1 ns each. Throughput approaches one instruction per cycle rather than one per five cycles.

Question 24Computer Fundamentals and Hardware

A system uses 16-bit virtual addresses and 12-bit physical addresses with 1 KiB pages. How many entries are in the page table for a single process?

  1. 1024
  2. 64 Correct answer.
  3. 4096
  4. 16

Explanation

With 1 KiB pages, the offset uses 10 bits, leaving 16 - 10 = 6 bits for the virtual page number. That gives 2^6 = 64 page table entries, each mapping to a physical frame number.

Question 25Number Systems and Data Representation

How many distinct values can be represented with a 6-bit unsigned binary number?

  1. 64 Correct answer.
  2. 128
  3. 63
  4. 32

Explanation

An n-bit unsigned binary number has 2^n distinct patterns, and 2^6 = 64. These range from 0 (000000) to 63 (111111), so the count of values is 64 while the maximum value is 63.

Question 26Number Systems and Data Representation

What is the decimal value of the binary number 10110?

  1. 20
  2. 22 Correct answer.
  3. 26
  4. 18

Explanation

Evaluate place values from the left: 16 + 0 + 4 + 2 + 0 = 22. Each position doubles in weight, so the set bits at 16, 4 and 2 sum to 22.

Question 27Number Systems and Data Representation

Which hexadecimal digit represents the decimal value 12?

  1. D
  2. A
  3. B
  4. C Correct answer.

Explanation

Hexadecimal digits run 0-9 then A=10, B=11, C=12, D=13, E=14, F=15. Therefore 12 decimal is written as C.

Question 28Number Systems and Data Representation

A signed integer uses 8-bit two's complement. What decimal value does 11111111 represent?

  1. 255
  2. -128
  3. -127
  4. -1 Correct answer.

Explanation

In two's complement the most significant bit carries weight -128, and the remaining seven bits each add their positive weight. Here 11111111 equals -128 + 127 = -1, which is the standard all-ones pattern for minus one.

Question 29Number Systems and Data Representation

Which pair of values is equal when one is written in binary and the other in hexadecimal?

  1. 1000 0001 and 18
  2. 1101 0110 and D6 Correct answer.
  3. 1010 1010 and AB
  4. 1111 0000 and F1

Explanation

Each hexadecimal digit maps to exactly four binary bits, so 1101 is D and 0110 is 6, giving D6. The other pairs each mismatch at least one nibble when converted.

Question 30Number Systems and Data Representation

Using 8-bit two's complement, what is the result of adding 0111 1111 and 0000 0001?

  1. 1111 1111, which represents -1
  2. 1000 0000, which represents +128 correctly
  3. 0000 0000, because the carry out is discarded
  4. 1000 0000, which represents -128 because signed overflow occurred Correct answer.

Explanation

Adding 127 and 1 gives the bit pattern 1000 0000 with no room for +128 in 8-bit signed form. That pattern is interpreted as -128, so the sign flipped unexpectedly and signed overflow has occurred.

Question 31Number Systems and Data Representation

What is the decimal value of the hexadecimal number 2F?

  1. 45
  2. 31
  3. 50
  4. 47 Correct answer.

Explanation

Hexadecimal 2F means 2 × 16 + 15 = 32 + 15 = 47. The digit F contributes 15 in the units place.

Question 32Number Systems and Data Representation

Which decimal fraction is represented exactly by the binary fraction 0.101?

  1. 0.625 Correct answer.
  2. 0.5
  3. 0.125
  4. 0.75

Explanation

Binary fraction digits carry weights 1/2, 1/4, 1/8 and so on, so 0.101 equals 1/2 + 0 + 1/8 = 0.625. Only the first and third fractional positions are set.

Question 33Number Systems and Data Representation

Why can the decimal value 0.1 not be stored exactly in a standard IEEE 754 single-precision float?

  1. It requires more than 32 bits for its integer part
  2. It is a negative value and sign-magnitude cannot represent it
  3. Its binary expansion repeats infinitely, so it must be rounded to fit the finite mantissa Correct answer.
  4. It exceeds the maximum exponent allowed in single precision

Explanation

One tenth in binary is a repeating fraction, so no finite number of mantissa bits captures it exactly. The stored value is the nearest representable approximation, which is why floating-point comparisons often show small errors.

Question 34Number Systems and Data Representation

What is the 8-bit binary representation of the decimal number 45?

  1. 0010 1101 Correct answer.
  2. 0011 0101
  3. 0100 0101
  4. 0010 1011

Explanation

Subtracting place values: 45 = 32 + 8 + 4 + 1, so bits at 32, 8, 4 and 1 are set. Written as 8 bits that is 0010 1101.

Question 35Number Systems and Data Representation

In BCD (binary-coded decimal), how is the decimal number 27 stored in packed form?

  1. 0010 0111 Correct answer.
  2. 0110 0010
  3. 0010 0110
  4. 0001 1011

Explanation

Packed BCD stores one decimal digit per 4-bit nibble, so 2 becomes 0010 and 7 becomes 0111. Concatenating them gives 0010 0111.

Question 36Number Systems and Data Representation

A character set assigns codes to characters. If a document contains 300 characters and each character uses 8 bits, how many bytes does the raw character data occupy?

  1. 600
  2. 300 Correct answer.
  3. 37.5
  4. 2400

Explanation

Eight bits make one byte, so each character occupies exactly one byte. Three hundred characters therefore occupy 300 bytes, which equals 2400 bits.

Question 37Number Systems and Data Representation

What is the main purpose of using an excess (biased) representation for the exponent in floating-point formats?

  1. It guarantees every decimal fraction is exact
  2. It lets exponents be compared as unsigned integers and avoids a separate sign bit Correct answer.
  3. It removes the need for normalization
  4. It increases the number of mantissa bits available

Explanation

Adding a fixed bias maps negative and positive exponents into a single non-negative range, so ordering the stored exponent fields as unsigned numbers preserves numeric order. This simplifies hardware comparison and leaves one pattern free for special values.

Question 38Number Systems and Data Representation

What is the result of the binary subtraction 1011 − 0110?

  1. 1101
  2. 0011
  3. 1001
  4. 0101 Correct answer.

Explanation

In decimal this is 11 − 6 = 5, and 5 is 0101 in binary. Checking by addition, 0101 + 0110 = 1011 confirms the result.

Question 39Number Systems and Data Representation

Which statement correctly describes the relationship between the number of bits and the range of an unsigned integer?

  1. Each added bit increases the maximum value by two
  2. Each added bit increases the maximum value by one
  3. Each added bit halves the number of representable values
  4. Each added bit doubles the number of representable values Correct answer.

Explanation

An n-bit unsigned field holds 2^n patterns, so adding one bit doubles the pattern count and the new range extends to 2^(n+1) − 1. The growth is exponential, not linear.

Question 40Number Systems and Data Representation

Which encoding is most appropriate for storing the Unicode code point U+00E9 (é) in a system that must remain byte-compatible with ASCII text?

  1. EBCDIC, because it is the standard for web documents
  2. A 7-bit ASCII table, because it covers all Latin letters with accents
  3. UTF-16, because it always uses exactly one byte per character
  4. UTF-8, because its ASCII-range bytes match ASCII and it encodes this character in two bytes Correct answer.

Explanation

UTF-8 is a variable-length encoding whose single-byte values coincide with ASCII, so plain ASCII text stays unchanged while characters such as U+00E9 use two bytes. UTF-16 does not preserve ASCII byte compatibility and ASCII itself cannot represent accented characters.

Question 41Operating Systems and File Management

In a typical desktop operating system, which component is responsible for translating a logical file name such as report.docx into the physical disk blocks where the data is stored?

  1. The command interpreter
  2. The memory manager
  3. The device driver
  4. The file system Correct answer.

Explanation

The file system maintains metadata structures such as directories, file allocation tables, or inodes that map a logical name and offset to physical blocks on the storage device. Device drivers only move raw blocks to and from the hardware, and they do not interpret file names.

Question 42Operating Systems and File Management

A user creates a folder named Projects inside a folder named School. Which statement correctly describes the resulting directory relationship?

  1. Projects is the parent directory of School
  2. Projects is a root directory
  3. Projects and School are sibling directories
  4. School is the parent directory of Projects Correct answer.

Explanation

A directory created inside another directory becomes its child, so School is the parent and Projects is the child. The parent-child relationship follows the nesting of the path, not the order in which the folders were created.

Question 43Operating Systems and File Management

Which file extension most strongly suggests that a file contains executable program code on a Windows system?

  1. .exe Correct answer.
  2. .csv
  3. .txt
  4. .log

Explanation

Windows uses the .exe extension for executable program images that the loader can start. The other extensions are conventionally associated with plain text, comma-separated data, and log output, which are data files rather than programs.

Question 44Operating Systems and File Management

A user wants to move a file from one folder to another on the same volume while preserving its contents. Which operation accomplishes this most directly?

  1. Create a shortcut in the destination folder
  2. Cut the file, then paste it in the destination folder Correct answer.
  3. Rename the file, then delete the original
  4. Copy the file, then delete the original

Explanation

Cutting and pasting relocates the file, updating its directory entry so it appears in the destination while the data is preserved. Copying leaves the original in place until it is separately deleted, and renaming does not change the containing folder.

Question 45Operating Systems and File Management

A user opens a file, edits it, and saves it. Which statement best describes what the operating system typically does with the file's data during the save?

  1. It updates the in-memory buffer and may defer the physical write until a flush occurs Correct answer.
  2. It copies the file to a temporary directory and never removes the copy
  3. It deletes the original file before writing the new version
  4. It writes the modified data to disk immediately and synchronously in all cases

Explanation

Most operating systems buffer file writes in memory and flush them to disk later for efficiency, which is why an unexpected power loss can lose recent changes. The OS does not normally delete the original before writing, nor does it guarantee a synchronous disk write on every save.

Question 46Operating Systems and File Management

A file system stores each file's metadata in an inode-like structure. Which item is normally kept in that metadata rather than in the file's data blocks?

  1. The file's permission bits and owner Correct answer.
  2. The pixel values of an image
  3. The compiled machine instructions of a program
  4. The contents of a text document

Explanation

Metadata structures record attributes such as permissions, ownership, size, and timestamps, which describe the file rather than constitute its contents. Document text, image pixels, and program instructions are payload data stored in data blocks.

Question 47Operating Systems and File Management

A path is written as /home/ana/docs/notes.txt on a Linux system. Which statement is correct about this path?

  1. It is an absolute path because it begins at the root directory Correct answer.
  2. It refers to a file in the current working directory only
  3. It cannot be resolved without knowing the user's home directory
  4. It is a relative path because it contains slashes

Explanation

A path beginning with the separator character starts at the root of the file system hierarchy and is therefore absolute. Relative paths are resolved against the current working directory and do not begin with the root separator.

Question 48Operating Systems and File Management

A disk with 4 KB clusters stores a 1 KB file and a 9 KB file. Assuming no compression, sparse files, or other special handling, how much disk space do the two files consume in total?

  1. 10 KB
  2. 8 KB
  3. 16 KB
  4. 12 KB Correct answer.

Explanation

Allocation is in whole clusters, so the 1 KB file occupies one 4 KB cluster and the 9 KB file occupies three clusters (12 KB). The total is 4 KB plus 12 KB, or 16 KB.

Question 49Operating Systems and File Management

On a system using a hierarchical directory tree, what happens to the files inside a folder when the folder itself is deleted with a command that removes directories and their contents?

  1. The files become inaccessible but still occupy their original space
  2. The files are automatically converted to hidden files
  3. The files are moved to the parent directory
  4. The files are deleted along with the folder Correct answer.

Explanation

Removing a directory together with its contents deletes the contained entries as well, freeing their allocated blocks. The files are not relocated to the parent, and they do not silently persist as orphaned space unless the operation is interrupted or performed incorrectly.

Question 50Operating Systems and File Management

Which action best protects data against loss from a disk hardware failure while still keeping the data available on the same machine?

  1. Emptying the recycle bin frequently
  2. Storing a second copy on a separate physical drive Correct answer.
  3. Renaming files with descriptive names
  4. Defragmenting the drive regularly

Explanation

A separate physical drive provides an independent copy that survives failure of the original disk, which is the basis of redundancy and backup. Defragmentation, renaming, and emptying the recycle bin improve organization or performance but do not create a second copy.