18.10.26

CS101 Mid Term Papers

Getting ready for the midterm of CS101 (Introduction to Computing)? Here is everything in one place: 263 solved MCQs and 61 subjective questions with model answers, gathered from past papers and files shared by students. Duplicates are removed, and wherever a shared answer key turned out to be wrong it has been corrected, so you can trust what you revise. Use the Objective and Subjective buttons above to switch between the two sections, and tap Show answer only after you have tried the question yourself. Best of luck with your exam!

Part 1: MCQs

Q1. What is the main focus of Computer Science?

  1. Software
  2. Hardware
  3. Algorithms
  4. Telecommunication
Show answer

Answer: (c) Algorithms

Q2. What does computer hardware encompass?

  1. Only external components
  2. Only internal components
  3. Both external and internal components
  4. Only the motherboard
Show answer

Answer: (c) Both external and internal components

Q3. What is the role of computer software?

  1. To perform physical tasks
  2. To manage hardware components
  3. To provide instructions to the computer
  4. To maintain data records
Show answer

Answer: (c) To provide instructions to the computer

Q4. Which field of Computer Science involves designing executable computer programs?

  1. Networking
  2. Graphics
  3. Robotics
  4. Programming
Show answer

Answer: (d) Programming

Q5. In which domain is computer graphics a core technology?

  1. Healthcare
  2. Telecommunications
  3. Entertainment
  4. Banking
Show answer

Answer: (c) Entertainment

Q6. What is a robot's defining characteristic?

  1. It is programmable by a computer.
  2. It is capable of complex actions.
  3. It is controlled externally.
  4. It generates computer graphics.
Show answer

Answer: (a) It is programmable by a computer.

Q7. What is the purpose of a database management system (DBMS)?

  1. Generating computer graphics
  2. Storing data for retrieval
  3. Securing computer systems
  4. Performing complex actions
Show answer

Answer: (b) Storing data for retrieval

Q8. What does "security" in Computer Science primarily aim to provide?

  1. Speed and efficiency
  2. Confidentiality, integrity, and availability
  3. Hardware components
  4. Firmware updates
Show answer

Answer: (b) Confidentiality, integrity, and availability

Q9. In which industries can Computer Science find applications?

  1. Telecom, Banks, and Hospitals
  2. Education and Agriculture
  3. Manufacturing and Construction
  4. Arts and Culture
Show answer

Answer: (a) Telecom, Banks, and Hospitals
Note: Computer Science is used in almost every industry; the lecture's example list is telecom, banks and hospitals.

Q10. According to Forbes magazine, which job was ranked Number 1 in the US?

  1. Quality Assurance Expert
  2. IT Manager
  3. Software Developer
  4. Full-Stack Engineer
Show answer

Answer: (c) Software Developer
Note: As stated in the lecture. Such rankings change from year to year.

Q11. What is the primary focus of Breadth First Learning in this course?

  1. Covering one particular course in detail
  2. Providing a basic introduction to all Computer Science courses
  3. Focusing on advanced operators in computer science
  4. Exploring the history of computing
Show answer

Answer: (b) Providing a basic introduction to all Computer Science courses

Q12. In the course, what does the term "Data Abstraction" refer to?

  1. Storing data in hardware
  2. Performing arithmetic operations in computer science
  3. Hiding complexities in large system design
  4. Communicating over the internet
Show answer

Answer: (c) Hiding complexities in large system design

Q13. What will be covered in the "Software Engineering" section of the course?

  1. Advanced programming in C++
  2. Designing, implementation, and testing of software
  3. Operating system functionalities
  4. Data manipulation techniques
Show answer

Answer: (b) Designing, implementation, and testing of software

Q14. How is an algorithm defined in Computer Science?

  1. A set of steps to perform a certain task
  2. A sequence of data manipulation operations
  3. A complex system design
  4. A tool for database management
Show answer

Answer: (a) A set of steps to perform a certain task

Q15. Which search engine does this course focus on?

  1. Yahoo
  2. MSN
  3. Google
  4. Bing
Show answer

Answer: (c) Google

Q16. How does Google find relevant pages when a user types a query?

  1. It finds pages containing all the terms given in the query
  2. It finds pages containing any of the terms in the query
  3. It finds pages based on alphabetical order
  4. It finds pages containing only the exact phrase in double quotes
Show answer

Answer: (a) It finds pages containing all the terms given in the query

Q17. What is the purpose of the microphone icon in the Google search box?

  1. To perform calculations
  2. To search by speaking
  3. To flip a coin
  4. To convert currency
Show answer

Answer: (b) To search by speaking

Q18. How should queries be formulated to account for upper and lower case letters in Google?

  1. Capitalize all letters in the query
  2. Use lowercase letters in the query
  3. It doesn't matter; Google ignores capitalization
  4. Use the proper case for each word in the query
Show answer

Answer: (c) It doesn't matter; Google ignores capitalization
Note: Google is case-insensitive. The source printed this option as "Google recognizes capitalization", which contradicts the correct answer, so the wording was corrected.

Q19. What is the correct query to find the tallest building in Pakistan as an exact phrase?

  1. "Tallest Building in Pakistan"
  2. Tallest Building in Pakistan
  3. Tallest, Building, Pakistan
  4. Tallest Pakistan Building
Show answer

Answer: (a) "Tallest Building in Pakistan"

Q20. What is the query format to perform calculations on Google?

  1. Type the mathematical operation like 12*391
  2. Use a calculator app
  3. Type numbers with a plus sign, like 12+391
  4. Use double quotes for calculations
Show answer

Answer: (a) Type the mathematical operation like 12*391

Q21. How can you see the latest currency conversion on Google?

  1. Type "Currency Conversion" and choose a currency
  2. Add "pkr" in front of a number
  3. Type "Currency" followed by the amount and the currency code
  4. Search for "Exchange Rate" on Google
Show answer

Answer: (b) Add "pkr" in front of a number
Note: This is the technique taught in the lecture (a currency code in front of a number).

Q22. What is the query format to search for a specific file type like PDF?

  1. "Virtual University" file:pdf
  2. "Virtual University" filetype:pdf
  3. "Virtual University" ext:pdf
  4. "Virtual University" format:pdf
Show answer

Answer: (b) "Virtual University" filetype:pdf
Note: filetype:pdf is the standard Google operator (ext:pdf also works, but filetype: is the one taught).

Q23. How can you search for a specific query within a social media platform like Facebook?

  1. Add "@" symbol before the query, e.g., "Fifa World cup @facebook"
  2. Use double quotes around the query, e.g., "Fifa World cup"
  3. Type the query in all caps, e.g., "FIFA WORLD CUP"
  4. Add "social:" before the query, e.g., "social:Fifa World cup"
Show answer

Answer: (a) Add "@" symbol before the query, e.g., "Fifa World cup @facebook"

Q24. How can you exclude specific words from a query?

  1. Use double quotes around the words to exclude
  2. Use the "-" symbol before the words to exclude
  3. Add "not" before the words to exclude
  4. Use a question mark before the words to exclude
Show answer

Answer: (b) Use the "-" symbol before the words to exclude

Q25. What is the purpose of enclosing a query in double quotes?

  1. To find pages with any of the words in the query
  2. To perform calculations on Google
  3. To search for an exact phrase as it is
  4. To search with a specific site
Show answer

Answer: (c) To search for an exact phrase as it is

Q26. How can you search for a phrase when you don't know what word comes before it?

  1. Use a wildcard (*) before the phrase
  2. Use a question mark before the phrase
  3. Use double quotes around the phrase
  4. Use a dollar sign before the phrase
Show answer

Answer: (a) Use a wildcard (*) before the phrase

Q27. How can you search for a range of numbers using Google?

  1. Use double dots (..) between the numbers, e.g., "pkr25000..pkr35000"
  2. Use the "+" symbol between the numbers, e.g., "pkr25000+pkr35000"
  3. Use the "to" keyword between the numbers, e.g., "pkr25000 to pkr35000"
  4. Use the "#" symbol between the numbers, e.g., "pkr25000#pkr35000"
Show answer

Answer: (a) Use double dots (..) between the numbers, e.g., "pkr25000..pkr35000"

Q28. Which of the following is one of the earliest computing devices?

  1. Transistor
  2. Abacus
  3. ENIAC
  4. Punch cards
Show answer

Answer: (b) Abacus

Q29. Which inventors experimented with gear-based computing machines?

  1. Steve Jobs and Stephen Wozniak
  2. Blaise Pascal, Gottfried Wilhelm Leibniz, and Charles Babbage
  3. Herman Hollerith and John Mauchly
  4. George Stibitz and Howard Aiken
Show answer

Answer: (b) Blaise Pascal, Gottfried Wilhelm Leibniz, and Charles Babbage

Q30. What technology did Herman Hollerith use to speed up the tabulation of the 1890 U.S. census?

  1. Vacuum tubes
  2. Transistors
  3. Punch cards
  4. Gears
Show answer

Answer: (c) Punch cards

Q31. What is the full form of ENIAC?

  1. Electronic Numerical Integrator and Calculator
  2. Electronic Network Integrator and Calculator
  3. Electrical Numeric Integrator and Computer
  4. Electronic Numeric Integrated Analysis Calculator
Show answer

Answer: (a) Electronic Numerical Integrator and Calculator
Note: This is the wording used in the course text (many other books write "Integrator and Computer").

Q32. How much electricity did the ENIAC consume?

  1. 20 Kilowatts
  2. 200 Kilowatts
  3. 2 Kilowatts
  4. 10 Kilowatts
Show answer

Answer: (b) 200 Kilowatts
Note: Figure used in the course text. Other sources quote about 150 kW.

Q33. What is the basic unit of storage in a computer?

  1. Byte
  2. Bit
  3. Word
  4. Kilobyte
Show answer

Answer: (b) Bit

Q34. How is information coded in bits?

  1. Using a combination of letters and numbers
  2. As patterns of 0 or 1
  3. Using hexadecimal values
  4. Using a combination of 1 and 2
Show answer

Answer: (b) As patterns of 0 or 1

Q35. What do 1-bit units represent in a chip?

  1. Electric charge
  2. Magnetic fields
  3. Radio waves
  4. Heat energy
Show answer

Answer: (a) Electric charge
Note: As given in the lecture: a bit is held as an electric charge (state) in the chip's circuitry.

Q36. How many patterns can be represented with 2 bits?

  1. 2
  2. 3
  3. 4
  4. 5
Show answer

Answer: (c) 4

Q37. What is used to represent the different characters in ASCII codes?

  1. Hexadecimal values
  2. Decimal numbers
  3. Octal values
  4. Bit patterns
Show answer

Answer: (d) Bit patterns

Q38. What is George Boole known for?

  1. Inventing the abacus
  2. Pioneer in computer graphics
  3. Pioneer in Boolean operations
  4. Creating the first computer mouse
Show answer

Answer: (c) Pioneer in Boolean operations

Q39. Which of the following is NOT a Boolean operation?

  1. AND
  2. OR
  3. XOR
  4. ADD
Show answer

Answer: (d) ADD

Q40. In Boolean operations, what does the bit 0 represent?

  1. True
  2. False
  3. 1
  4. -1
Show answer

Answer: (b) False

Q41. Why is hexadecimal notation used in computer systems?

  1. To confuse users
  2. To simplify the representation of bit patterns
  3. To make bit patterns longer
  4. To reduce the number of bits
Show answer

Answer: (b) To simplify the representation of bit patterns

Q42. How many bits does each hexadecimal symbol represent?

  1. 1 bit
  2. 2 bits
  3. 3 bits
  4. 4 bits
Show answer

Answer: (d) 4 bits

Q43. What is the hexadecimal representation of the bit pattern 111010000101010100010111?

  1. E8A517
  2. E85517
  3. E810A5
  4. E10111
Show answer

Answer: (b) E85517
Note: Group in fours: 1110 1000 0101 0101 0001 0111 = E 8 5 5 1 7.

Q44. What is the main purpose of a computer's main memory?

  1. To store mass storage devices
  2. To store data in binary form
  3. To perform calculations
  4. To store individual bits
Show answer

Answer: (b) To store data in binary form

Q45. What is the name for a computer's main memory that allows independent access to its cells?

  1. ROM
  2. RAM
  3. DRAM
  4. SDRAM
Show answer

Answer: (b) RAM

Q46. What does "RAM" stand for?

  1. Random Access Memory
  2. Read-Only Memory
  3. Rapid Access Memory
  4. Remote Access Memory
Show answer

Answer: (a) Random Access Memory

Q47. Which mass storage system uses optical technology?

  1. Magnetic disks
  2. CDs
  3. Magnetic tapes
  4. Solid-state disks
Show answer

Answer: (b) CDs

Q48. What is the capacity of a typical CD sector?

  1. 1 KB
  2. 2 KB
  3. 512 bytes
  4. 1 MB
Show answer

Answer: (b) 2 KB
Note: Corrected: a sector on a CD holds 2 KB. The shared key said 512 bytes, which is the usual sector size of a magnetic disk.

Q49. Which optical system is best suited for long continuous strings of data?

  1. CDs
  2. DVDs
  3. BDs
  4. Flash drives
Show answer

Answer: (a) CDs
Note: According to the lecture: a CD stores data on one spiral track, which suits long continuous data such as music.

Q50. How are bits stored in flash drives?

  1. By using lasers
  2. By sending electronic signals
  3. By using magnetic coatings
  4. By physically moving read/write heads
Show answer

Answer: (b) By sending electronic signals

Q51. How many bits are typically used to store each textual symbol?

  1. 4 bits
  2. 6 bits
  3. 8 bits
  4. 16 bits
Show answer

Answer: (c) 8 bits
Note: ASCII itself defines 7-bit patterns, but each symbol is normally stored in one 8-bit byte.

Q52. Which organization designed the American Standard Code for Information Interchange (ASCII)?

  1. ISO
  2. ANSI
  3. Unicode Consortium
  4. IEEE
Show answer

Answer: (b) ANSI

Q53. How many combinations can be represented using 7 bits in ASCII?

  1. 64
  2. 128
  3. 256
  4. 512
Show answer

Answer: (b) 128

Q54. What is the maximum number of characters that can be represented using 8 bits (1 byte)?

  1. 64
  2. 128
  3. 256
  4. 512
Show answer

Answer: (c) 256

Q55. Which code standard supports thousands of character sets, including Chinese, Hebrew, and Japanese?

  1. ASCII
  2. ANSI
  3. Unicode
  4. ISO
Show answer

Answer: (c) Unicode

Q56. What is binary notation primarily composed of?

  1. Digits 0 to 9
  2. Digits 0 and 1
  3. Digits 0 to 7
  4. Digits 0 to 15
Show answer

Answer: (b) Digits 0 and 1

Q57. How many values can be represented using 4 bits in binary notation?

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

Answer: (c) 16
Note: Corrected: 2^4 = 16. The shared key said 8.

Q58. How many numeric values can be represented using 16 bits in binary notation?

  1. 256
  2. 512
  3. 65536
  4. 131,072
Show answer

Answer: (c) 65536

Q59. What is the name for the smallest unit in an image?

  1. Vector
  2. Pixel
  3. Byte
  4. Dot
Show answer

Answer: (b) Pixel

Q60. How are black and white images typically represented using pixels?

  1. 8 bits per pixel
  2. 4 bits per pixel
  3. 2 bits per pixel
  4. 1 bit per pixel
Show answer

Answer: (d) 1 bit per pixel

Q61. How many bytes are used to represent one pixel in RGB encoding?

  1. 1 byte
  2. 2 bytes
  3. 3 bytes
  4. 4 bytes
Show answer

Answer: (c) 3 bytes

Q62. What does MIDI stand for in the context of sound representation?

  1. Musical Instrument Digital Interface
  2. Music In Digital Information
  3. Musical Instrument Data Integration
  4. Music In Digital Interface
Show answer

Answer: (a) Musical Instrument Digital Interface

Q63. How many bits are used to record each sample in today's CDs?

  1. 8 bits
  2. 16 bits
  3. 24 bits
  4. 32 bits
Show answer

Answer: (b) 16 bits

Q64. What is the primary advantage of MIDI over traditional sound encoding methods?

  1. Smaller file size
  2. Higher fidelity
  3. Greater accuracy
  4. Wider compatibility
Show answer

Answer: (a) Smaller file size

Q65. How is binary addition carried out when both bits are 1?

  1. It results in a carry-over
  2. It produces a 0 with no carry-over
  3. It produces a 1 with no carry-over
  4. It is not possible
Show answer

Answer: (a) It results in a carry-over
Note: 1 + 1 = 10 in binary: the digit is 0 and a 1 is carried.

Q66. How many possibilities are there when adding two bits in binary notation?

  1. 2
  2. 3
  3. 4
  4. 5
Show answer

Answer: (c) 4

Q67. In binary fraction representation, what does the radix point signify?

  1. It separates positive and negative values.
  2. It indicates the position of the exponent.
  3. It separates the whole number part from the fractional part.
  4. It represents the sign of the number.
Show answer

Answer: (c) It separates the whole number part from the fractional part.

Q68. In 2's complement notation, how are negative integers represented?

  1. Starting with all 0's and counting upwards
  2. Starting with all 1's and counting upwards
  3. Starting with all 1's and counting downwards
  4. Starting with all 0's and counting downwards
Show answer

Answer: (c) Starting with all 1's and counting downwards

Q69. What is the primary purpose of the sign bit in 2's complement notation?

  1. To indicate the position of the radix point
  2. To separate the whole number and fractional part
  3. To represent the magnitude of the number
  4. To indicate the sign of the number (positive or negative)
Show answer

Answer: (d) To indicate the sign of the number (positive or negative)

Q70. What is the maximum positive value that can be represented using 4 bits in 2's complement notation?

  1. 7
  2. 8
  3. 15
  4. 16
Show answer

Answer: (a) 7

Q71. In Excess notation, which bit pattern is used to represent zero?

  1. The pattern with the highest significant bit set to 1
  2. The pattern with all bits set to 0
  3. The pattern with all bits set to 1
  4. The pattern with the highest significant bit set to 0
Show answer

Answer: (a) The pattern with the highest significant bit set to 1
Note: Zero is the pattern that starts with a 1 followed by all 0s (for example 1000 with 4 bits).

Q72. How are positive numbers represented in Excess notation?

  1. By adding a fixed number to their binary representation
  2. By subtracting a fixed number from their binary representation
  3. By using the original binary representation
  4. By inverting all the bits in their binary representation
Show answer

Answer: (a) By adding a fixed number to their binary representation
Note: Judgment call: in Excess notation the stored pattern is the value plus a fixed excess, which is the closest option.

Q73. What is the role of the exponent field in floating-point notation?

  1. It stores the sign of the number.
  2. It determines the position of the radix point.
  3. It represents the magnitude of the number.
  4. It indicates the number of bits used for storage.
Show answer

Answer: (b) It determines the position of the radix point.

Q74. In normalized floating-point notation, where do you start copying the bit pattern when filling the mantissa field?

  1. From the rightmost bit
  2. From the leftmost 1 in the binary representation
  3. From the leftmost bit
  4. From the sign bit
Show answer

Answer: (b) From the leftmost 1 in the binary representation

Q75. What does the sign bit in floating-point notation indicate?

  1. The position of the radix point
  2. The sign of the exponent
  3. The sign of the mantissa
  4. The sign of the value (positive or negative)
Show answer

Answer: (d) The sign of the value (positive or negative)

Q76. Which notation is commonly used to represent integers in today's computers?

  1. Excess Notation
  2. Floating Point Notation
  3. 2's Complement Notation
  4. Binary Notation
Show answer

Answer: (c) 2's Complement Notation

Q77. Which field in floating-point notation holds the fractional part (significant bits) of the number?

  1. Sign bit
  2. Exponent field
  3. Mantissa field
  4. Radix field
Show answer

Answer: (c) Mantissa field

Q78. What is the maximum positive value in 2's complement notation when 32 bits are used?

  1. 2,147,483,648
  2. 2,147,483,647
  3. 2,000,000,000
  4. 32,768
Show answer

Answer: (b) 2,147,483,647
Note: 2^31 - 1 = 2,147,483,647.

Q79. In floating-point notation, how is the exponent field interpreted?

  1. As an integer using the excess method
  2. As a floating-point value
  3. As a binary representation of the mantissa
  4. As a sign of the value
Show answer

Answer: (a) As an integer using the excess method

Q80. Which method eliminates the possibility of multiple representations for the same value in floating-point notation?

  1. Using a different number of bits
  2. Using floating-point notation
  3. Using normalized form
  4. Using the same bit pattern for all values
Show answer

Answer: (c) Using normalized form

Q81. What is the result of trying to store the value 2 5/8 in a one-byte floating-point system?

  1. Accurate representation
  2. Truncation error
  3. Round-off error
  4. Overflow error
Show answer

Answer: (b) Truncation error
Note: The source printed the value as "25/8"; it is 2 5/8 (binary 10.101), which needs five mantissa bits when only four are available.

Q82. When 2 5/8 is copied into the mantissa field, which part of the value is lost?

  1. The integer part
  2. The fractional part
  3. The leftmost 1/8
  4. The rightmost 1/8
Show answer

Answer: (d) The rightmost 1/8

Q83. What is the term for the loss of part of a value because of the size limit of the mantissa field?

  1. Truncation error
  2. Round-off error
  3. Overflow error
  4. Precision error
Show answer

Answer: (a) Truncation error

Q84. How can the significance of truncation errors be reduced?

  1. By using a longer exponent field
  2. By using a longer sign bit
  3. By using a longer mantissa field
  4. By using a longer radix point
Show answer

Answer: (c) By using a longer mantissa field

Q85. What is the main drawback of the GIF compression system when used for arbitrary images?

  1. It requires a large palette
  2. It produces lossless compression
  3. It limits the number of colors to 256
  4. It does not work well with text documents
Show answer

Answer: (c) It limits the number of colors to 256

Q86. Which compression technique replaces sequences of identical data elements with a code indicating the element and the number of times it occurs?

  1. Lossless encoding
  2. Frequency-dependent encoding
  3. Run-length encoding
  4. Relative encoding
Show answer

Answer: (c) Run-length encoding

Q87. What is the primary advantage of dictionary encoding systems in data compression?

  1. Lossy compression
  2. Fixed-length codes
  3. High precision
  4. Elimination of redundancy
Show answer

Answer: (d) Elimination of redundancy

Q88. What is adaptive dictionary encoding?

  1. It allows the dictionary to change during the encoding process.
  2. It uses fixed-length codes for dictionary entries.
  3. It relies on lossy compression techniques.
  4. It does not use dictionaries for encoding.
Show answer

Answer: (a) It allows the dictionary to change during the encoding process.

Q89. What does the term "I-frames" refer to in video compression?

  1. Frames with incomplete data
  2. Frames with high precision
  3. Frames with lossless compression
  4. Frames encoded in their entirety
Show answer

Answer: (d) Frames encoded in their entirety

Q90. What is the primary advantage of MP3 audio compression?

  1. Lossless compression
  2. High precision sound
  3. Removal of perceptually irrelevant audio details
  4. Loss of audio quality
Show answer

Answer: (c) Removal of perceptually irrelevant audio details

Q91. What are the common units used to measure transmission speeds for audio and video data?

  1. Bps, Gbps, and Tbps
  2. Kbps, Mbps, and Gbps
  3. Mbps, Tbps, and Pbps
  4. Kbps, Gbps, and Pbps
Show answer

Answer: (b) Kbps, Mbps, and Gbps

Q92. Which organization developed the MPEG standards for encoding and compressing audio and video?

  1. ISO
  2. GIF
  3. TIFF
  4. JPEG
Show answer

Answer: (a) ISO
Note: MPEG (Motion Picture Experts Group) is a working group of ISO.

Q93. What is the acronym "MP3" short for?

  1. MPEG layer 3
  2. Multimedia Programming 3
  3. Motion Picture Experts Group 3
  4. Music and Podcast 3
Show answer

Answer: (a) MPEG layer 3

Q94. What is the purpose of averaging chrominance values over two-by-two-pixel squares in image compression?

  1. To reduce image resolution
  2. To increase image quality
  3. To reduce chrominance information
  4. To preserve color accuracy
Show answer

Answer: (c) To reduce chrominance information

Q95. What are the three main parts of a CPU?

  1. Input, Output, Storage
  2. ALU, RAM, Control Unit
  3. Arithmetic/Logic Unit, Control Unit, Register Unit
  4. CPU Core, Cache, Main Memory
Show answer

Answer: (c) Arithmetic/Logic Unit, Control Unit, Register Unit

Q96. How does the CPU perform operations on data stored in main memory?

  1. It directly operates on the memory cells.
  2. It transfers the data to general-purpose registers.
  3. It communicates with the storage devices.
  4. It uses the control unit to modify the memory cells.
Show answer

Answer: (b) It transfers the data to general-purpose registers.

Q97. What connects the CPU and main memory for data transfer?

  1. Wires
  2. Buses
  3. Cables
  4. Fiber optics
Show answer

Answer: (b) Buses

Q98. How does the CPU read data from main memory?

  1. By directly accessing the memory cells
  2. By sending an electronic signal to the memory circuitry
  3. By transferring the data to the control unit
  4. By activating the arithmetic/logic unit
Show answer

Answer: (b) By sending an electronic signal to the memory circuitry

Q99. What is the term for changing the contents of a computer's memory (its program) to modify its operation?

  1. Rewiring
  2. Rebooting
  3. Reprogramming
  4. Refactoring
Show answer

Answer: (c) Reprogramming

Q100. Which concept allows programs to be encoded and stored in main memory, so they can be changed without rewiring the CPU?

  1. Stored-program concept
  2. Programmatic memory
  3. CPU reconfiguration
  4. Memory reprogramming
Show answer

Answer: (a) Stored-program concept

Q101. What is the collection of instructions encoded as bit patterns called?

  1. Bytecode
  2. Assembly language
  3. Machine language
  4. Binary code
Show answer

Answer: (c) Machine language

Q102. Which philosophy of CPU architecture favors a minimal set of machine instructions?

  1. Reduced Instruction Set Computer (RISC)
  2. Complex Instruction Set Computer (CISC)
  3. Minimalistic Instruction Set Computer (MISC)
  4. Basic Instruction Set Computer (BISC)
Show answer

Answer: (a) Reduced Instruction Set Computer (RISC)

Q103. Which architecture is known for its efficiency, speed, and lower manufacturing cost?

  1. RISC
  2. CISC
  3. MISC
  4. BISC
Show answer

Answer: (a) RISC

Q104. Which type of processors is used in PCs, such as Intel processors?

  1. RISC
  2. CISC
  3. MISC
  4. BISC
Show answer

Answer: (b) CISC

Q105. Which company is known for designing RISC architecture for low power consumption?

  1. Intel
  2. AMD
  3. ARM Holdings
  4. Qualcomm
Show answer

Answer: (c) ARM Holdings

Q106. How are a machine's instructions categorized?

  1. By their complexity
  2. By their execution speed
  3. By their memory usage
  4. Into three groups
Show answer

Answer: (d) Into three groups
Note: The three groups are data transfer, arithmetic/logic and control.

Q107. Which term is more appropriate than "move" for the actions of the data transfer group of instructions?

  1. Move
  2. Copy
  3. Delete
  4. Swap
Show answer

Answer: (b) Copy

Q108. What is a request to fill a general-purpose register with the contents of a memory cell called?

  1. Clone instruction
  2. Transfer instruction
  3. LOAD instruction
  4. STORE instruction
Show answer

Answer: (c) LOAD instruction

Q109. Which group of instructions handles the input/output activities of the machine?

  1. Data transfer group
  2. Arithmetic/Logic group
  3. Control group
  4. I/O group
Show answer

Answer: (a) Data transfer group
Note: Corrected: in the course text, I/O instructions belong to the data transfer group. The shared key said "I/O group", which is not one of the three groups.

Q110. What does the arithmetic/logic group of instructions ask the control unit to do?

  1. Request data transfer
  2. Perform arithmetic operations
  3. Execute program instructions
  4. Control data flow
Show answer

Answer: (b) Perform arithmetic operations

Q111. What do the control group instructions primarily direct?

  1. Data manipulation
  2. Input/Output operations
  3. Program execution
  4. Data transfer
Show answer

Answer: (c) Program execution

Q112. How is a machine instruction fetched from main memory to the CPU?

  1. By directly executing the instruction
  2. By decoding the instruction
  3. By obeying the instruction
  4. By transferring it using a bus
Show answer

Answer: (d) By transferring it using a bus

Q113. What determines the order of execution of instructions in memory?

  1. The CPU's program counter
  2. The CPU's instruction register
  3. The CPU's control unit
  4. The CPU's arithmetic/logic unit
Show answer

Answer: (a) The CPU's program counter

Q114. What is the role of the Instruction Register?

  1. To execute instructions
  2. To decode instructions
  3. To hold the currently executed instruction
  4. To fetch instructions from memory
Show answer

Answer: (c) To hold the currently executed instruction

Q115. In the machine cycle, what happens during the execution step?

  1. Instructions are fetched from memory
  2. Instructions are decoded
  3. Instructions are executed
  4. Instructions are stored in the program counter
Show answer

Answer: (c) Instructions are executed

Q116. In a machine whose instructions are two bytes long, what does the program counter contain after the instruction at address A4 has been fetched and executed (with no jump)?

  1. A4
  2. 166D
  3. A6
  4. 5056
Show answer

Answer: (c) A6

Q117. What is one major use of the AND operation in data manipulation?

  1. Combining two strings of bits
  2. Duplicating a bit pattern
  3. Inverting all the bits
  4. Moving bits within a register
Show answer

Answer: (b) Duplicating a bit pattern
Note: AND with a mask places 0s in one part of a bit string while duplicating the rest.

Q118. When the AND operation is used for masking, what does the mask determine?

  1. The position of the result
  2. The type of operation to perform
  3. Which part of the other operand affects the result
  4. The color of the result
Show answer

Answer: (c) Which part of the other operand affects the result

Q119. What does the OR operation do when used with a mask?

  1. Duplicates a part of a string
  2. Inverts all the bits in a string
  3. Rotates the bits in a string
  4. Discards the bits in a string
Show answer

Answer: (a) Duplicates a part of a string
Note: OR with a mask places 1s in one part of a string while duplicating the rest.

Q120. How is the XOR operation often used?

  1. To perform multiplication
  2. To perform division
  3. To form the complement of a bit string
  4. To perform circular shifts
Show answer

Answer: (c) To form the complement of a bit string

Q121. What are rotation and shift operations used for?

  1. Solving alignment problems
  2. Multiplying two's complement representations
  3. Adding two bit patterns
  4. Inverting all the bits in a register
Show answer

Answer: (a) Solving alignment problems

Q122. What distinguishes a circular shift (rotation) from a logical shift?

  1. The direction of motion
  2. The circular shift always fills the hole with 1
  3. The logical shift always fills the hole with 0
  4. The circular shift never discards bits
Show answer

Answer: (d) The circular shift never discards bits
Note: Corrected: in a circular shift the bits that fall off one end re-enter at the other end, so none are discarded. The shared key ("fills the hole with 1") is wrong.

Q123. How can subtraction be simulated using addition in 2's complement notation?

  1. By adding the binary of the first number to the binary of the second number
  2. By adding the binary of the first number to the negation of the second number
  3. By adding the binary of the second number to the binary of the first number
  4. By multiplying the binary of the first number with the binary of the second number
Show answer

Answer: (b) By adding the binary of the first number to the negation of the second number

Q124. In the context of arithmetic operations, multiplication can be seen as:

  1. Repetitive subtraction
  2. Repetitive addition
  3. Division by addition
  4. Division by subtraction
Show answer

Answer: (b) Repetitive addition

Q125. How can division be achieved on some small CPUs?

  1. By adding
  2. By subtracting
  3. By multiplication
  4. By division
Show answer

Answer: (b) By subtracting
Note: By repeated subtraction.

Q126. Which arithmetic operation is straightforward to carry out on numbers stored in 2's complement notation?

  1. Multiplication
  2. Division
  3. Addition
  4. Subtraction
Show answer

Answer: (c) Addition

Q127. What is the role of a controller in a computer system?

  1. It executes the main program of the computer.
  2. It connects external devices to the computer.
  3. It is responsible for executing instructions in the CPU.
  4. It manages the computer's memory.
Show answer

Answer: (b) It connects external devices to the computer.

Q128. How does a controller typically connect to peripheral devices?

  1. Via wireless connections.
  2. By using separate CPU chips.
  3. Through a shared memory module.
  4. Via cables and ports.
Show answer

Answer: (d) Via cables and ports.

Q129. What is the function of a controller in translating messages and data between a computer and peripheral devices?

  1. It converts messages into audio tones.
  2. It performs arithmetic calculations.
  3. It connects the computer to the internet.
  4. It translates data formats between computer and device.
Show answer

Answer: (d) It translates data formats between computer and device.

Q130. How has the development of standards like USB and FireWire affected controllers in personal computers?

  1. They have made controllers obsolete.
  2. They have simplified the role of controllers.
  3. They have increased the need for multiple controllers.
  4. They have enabled a single controller to handle various devices.
Show answer

Answer: (d) They have enabled a single controller to handle various devices.

Q131. Where do controllers typically connect within a computer's architecture?

  1. To a dedicated controller bus.
  2. To the computer's power supply.
  3. To the computer's central processing unit.
  4. To the same bus connecting the CPU and main memory.
Show answer

Answer: (d) To the same bus connecting the CPU and main memory.

Q132. How does a CPU send a bit pattern to a controller?

  1. By executing a STORE instruction.
  2. By executing a LOAD instruction.
  3. By using a separate controller bus.
  4. By sending an electrical signal directly.
Show answer

Answer: (a) By executing a STORE instruction.

Q133. What is the significance of direct memory access (DMA) in computer systems?

  1. It simplifies bus communication.
  2. It allows the CPU to communicate directly with peripheral devices.
  3. It enables controllers to access main memory during CPU idle time.
  4. It eliminates the need for controllers.
Show answer

Answer: (c) It enables controllers to access main memory during CPU idle time.

Q134. What is the main drawback of direct memory access (DMA)?

  1. It simplifies communication.
  2. It increases CPU utilization.
  3. It adds complexity to bus communication.
  4. It does not improve computer performance.
Show answer

Answer: (c) It adds complexity to bus communication.

Q135. What is parallel communication in computing?

  1. It transfers one signal at a time.
  2. It requires a simple data path.
  3. It involves several signals transferred simultaneously on separate lines.
  4. It is a form of wireless communication.
Show answer

Answer: (c) It involves several signals transferred simultaneously on separate lines.

Q136. What is serial communication in computing?

  1. It transfers one signal at a time.
  2. It involves complex data paths.
  3. It is slower than parallel communication.
  4. It requires multiple connections for each signal.
Show answer

Answer: (a) It transfers one signal at a time.

Q137. USB and FireWire are examples of which type of communication?

  1. Serial communication protocols.
  2. Parallel communication protocols.
  3. Wireless communication standards.
  4. CPU instruction sets.
Show answer

Answer: (a) Serial communication protocols.

Q138. What does the term "Kbps" stand for in the context of data transfer rates?

  1. Kilobytes per second.
  2. Megabits per second.
  3. Gigabits per second.
  4. Kilobits per second.
Show answer

Answer: (d) Kilobits per second.

Q139. What is the primary goal of pipelining in computer systems?

  1. To increase the execution speed of individual instructions.
  2. To reduce the complexity of CPU design.
  3. To eliminate the need for memory access.
  4. To improve the machine's throughput.
Show answer

Answer: (d) To improve the machine's throughput.

Q140. In pipelining, what happens when one instruction is being executed while the next instruction is fetched?

  1. Both instructions are executed simultaneously.
  2. The CPU waits for both instructions to complete.
  3. The instructions in the pipe are discarded.
  4. More than one instruction can be in the pipe at different stages of processing.
Show answer

Answer: (d) More than one instruction can be in the pipe at different stages of processing.

Q141. What is batch processing in the context of early computer systems?

  1. It involves executing multiple jobs simultaneously.
  2. It requires constant interaction with the user.
  3. It streamlines the transition between jobs.
  4. It was the only form of processing used.
Show answer

Answer: (c) It streamlines the transition between jobs.

Q142. What was one drawback of early batch processing systems?

  1. They required constant interaction with the user.
  2. Users had no interaction with their jobs once submitted.
  3. They were limited to executing one job at a time.
  4. They used wireless communication.
Show answer

Answer: (b) Users had no interaction with their jobs once submitted.

Q143. What is interactive processing in the context of operating systems?

  1. It involves executing jobs in batch mode.
  2. It allows a program to carry on a dialogue with the user during execution.
  3. It requires constant interaction with a computer operator.
  4. It is the same as batch processing.
Show answer

Answer: (b) It allows a program to carry on a dialogue with the user during execution.

Q144. What is a major challenge for operating systems in multiprocessor environments?

  1. Load balancing and scaling
  2. Graphics rendering and animation
  3. Disk fragmentation and file management
  4. Network security and data encryption
Show answer

Answer: (a) Load balancing and scaling

Q145. What do you call computer systems dedicated to specific tasks such as medical devices or cell phones?

  1. Personal computers
  2. Mainframes
  3. Embedded systems
  4. Supercomputers
Show answer

Answer: (c) Embedded systems

Q146. Which operating system was used in the Mars Exploration Rovers Spirit and Opportunity?

  1. VxWORKS
  2. Windows CE
  3. Linux
  4. macOS
Show answer

Answer: (a) VxWORKS
Note: As given in the course text.

Q147. What is the primary purpose of utility software in the system software category?

  1. Execute application programs
  2. Customize the operating system
  3. Manage the computer's hardware
  4. Handle network communication
Show answer

Answer: (b) Customize the operating system
Note: Judgment call: utility software extends or customizes what the operating system offers; this is the closest option.

Q148. In the context of operating systems, what does GUI stand for?

  1. Graphical User Interface
  2. General Utility Interface
  3. Global User Integration
  4. Generic User Input
Show answer

Answer: (a) Graphical User Interface

Q149. What is the distinction between the user interface and the internal parts of an operating system?

  1. The user interface handles hardware interactions.
  2. The internal parts manage utility software.
  3. The user interface communicates with users, while the internal parts control the system.
  4. The internal parts are responsible for file management.
Show answer

Answer: (c) The user interface communicates with users, while the internal parts control the system.

Q150. What is the role of a window manager in a graphical user interface?

  1. Allocating memory for programs
  2. Managing network communication
  3. Creating and managing windows on the screen
  4. Controlling the file system
Show answer

Answer: (c) Creating and managing windows on the screen

Q151. What is the internal part of an operating system called?

  1. User interface
  2. System software
  3. Utility software
  4. Kernel
Show answer

Answer: (d) Kernel

Q152. What is the primary function of the file manager in the kernel of an operating system?

  1. Allocating memory for programs
  2. Coordinating mass storage facilities
  3. Managing the user interface
  4. Handling network communication
Show answer

Answer: (b) Coordinating mass storage facilities

Q153. How are files often organized within an operating system for user convenience?

  1. In stacks
  2. In tables
  3. In bundles called directories or folders
  4. In registries
Show answer

Answer: (c) In bundles called directories or folders

Q154. What is a directory path?

  1. A list of file names
  2. A unique identifier for a file
  3. A chain of directories within directories
  4. A file's location in memory
Show answer

Answer: (c) A chain of directories within directories

Q155. What is the purpose of a device driver in an operating system?

  1. To execute application programs
  2. To manage the user interface
  3. To communicate with peripheral devices
  4. To allocate memory for programs
Show answer

Answer: (c) To communicate with peripheral devices

Q156. What is virtual memory in the context of an operating system?

  1. A type of flash memory
  2. A large memory space reserved for the kernel
  3. An illusion of additional memory created by paging
  4. The primary memory used by the user interface
Show answer

Answer: (c) An illusion of additional memory created by paging

Q157. What is the primary role of the scheduler in an operating system?

  1. Managing mass storage facilities
  2. Allocating memory for programs
  3. Determining which activities are considered for execution
  4. Coordinating network communication
Show answer

Answer: (c) Determining which activities are considered for execution

Q158. What procedure transfers the operating system from mass storage into main memory when a computer is turned on?

  1. Bootstrapping
  2. File management
  3. Paging
  4. Disk formatting
Show answer

Answer: (a) Bootstrapping

Q159. Why is read-only memory (ROM) used in the bootstrapping process of computers?

  1. To permanently store user data
  2. To ensure the operating system remains secure
  3. To store the boot loader for starting the operating system
  4. To provide additional memory space
Show answer

Answer: (c) To store the boot loader for starting the operating system

Q160. Why is booting from mass storage necessary for general-purpose computers?

  1. To conserve energy
  2. To ensure security
  3. To enable firmware updates
  4. To accommodate frequent operating system updates
Show answer

Answer: (d) To accommodate frequent operating system updates

Q161. Which components handle the coordination of processes in an operating system's kernel?

  1. File manager and memory manager
  2. Scheduler and dispatcher
  3. Process table and memory area
  4. Interrupt handler and timer circuit
Show answer

Answer: (b) Scheduler and dispatcher

Q162. What information is stored in the process table by the scheduler?

  1. User's name and password
  2. Process's priority and memory area
  3. Mass storage operation status
  4. Time slice duration
Show answer

Answer: (b) Process's priority and memory area

Q163. What initiates the end of a time slice in a time-sharing/multitasking system?

  1. Process completion
  2. User intervention
  3. Timer circuit generating an interrupt
  4. Dispatcher's decision
Show answer

Answer: (c) Timer circuit generating an interrupt

Q164. What is the procedure called when changing from one process to another in a time-sharing system?

  1. Process termination
  2. Process initiation
  3. Time slice completion
  4. Process switch or context switch
Show answer

Answer: (d) Process switch or context switch

Q165. Which component of the CPU is responsible for reacting to interrupt signals?

  1. Memory manager
  2. Scheduler
  3. Interrupt handler
  4. Dispatcher
Show answer

Answer: (c) Interrupt handler

Q166. What is the primary purpose of a semaphore in an operating system?

  1. Controlling access to printer devices
  2. Managing process priorities
  3. Enabling multitasking
  4. Preventing memory overflows
Show answer

Answer: (a) Controlling access to printer devices
Note: A semaphore guards a shared resource or critical region so that only one process uses it at a time (the printer is the classic example).

Q167. What is the technique called when non-sharable resources are made to appear sharable in an operating system?

  1. Spooling
  2. Multiprogramming
  3. Deadlock detection
  4. Privilege mode
Show answer

Answer: (a) Spooling

Q168. What is the role of auditing software in computer security?

  1. Allocating resources to processes
  2. Detecting unauthorized access
  3. Managing memory limits
  4. Controlling printer access
Show answer

Answer: (b) Detecting unauthorized access

Q169. What is the term for a situation in which an intruder tricks the operating system into allowing access beyond a user's privileges?

  1. Privilege escalation
  2. Memory limit override
  3. Resource allocation
  4. Deadlock
Show answer

Answer: (a) Privilege escalation

Q170. What can a single flaw in privilege level control lead to?

  1. Unauthorized access to printer devices
  2. Increased memory limits
  3. Disaster from malicious programming or errors
  4. Improved resource allocation
Show answer

Answer: (c) Disaster from malicious programming or errors

Q171. What is the primary purpose of an interrupt handler in the CPU?

  1. Allocating resources to processes
  2. Responding to external events and signals
  3. Managing printer access
  4. Controlling process priorities
Show answer

Answer: (b) Responding to external events and signals

Q172. How does the CPU handle an interrupt signal?

  1. It immediately resumes the interrupted task.
  2. It saves its position in the current process and starts executing an interrupt handler.
  3. It ignores the interrupt and continues with the current task.
  4. It terminates the current process.
Show answer

Answer: (b) It saves its position in the current process and starts executing an interrupt handler.

Q173. What are the four main classifications of computer networks?

  1. PAN, LAN, MAN, WAN
  2. Internet, Ethernet, WiFi, Bluetooth
  3. TCP/IP, CSMA/CD, CSMA/CA, IEEE
  4. Repeater, Bridge, Switch, Router
Show answer

Answer: (a) PAN, LAN, MAN, WAN

Q174. What does PAN stand for in network classification?

  1. Personal Area Network
  2. Public Access Network
  3. Private Area Network
  4. Peripheral Area Network
Show answer

Answer: (a) Personal Area Network

Q175. Which network is typically used for communications within a single building or building complex?

  1. PAN
  2. LAN
  3. MAN
  4. WAN
Show answer

Answer: (b) LAN

Q176. What does MAN stand for in network classification?

  1. Miniature Area Network
  2. Metropolitan Area Network
  3. Mobile Area Network
  4. Multipurpose Area Network
Show answer

Answer: (b) Metropolitan Area Network

Q177. Which network spans a local community?

  1. PAN
  2. LAN
  3. MAN
  4. WAN
Show answer

Answer: (c) MAN

Q178. What is the most significant difference between a LAN and a WAN?

  1. LANs are wireless, while WANs are wired.
  2. LANs cover a smaller geographic area than WANs.
  3. LANs are open networks, while WANs are closed networks.
  4. LANs use CSMA/CD, while WANs use CSMA/CA.
Show answer

Answer: (b) LANs cover a smaller geographic area than WANs.

Q179. How is the Internet classified in terms of network openness?

  1. Closed network
  2. Proprietary network
  3. Open network
  4. Private network
Show answer

Answer: (c) Open network

Q180. What collection of standards governs communication throughout the Internet?

  1. Ethernet standards
  2. IEEE standards
  3. TCP/IP protocol suite
  4. CSMA/CD protocol
Show answer

Answer: (c) TCP/IP protocol suite

Q181. What type of network design allows machines to communicate through a central access point (AP)?

  1. Bus topology
  2. Star topology
  3. Ethernet topology
  4. IEEE topology
Show answer

Answer: (b) Star topology

Q182. Which network topology was popularized in the 1990s under the Ethernet standards?

  1. Bus topology
  2. Star topology
  3. Mesh topology
  4. Ring topology
Show answer

Answer: (a) Bus topology

Q183. Which protocol controls the right to transmit messages in a bus network based on Ethernet standards?

  1. TCP/IP
  2. CSMA/CA
  3. CSMA/CD
  4. IEEE 802.11
Show answer

Answer: (c) CSMA/CD

Q184. Why is CSMA/CD not compatible with wireless star networks?

  1. It requires a central access point (AP).
  2. It cannot detect collisions in wireless networks.
  3. It uses a different addressing scheme.
  4. It is too expensive to implement wirelessly.
Show answer

Answer: (b) It cannot detect collisions in wireless networks.

Q185. Which approach to collision handling is commonly used in wireless networks?

  1. CSMA/CD
  2. CSMA/CA
  3. Ethernet standards
  4. IEEE protocols
Show answer

Answer: (b) CSMA/CA

Q186. How do routers differ from repeaters, bridges, and switches in network connectivity?

  1. Routers connect networks while maintaining their individual characteristics.
  2. Routers amplify signals between connected networks.
  3. Routers always forward all messages across connections.
  4. Routers are used primarily in star topologies.
Show answer

Answer: (a) Routers connect networks while maintaining their individual characteristics.

Q187. What is a network formed by connecting existing networks into an extended communication system called?

  1. Internet
  2. Intranet
  3. Gateway
  4. Internet of Things (IoT)
Show answer

Answer: (a) Internet
Note: Corrected: connecting networks together forms an internet. A gateway is the machine that connects a network to the rest of the Internet. The shared key said "Gateway".

Q188. What is the primary purpose of a gateway in networking?

  1. To connect devices within a single network
  2. To connect LANs to the Internet
  3. To replace routers in network connections
  4. To serve as a central access point (AP)
Show answer

Answer: (b) To connect LANs to the Internet

Q189. Which model defines the roles of processes as either clients or servers in inter-process communication?

  1. Peer-to-peer model
  2. Client/server model
  3. Ethernet model
  4. TCP/IP model
Show answer

Answer: (b) Client/server model

Q190. Which model involves processes that both provide service to and receive service from each other?

  1. Client/server model
  2. Peer-to-peer model
  3. Ethernet model
  4. WAN model
Show answer

Answer: (b) Peer-to-peer model

Q191. What term describes a system of software units that execute as processes on different computers?

  1. Intranet
  2. Extranet
  3. Distributed system
  4. Cluster computing
Show answer

Answer: (c) Distributed system

Q192. What are the organizations responsible for constructing and maintaining Internet networks called?

  1. Internet Service Users
  2. Internet Backbone Providers
  3. Internet Service Providers (ISPs)
  4. Internet Infrastructure Operators
Show answer

Answer: (c) Internet Service Providers (ISPs)

Q193. Tier-1 ISPs are primarily known for:

  1. Regional network operations
  2. Operating access networks
  3. Providing international high-speed backbone networks
  4. Managing domain name registrations
Show answer

Answer: (c) Providing international high-speed backbone networks

Q194. What is an access ISP in the context of Internet networking?

  1. An organization that provides Internet access to individual homes and businesses
  2. A specialized type of router used by ISPs
  3. A government agency responsible for Internet regulation
  4. A type of mobile phone carrier
Show answer

Answer: (a) An organization that provides Internet access to individual homes and businesses

Q195. What term describes the devices that individual users connect to access ISPs?

  1. Core systems
  2. Domain servers
  3. End systems or hosts
  4. Routers
Show answer

Answer: (c) End systems or hosts

Q196. Which technology is described as one of the fastest-growing for connecting end systems to larger networks?

  1. Dial-up connections
  2. Fiber-optic cables
  3. Wireless connections based on WiFi
  4. Satellite connections
Show answer

Answer: (c) Wireless connections based on WiFi
Note: As stated in the lecture.

Q197. What is the term for an area within the broadcast range of an access point (AP)?

  1. Broadband zone
  2. Internet hub
  3. Wireless hotspot
  4. Data center
Show answer

Answer: (c) Wireless hotspot

Q198. In the cellular telephone industry, what are hot spots called?

  1. WiFi zones
  2. Cells
  3. Routers
  4. Access points
Show answer

Answer: (b) Cells

Q199. What is the primary purpose of IP addresses in the Internet?

  1. Identifying users
  2. Providing domain names
  3. Allocating network resources
  4. Assigning unique identifying addresses to computers
Show answer

Answer: (d) Assigning unique identifying addresses to computers

Q200. Which organization allocates blocks of IP addresses to ISPs?

  1. Internet Service Providers (ISPs)
  2. Internet Corporation for Assigned Names and Numbers (ICANN)
  3. Internet Service Users (ISUs)
  4. Internet Regulatory Commission (IRC)
Show answer

Answer: (b) Internet Corporation for Assigned Names and Numbers (ICANN)

Q201. How are IP addresses traditionally represented in dotted decimal notation?

  1. In binary format
  2. In hexadecimal format
  3. In base 10 format
  4. In octal format
Show answer

Answer: (c) In base 10 format

Q202. What is the purpose of the domain name system (DNS) in the Internet?

  1. To encrypt Internet traffic
  2. To allocate IP addresses
  3. To translate mnemonic domain names to IP addresses
  4. To regulate Internet content
Show answer

Answer: (c) To translate mnemonic domain names to IP addresses

Q203. Which organization is responsible for domain name registration and the allocation of mnemonic domain names?

  1. Internet Service Providers (ISPs)
  2. Internet Corporation for Assigned Names and Numbers (ICANN)
  3. Domain Hosting Companies (DHCs)
  4. Domain Servers (DSs)
Show answer

Answer: (b) Internet Corporation for Assigned Names and Numbers (ICANN)
Note: As given in the lecture. In practice ICANN delegates registration to accredited registrars.

Q204. What are top-level domains (TLDs) used for in domain names?

  1. Indicating the location of the domain
  2. Categorizing the type of organization
  3. Determining the domain's age
  4. Identifying the domain's owner
Show answer

Answer: (b) Categorizing the type of organization

Q205. What does the term "subdomain" refer to in the context of domain names?

  1. A domain name with multiple periods
  2. A specialized domain for mobile devices
  3. An extension of the primary domain
  4. A secondary top-level domain
Show answer

Answer: (c) An extension of the primary domain

Q206. How are messages transferred over the Internet?

  1. Using mnemonic addresses
  2. Using domain names
  3. Using IP addresses
  4. Using top-level domains
Show answer

Answer: (c) Using IP addresses

Q207. What is the primary function of name servers in the domain name system (DNS)?

  1. To register domain names
  2. To provide address translation services
  3. To host websites
  4. To manage TLDs
Show answer

Answer: (b) To provide address translation services

Q208. What is the primary purpose of an analog telephone adapter in VoIP?

  1. To connect traditional telephones to digital networks
  2. To replace traditional telephones with VoIP phones
  3. To provide voice communication similar to traditional telephones
  4. To manage domain name registrations
Show answer

Answer: (a) To connect traditional telephones to digital networks

Q209. Which form of VoIP involves using smartphones as broadband-connected hosts on the Internet?

  1. VoIP soft phones
  2. Analog telephone adapters
  3. Embedded VoIP phones
  4. Wireless VoIP technology
Show answer

Answer: (d) Wireless VoIP technology

Q210. What is the purpose of enclosing a word in anchor tags (<a> and </a>) in HTML?

  1. To change the font style of the word
  2. To create a hyperlink to another webpage
  3. To highlight the word in color
  4. To make the word bold
Show answer

Answer: (b) To create a hyperlink to another webpage

Q211. What is the function of the href parameter within anchor tags in HTML?

  1. It changes the text color of the enclosed word.
  2. It specifies the font size of the enclosed word.
  3. It defines the URL of the linked webpage.
  4. It sets the background color of the enclosed word.
Show answer

Answer: (c) It defines the URL of the linked webpage.

Q212. In the HTML code for including an image, what does the "src" attribute specify?

  1. The image's width in pixels
  2. The image's file format (e.g., JPEG)
  3. The source code of the webpage
  4. The URL of the image file
Show answer

Answer: (d) The URL of the image file

Q213. If you want to display an image at the top of an HTML page, where should you insert the <img> tag?

  1. Immediately after the </head> tag
  2. Just before the </body> tag
  3. At the beginning of the <body> tag
  4. At the end of the <body> tag
Show answer

Answer: (c) At the beginning of the <body> tag

Q214. What is XML used for?

  1. To define the appearance of data
  2. To store binary data efficiently
  3. To represent data in a readable format
  4. To create markup languages for data representation
Show answer

Answer: (d) To create markup languages for data representation

Q215. Which markup language is based on the XML standard and is used for representing web pages?

  1. SGML
  2. XHTML
  3. HTML5
  4. XML2HTML
Show answer

Answer: (b) XHTML

Q216. What does the XML standard primarily emphasize in the design of markup languages?

  1. Data compression
  2. Data encryption
  3. Data semantics
  4. Data visualization
Show answer

Answer: (c) Data semantics

Q217. How many layers does the layered approach to Internet software have?

  1. Two layers
  2. Three layers
  3. Four layers
  4. Five layers
Show answer

Answer: (c) Four layers
Note: Application, transport, network and link layers.

Q218. What is the primary function of the transport layer in the layered approach to Internet software?

  1. Handling physical connections to the network
  2. Managing data transmission between devices
  3. Formatting data for display in web browsers
  4. Creating hyperlinks between webpages
Show answer

Answer: (b) Managing data transmission between devices

Q219. When an HTML page contains a hyperlink, what does clicking on the link typically do?

  1. Changes the font style of the text
  2. Highlights the text in color
  3. Retrieves and displays another webpage
  4. Makes the text bold
Show answer

Answer: (c) Retrieves and displays another webpage

Q220. Which HTML tag is used to display images on a webpage?

  1. <img>
  2. <image>
  3. <picture>
  4. <graphics>
Show answer

Answer: (a) <img>

Q221. How does the transport layer help ensure the proper transmission of messages over the Internet?

  1. By translating human-readable addresses into IP addresses
  2. By dividing messages into small segments
  3. By adding sequence numbers to message segments
  4. By routing packets to their final destinations
Show answer

Answer: (c) By adding sequence numbers to message segments

Q222. What is the primary role of the network layer in Internet communication?

  1. Dividing messages into segments
  2. Adding sequence numbers to message segments
  3. Deciding the direction of packet forwarding
  4. Transmitting individual packets
Show answer

Answer: (c) Deciding the direction of packet forwarding

Q223. How does the link layer contribute to the transmission of packets in the Internet?

  1. By routing packets to their final destinations
  2. By adding sequence numbers to message segments
  3. By dealing with communication details specific to the network
  4. By extracting message segments from packets
Show answer

Answer: (c) By dealing with communication details specific to the network

Q224. What is the purpose of assigning unique port numbers in Internet communication?

  1. To translate mnemonic addresses to IP addresses
  2. To divide long messages into segments
  3. To determine the direction of packet forwarding
  4. To specify which unit within the application layer should receive a message
Show answer

Answer: (d) To specify which unit within the application layer should receive a message

Q225. Which protocol is commonly used for DNS lookups and VoIP because of its efficiency?

  1. SMTP
  2. HTTP
  3. UDP
  4. TCP
Show answer

Answer: (c) UDP

Q226. What is the primary task of IP (Internet Protocol) in the network layer?

  1. Dividing messages into segments
  2. Translating mnemonic addresses to IP addresses
  3. Routing packets through the Internet
  4. Adding sequence numbers to message segments
Show answer

Answer: (c) Routing packets through the Internet

Q227. What does the hop count value in an IP packet determine?

  1. The number of packets transmitted simultaneously
  2. The number of routers in the Internet
  3. The number of times a packet can be forwarded
  4. The time it takes for a packet to reach its destination
Show answer

Answer: (c) The number of times a packet can be forwarded

Q228. What is the role of a proxy server in a network environment?

  1. It forwards messages between clients and servers.
  2. It communicates directly with servers to gather information.
  3. It acts as an intermediary between clients and servers to protect client information.
  4. It monitors the activities of firewalls within the network.
Show answer

Answer: (c) It acts as an intermediary between clients and servers to protect client information.

Q229. What is the role of antivirus software in network security?

  1. To forward packets between routers
  2. To provide a secure connection to the Internet
  3. To detect and remove known viruses and infections
  4. To act as a proxy server for client-server communication
Show answer

Answer: (c) To detect and remove known viruses and infections

Q230. How does a digital signature contribute to message authentication?

  1. It encrypts the entire message for security.
  2. It adds a unique port number to the message.
  3. It indicates the sender's identity and authenticity.
  4. It decrypts the message to verify its contents.
Show answer

Answer: (c) It indicates the sender's identity and authenticity.

Q231. What is the primary goal of a certificate authority in network security?

  1. To maintain a network's forwarding table
  2. To prevent unauthorized access to a network
  3. To authenticate the identity of network users
  4. To update antivirus software on network devices
Show answer

Answer: (c) To authenticate the identity of network users

Q232. Which of the following is a primary characteristic of an algorithm?

  1. The inclusion of parallel processing steps
  2. The ability to execute ambiguous steps
  3. The provision of well-established sequence
  4. The use of unambiguous, executable steps
Show answer

Answer: (d) The use of unambiguous, executable steps

Q233. Which layer of the layered approach to Internet software deals with directing the segments through the Internet?

  1. Application layer
  2. Transport layer
  3. Network layer
  4. Link layer
Show answer

Answer: (c) Network layer

Q234. What is the primary responsibility of the transport layer in Internet communication?

  1. Routing packets through the Internet
  2. Translating human-readable addresses into IP addresses
  3. Dividing long messages into segments
  4. Ensuring proper formatting of messages
Show answer

Answer: (c) Dividing long messages into segments

Q235. What problem does a sequential search algorithm solve?

  1. Sorting names alphabetically
  2. Finding a specific target value in a list
  3. Iterative loop control
  4. Repetitive algorithm design
Show answer

Answer: (b) Finding a specific target value in a list

Q236. When a sequential search through an alphabetically sorted list reaches an entry greater than the target, what happens?

  1. The search terminates as a success.
  2. The search continues.
  3. The search terminates as a failure.
  4. The search resets to the beginning of the list.
Show answer

Answer: (c) The search terminates as a failure.

Q237. What is the purpose of the check "if (List is empty)" in the sequential search pseudocode?

  1. To check if the list is sorted
  2. To declare a search success
  3. To check if the list is not empty
  4. To handle the case where the list contains no entries
Show answer

Answer: (d) To handle the case where the list contains no entries

Q238. What is the termination condition of the loop "while (the pH level is greater than 4): add a drop of sulfuric acid"?

  1. pH level is less than or equal to 4
  2. pH level is greater than 4
  3. pH level is equal to 4
  4. pH level is not mentioned
Show answer

Answer: (a) pH level is less than or equal to 4

Q239. What does the statement "i = i + 1;" do?

  1. Adds 1 to the value of "i"
  2. Multiplies "i" by 1
  3. Sets "i" to 1
  4. Subtracts 1 from the value of "i"
Show answer

Answer: (a) Adds 1 to the value of "i"

Q240. What is a pretest loop in the context of iterative structures?

  1. A loop that tests a condition after executing the loop body
  2. A loop that does not involve any testing
  3. A loop that tests a condition before executing the loop body
  4. A loop that tests multiple conditions simultaneously
Show answer

Answer: (c) A loop that tests a condition before executing the loop body

Q241. What is a posttest loop in the context of iterative structures?

  1. A loop that tests a condition before executing the loop body
  2. A loop that tests a condition after executing the loop body
Show answer

Answer: (b) A loop that tests a condition after executing the loop body

Q242. What is the value computed by the FindFactorial function when n = 5?

  1. 1
  2. 2
  3. 6
  4. 120
Show answer

Answer: (d) 120

Q243. In the FindFactorial loop "while (i <= n)", when does the loop terminate?

  1. The loop will run indefinitely
  2. The loop will terminate when i becomes equal to n
  3. The loop will run only once
  4. The loop will terminate when i is greater than n
Show answer

Answer: (d) The loop will terminate when i is greater than n
Note: Corrected: the loop keeps running while i <= n and stops as soon as i becomes greater than n. The shared key ("when i equals n") is wrong, because the case i = n is still executed.

Q244. When searching a dictionary quickly, which approach does binary search follow?

  1. Start at the beginning of the dictionary.
  2. Open to a random page.
  3. Begin with the middle entry.
  4. Randomly pick entries.
Show answer

Answer: (c) Begin with the middle entry.

Q245. What is the primary purpose of the initialization phase in loop (repetitive) control?

  1. To test for termination
  2. To create new activations
  3. To narrow down the search
  4. To establish a starting condition
Show answer

Answer: (d) To establish a starting condition

Q246. Which algorithm would be more efficient for searching a list of 30,000 entries?

  1. Sequential search
  2. Binary search
  3. Both are equally efficient
  4. Neither is efficient
Show answer

Answer: (b) Binary search

Q247. How does the binary search algorithm restrict the number of entries to consider after each step?

  1. It halves the number of entries.
  2. It reduces the entries by one.
  3. It always searches the entire list.
  4. It depends on the target value.
Show answer

Answer: (a) It halves the number of entries.

Q248. What does "log2 n" represent in algorithm analysis?

  1. The base two logarithm of n
  2. The number of iterations in a loop
  3. The number of recursive calls
  4. The total time required for execution
Show answer

Answer: (a) The base two logarithm of n

Q249. What is the significance of "algorithm analysis" in computer science?

  1. Evaluating the correctness of algorithms
  2. Comparing hardware specifications
  3. Evaluating the efficiency of algorithms
  4. Analyzing computer program syntax
Show answer

Answer: (c) Evaluating the efficiency of algorithms

Q250. Which phase of problem solving involves evaluating the solution for accuracy and for its potential as a tool for solving other problems?

  1. The first phase
  2. The second phase
  3. The third phase
  4. The fourth phase
Show answer

Answer: (d) The fourth phase
Note: Polya's phases: understand the problem, devise a plan, carry out the plan, evaluate the solution.

Q251. In the problem of cutting a chain of links, how many cuts are required to solve it optimally?

  1. Three cuts
  2. Two cuts
  3. One cut
  4. Four cuts
Show answer

Answer: (c) One cut

Q252. In algorithm analysis, what does the "worst-case scenario" refer to?

  1. The best possible outcome
  2. The average performance
  3. The most efficient solution
  4. The most challenging situation
Show answer

Answer: (d) The most challenging situation

Q253. What is the primary goal of algorithm analysis for algorithms that search lists?

  1. To analyze specific lists of fixed lengths
  2. To determine the fastest algorithm
  3. To identify a formula indicating algorithm performance for arbitrary list lengths
  4. To evaluate the performance of different hardware configurations
Show answer

Answer: (c) To identify a formula indicating algorithm performance for arbitrary list lengths

Q254. What key distinction is emphasized regarding software verification?

  1. The need for machine-independent programming languages
  2. The difference between software believed to be correct and software that is correct
  3. The importance of security in software development
  4. The use of assembly languages in software verification
Show answer

Answer: (b) The difference between software believed to be correct and software that is correct

Q255. What was the root cause of the Therac-25 X-ray radiation incidents?

  1. Security breach
  2. Hardware failure
  3. Technical issue with software
  4. Environmental factors
Show answer

Answer: (c) Technical issue with software
Note: The Therac-25 overdoses (1985-87) were traced to flaws in the machine's control software.

Q256. In the context of programming languages, what is an assembler used for?

  1. Executing high-level code
  2. Debugging machine code
  3. Converting mnemonic expressions to machine language
  4. Writing machine-independent code
Show answer

Answer: (c) Converting mnemonic expressions to machine language

Q257. What characterizes the third generation of programming languages?

  1. They are machine-dependent and use assembly language.
  2. They are machine-independent and use natural language.
  3. They are higher-level and machine-independent.
  4. They are lower-level and machine-dependent.
Show answer

Answer: (c) They are higher-level and machine-independent.

Q258. Which programming languages are examples of third-generation languages?

  1. Assembly and FORTRAN
  2. COBOL and machine language
  3. FORTRAN and COBOL
  4. FORTRAN and HLT
Show answer

Answer: (c) FORTRAN and COBOL

Q259. What term is used for programs that translate high-level primitives into machine-language programs?

  1. Compilers
  2. Assemblers
  3. Interpreters
  4. Translators
Show answer

Answer: (a) Compilers

Q260. In the declarative paradigm, what is the programmer's main task?

  1. Developing precise algorithms
  2. Translating machine code into high-level code
  3. Describing the problem to be solved
  4. Debugging code
Show answer

Answer: (c) Describing the problem to be solved

Q261. Which programming paradigm builds solutions through a sequence of commands?

  1. Functional
  2. Object-oriented
  3. Imperative
  4. Declarative
Show answer

Answer: (c) Imperative

Q262. What are small variations of a programming language that are not part of the standard version called?

  1. Language extensions
  2. Compiler enhancements
  3. Syntax modifications
  4. Standard deviations
Show answer

Answer: (a) Language extensions

Q263. What term describes the result of minor modifications to a programming language that make it incompatible with other compilers?

  1. Dialect
  2. Syntax error
  3. Compiler extension
  4. Standardization
Show answer

Answer: (a) Dialect

Part 2: Subjective Questions

Q1. What is the difference between computer hardware and computer software, and how do they contribute to Computer Science?

Hardware means the physical, tangible parts of a computer system that you can touch: the case, monitor, keyboard, mouse, hard disk, motherboard and so on.

Software means the programs, that is, the instructions (and their documentation) that tell the hardware how to perform tasks. It includes application software (word processors, browsers) and system software such as the operating system.

Contribution: hardware provides the physical platform that stores and processes data, while software provides the functionality and the step-by-step instructions. Neither is useful without the other, and together they form the foundation of Computer Science.

Q2. How does Computer Science apply to various industries, and why is it considered essential in today's job market?

Computer Science is used in almost every industry: telecom (networks, billing), banking (online banking, ATMs, transaction processing, security), hospitals (patient records, medical imaging), education, business, government and, of course, the software industry itself. In each of them it improves efficiency, automates routine processes, manages data and makes new services possible.

It is essential in the job market because every one of these sectors needs people who can develop and maintain software, manage data and networks, keep systems secure and innovate with new technology. According to the lecture, a large share of the job opportunities in Pakistan and abroad are in this field, and software developers are among the most in-demand professionals.

Q3. Why is it important for people from other fields of study, not just Computer Science students, to have a basic understanding of Computer Science?

Computing is now part of almost every profession, so basic Computer Science knowledge has become a form of general literacy. It helps people use technology to do their own work better, solve problems and communicate.

  • Business: data analysis, spreadsheets, e-commerce and databases
  • Engineering: programming embedded systems, simulation and design software
  • Sciences and medicine: computational modelling, analysing experimental data
  • Any field: working with the Internet, understanding security and privacy, and talking to technical teams

In short, it supports problem solving and innovation in nearly every career.

Q4. What are the two primary learning strategies mentioned in Module 2, and how do they differ?

The two strategies are Breadth First Learning and Depth First Learning.

  • Breadth First Learning: gives a basic introduction to almost all courses of Computer Science first, so the student sees the overall scope of the degree program. This is the approach followed in this course.
  • Depth First Learning: covers one course in full detail before moving on to the next one.

The difference lies in the order in which the material is covered and the level of detail given at each step.

Q5. What does Breadth First Learning aim to achieve in Computer Science education?

Breadth First Learning aims to show students what they will be learning throughout the entire degree. It gives an abstract view of all the major Computer Science courses, explains what each course is about, shows why each one is important and so builds the bigger picture of the field before the details are studied.

Q6. What topics are covered in the introductory course (CS101) described in Module 2?

As listed in the course introduction, the course covers:

  • Search engine usage techniques
  • History of computing, data storage and data manipulation
  • Operating systems, networking and the Internet
  • Algorithms and programming languages (basics of C++)
  • Software engineering
  • Data abstraction (arrays, stacks, queues, trees)
  • Database systems and artificial intelligence
  • Impact of Computer Science on society: content filtering, spam, international laws
  • Word processing, presentation development and spreadsheets (Microsoft Excel)
  • Database (MS Access) and web page development

Q7. Why does the course focus on Google as the search engine?

Because Google is the most widely used search engine and holds the largest share of the market for Internet searches, so the techniques learned on it are the most useful for students.

Q8. How does Google decide which pages are relevant to a search?

Google looks for web pages that contain all the terms given in the search query, and then lists the pages that match, ranked by relevance. That is why adding more useful keywords narrows the results.

Q9. What is the purpose of searching for "Weather Lahore" in Google?

Typing a query such as weather Lahore makes Google show the current weather conditions and the forecast for Lahore directly at the top of the results, so the user gets the information quickly without opening any website.

Q10. How can Google be used to perform mathematical calculations?

Simply type the calculation into the search box. Google recognises it and shows its built-in calculator with the answer. For example, typing 12*391 displays the result 4692.

Q11. What is the significance of writing "pkr" in front of a number in a Google search?

It tells Google that the number is a price in Pakistani Rupees, so the results are narrowed to products or services around that price, for example laptop pkr 50000.

Note: Google's own help documents this technique with the dollar sign (camera $400). The use of a currency code such as "pkr" is the lecture's version of the same idea, so write it the way your lecture does in the exam.

Q12. Does Google distinguish between capital and small letters in a search?

No. Google is case-insensitive: a search for COMPUTER SCIENCE gives the same results as computer science.

Q13. What does the "@" symbol do when it is used in a Google search?

Putting @ in front of a word makes Google search for that query on a social media platform. For example, Fifa World Cup @facebook looks for information about the FIFA World Cup on Facebook.

Q14. How did the abacus work as an early computing device, and where did it originate?

The abacus is one of the earliest known computing devices. It is a rectangular frame holding rods on which beads can slide. Each rod stands for a place value (ones, tens, hundreds and so on), and the position of the beads on a rod stands for a digit. By moving beads, the user can perform addition and subtraction directly, and multiplication and division by repeated steps.

Its exact origin is uncertain. Most course material connects it with ancient China, where the abacus became a very common calculating tool, and historians also trace early forms to Mesopotamia. Similar devices were used in Greek and Roman civilizations.

Q15. How did Herman Hollerith contribute to computing through punched cards?

Hollerith applied the idea of representing information as holes punched in paper cards, with each hole position standing for a piece of data. He used it to speed up the tabulation of the 1890 U.S. census, which was processed far faster than by hand.

His Tabulating Machine Company later became part of the company known today as IBM. Punched cards remained a popular way to store data and to communicate with computers until the 1970s.

Q16. What barrier was overcome in the move from mechanical-driven machines to electronics-driven machines?

Early machines by Pascal, Leibniz and Babbage were built from gears. The barrier was cost and practicality: nineteenth-century technology could not produce such complex gear-driven machines economically.

With advances in electronics in the early 1900s, machines based on electronically controlled mechanical relays became possible, such as George Stibitz's machine and the Mark I designed by Howard Aiken and IBM engineers. These were cheaper and more efficient, which opened the way to fully electronic computers.

Q17. What are Boolean operations, and why are they significant in Computer Science?

Boolean operations are named after the mathematician George Boole. They work on true/false values, where bit 1 stands for true and bit 0 for false. The basic operations are AND, OR, XOR (exclusive OR) and NOT.

They matter because computers handle binary data, and these operations are the basis of logical decision making, of manipulating bit patterns and of the logic gates that make up computer circuits.

Q18. Why is hexadecimal notation used in computer systems?

Bit patterns in a machine are long and hard for humans to read and write. Their lengths are usually multiples of four, so hexadecimal notation uses one symbol (0-9, A-F) for each group of four bits. For example, 1010 1111 is written as AF. This shortens the pattern and makes binary data easier to read, write and remember.

Q19. What is the purpose of a computer's main memory?

Main memory stores the data and programs that the CPU is currently working on, in binary form. It is built from circuits such as flip-flops, each able to hold one bit, and the bits are organised into cells (usually bytes), each with its own address.

It is called RAM (Random Access Memory) because any cell can be reached independently of the others, which allows quick retrieval and change of data. RAM is volatile: its contents are lost when the power is switched off.

Q20. How does zoned-bit recording work in mass storage systems?

On a magnetic disk, outer tracks are longer than inner ones. In zoned-bit recording, adjacent tracks are grouped into zones, and every track within a zone has the same number of sectors. Outer zones have more sectors per track than inner zones.

This lets the disk use its surface efficiently, because the storage density stays about the same across the disk, which gives more capacity than using the same number of sectors on every track.

Q21. What is the advantage of optical systems such as CDs for data storage?

A CD stores data on a single track in the form of a spiral, and a laser reads it by detecting irregularities on the reflective surface. This makes optical disks well suited to long continuous strings of data, such as music.

The drawback is that data cannot be reached individually as quickly as on a magnetic disk, so random access is slower.

Q22. How many bits does ASCII use for each character, and how many bits are needed to store the text "Virtual University"?

ASCII is a 7-bit code (128 symbols), and each character is normally stored in one 8-bit byte (the extra bit is a leading 0).

"Virtual University" has 18 characters (Virtual = 7, the space = 1, University = 10), so it needs 18 x 8 = 144 bits = 18 bytes.

Q23. What is the limitation of ASCII, and which organization introduced extensions to address it?

ASCII can represent only 128 different characters, which is not enough for the symbols of many languages. The International Organization for Standardization (ISO) introduced extensions, using 8-bit patterns (256 symbols), to cover the symbols of Western languages.

Q24. How does Unicode differ from ASCII, and what is the significance of its 21-bit patterns?

Unicode is an internationalized coding system that gives every character a unique pattern of up to 21 bits. This allows more than two million different patterns, enough for the characters of the world's languages, including Chinese, Japanese and Hebrew, whereas ASCII is limited to 128 characters (mainly English).

Q25. What is the advantage of MIDI for representing sound, and how does it differ from traditional sound encoding?

MIDI (Musical Instrument Digital Interface) encodes directions for producing the music (which instrument, which note, how long) instead of recording the sound wave itself. It is like the sheet music a performer reads rather than the recorded performance.

Advantages: files are much smaller, so it is efficient for storage and transmission. Traditional methods store the actual sampled audio, which needs far more space. (The sound produced does depend on the synthesizer playing the MIDI data.)

Q26. What is the purpose of the radix point in binary representation, and how is it used in floating-point notation?

The radix point plays the same role in binary as the decimal point in decimal numbers: it separates the whole-number part of a value from its fractional part.

In floating-point notation a value is stored in three fields: the sign bit, the exponent field and the mantissa field. The mantissa holds the significant bits of the value, and the exponent tells where the radix point has to be placed, which lets fractional values be represented.

Q27. How does two's complement notation represent negative integers, and what is the role of the sign bit?

Two's complement counts backwards from zero: with 4 bits, 0000 = 0, 1111 = -1, 1110 = -2, and so on down to 1000 = -8. Positive values run from 0001 = 1 up to 0111 = 7.

The leftmost bit is the sign bit: 0 means the value is zero or positive and 1 means negative. To negate a number, copy the bits from the right up to and including the first 1, then flip all the remaining bits (0101 = 5 becomes 1011 = -5).

Q28. What is the problem of overflow in two's complement notation, and how can it be handled?

Overflow occurs when the result of an arithmetic operation is outside the range that the available bits can represent, so the stored result is wrong. Example with 4 bits: 0101 (5) + 0100 (4) = 1001, which is read as -7 instead of 9.

It can be handled by using longer bit patterns (for example 32 bits instead of 16), and if the problem still occurs, by working in different units (for example kilometers instead of meters) so the numbers stay small enough to fit.

Q29. What is the normalized form in floating-point notation, and why is it important?

In normalized form the mantissa starts with the leftmost 1 of the value's binary pattern, so the radix point sits immediately to the left of a 1. Because of this rule, every value has only one representation, which removes ambiguity and makes comparison of numbers simple. All nonzero values have a mantissa that starts with 1.

Q30. How can subtraction be performed with addition in two's complement notation?

A subtraction a - b is carried out as a + (-b): the second number is negated (flip the bits and add 1) and then added to the first by the ordinary addition circuit. Any carry out of the leftmost bit is discarded.

Example (4 bits): 7 - 5 = 0111 + 1011 (which is -5) = 1 0010. Dropping the carry leaves 0010 = 2. This is why computers need only an adder and a negation circuit and no separate subtraction circuit.

Q31. What is a truncation error in floating-point notation, and how does it occur?

A truncation error is a loss of precision that occurs when a value needs more bits than the mantissa field can hold, so the extra low-order bits are cut off.

Example: with a one-byte floating-point format (1 sign bit, 3 exponent bits, 4 mantissa bits), the value 2 5/8 is 10.101 in binary. Its pattern 10101 needs five bits but only four fit, so the last 1 (which stands for 1/8) is lost and the stored value becomes 2 1/2.

Q32. How can truncation errors be reduced?

By using a longer mantissa field, which gives more bits for the fractional part. Modern computers use much longer formats (for example 32-bit single precision with a 23-bit fraction and 64-bit double precision with a 52-bit fraction). A longer exponent field is usually used along with it to widen the range of values.

Q33. What is a nonterminating expansion, how does it differ between binary and decimal, and how does it relate to truncation errors?

A nonterminating expansion is a value that cannot be written with a finite number of digits in a given base (for example 1/3 in decimal). More values are nonterminating in binary than in decimal: anything that terminates in binary also terminates in decimal, but not the other way round. For instance 1/10 terminates in decimal (0.1) but is nonterminating in binary.

Since a computer can store only a limited number of bits, such values are always truncated. For example, a dime (1/10 of a dollar) cannot be stored exactly in floating point. The solution is to work in units such as pennies, so that all values are integers and can be stored exactly in two's complement.

Q34. How does the order of adding small quantities affect accuracy in floating-point notation?

To limit truncation errors, add the smallest quantities first and the larger ones later.

Example: adding 1/8 + 1/8 first gives 1/4, and 2 1/2 + 1/4 = 2 3/4, which is stored exactly. If we add 2 1/2 + 1/8 first, the 1/8 is lost by truncation, and when the second 1/8 is added it is lost again, so the result is only 2 1/2.

Q35. What are the three main components of a CPU?

  • Arithmetic/Logic Unit (ALU): performs arithmetic and logical operations on data
  • Control Unit: coordinates the machine's activity by fetching and decoding instructions and directing the other parts
  • Register Unit: a set of registers (general-purpose and special-purpose) used as fast temporary storage inside the CPU

Q36. How does the CPU perform operations on data stored in main memory?

The control unit first transfers the data from main memory into general-purpose registers inside the CPU. It then activates the proper circuitry of the arithmetic/logic unit, telling it which registers hold the operands and which register must receive the result. The result can then be stored back into main memory.

Q37. What are the two major philosophies of CPU architecture, and how do they differ?

RISC (Reduced Instruction Set Computer) uses a small set of simple machine instructions, which makes the CPU fast and efficient. CISC (Complex Instruction Set Computer) provides a large number of complex instructions to handle the complexity of modern software with fewer instructions per program. Intel's x86 processors are CISC, and ARM processors are a well-known RISC design.

Q38. How are machine instructions categorized, and what is the purpose of the data transfer group?

Machine instructions fall into three groups: data transfer, arithmetic/logic and control.

The data transfer group requests the movement or copying of data from one location to another, for example between memory and registers (LOAD and STORE) and between the CPU and input/output devices.

Q39. How is a machine instruction fetched from main memory to the CPU, and what decides the order of execution?

The control unit fetches the instruction from main memory over the bus, decodes it and executes it (the fetch, decode, execute cycle). The order is decided by the program counter, a register that holds the address of the next instruction. After each fetch it moves on to the following instruction, so instructions run in the order they are stored unless a JUMP instruction changes the program counter.

Q40. How is the AND operation used in data manipulation, and what is masking?

AND is often used to place 0s in one part of a bit pattern without disturbing the rest. One operand, called the mask, decides which part of the other operand is kept: where the mask has 1 the bit is preserved and where the mask has 0 the bit becomes 0.

Example: ANDing a byte with the mask 00100000 gives a result of all 0s if and only if the third bit from the left of the byte is 0. Masking therefore lets a program test or clear selected bits.

Q41. What is the purpose of rotate and shift operations, and how are they classified?

They move the bits of a register to the left or right and are often used to solve alignment problems. They are classified by the direction of movement (left or right) and by whether the movement is circular.

  • Rotate (circular shift): bits that fall off one end re-enter at the other end
  • Logical shift: bits that fall off the edge are discarded and the vacated place is filled with 0
  • Arithmetic shift: like a shift but the sign bit is preserved, so it works for two's complement numbers

Shifting left or right by one place multiplies or divides a value by two (shifting by n places, by 2n).

Q42. What is the role of a controller in a computer system?

A controller is an intermediary device that handles communication between the computer and a peripheral device. It can be a circuit board plugged into the machine or be permanently mounted on the motherboard, and it connects to the peripheral through a cable or port.

It translates messages and data back and forth between the form used inside the computer and the form used by the peripheral, so the two stay compatible.

Q43. Why is the development of standards such as USB and FireWire significant for controllers?

These standards allow one controller to serve many different devices, so a new controller does not have to be bought for each new peripheral. For example, one USB controller can handle mice, printers, scanners, storage devices, digital cameras and smartphones. This makes connecting devices simpler and more flexible.

Q44. How does direct memory access (DMA) benefit performance, and what challenge does it create?

Benefit: with DMA, a controller can read from or write to main memory by itself, during times when the CPU is not using it. While the controller reads a block of data from a disk and moves it into memory, the CPU can carry on with other tasks, so CPU time is not wasted on slow transfers.

Challenge: the CPU and the controllers must share the same bus and main memory, so they compete for access. This congestion contributes to what is called the von Neumann bottleneck, and the coordination is complicated.

Q45. What are the two types of communication paths between computing devices, and how do they differ?

  • Parallel communication: several signals are sent at the same time, each on its own line. It gives a high transfer rate over short distances, such as inside a computer.
  • Serial communication: bits are sent one after another over a single path. The wiring is simpler and it suits longer connections, and modern serial standards such as USB and FireWire are very fast.

The choice depends on the speed required, distance and system design.

Q46. How does the operating system coordinate the execution of application software, utility software and itself?

By managing processes. Every program that is to be executed is treated as a process. The operating system allocates CPU time, memory and other resources to the processes, so they run in a scheduled, time-shared manner and seem to run at once. It makes sure the processes do not interfere with each other and provides ways for them to communicate and synchronize when they need to.

Q47. What is the difference between a program and a process?

A program is a static set of instructions (code and data) stored on disk. A process is the dynamic activity of executing that program, which exists once the program is loaded into memory and run by the operating system. A process includes the code, the data and the current state of execution, such as the register values and the memory cells in use.

Q48. What is meant by "process state" in an operating system?

The process state is a snapshot of a process at a particular moment: the value of the program counter, the values of other CPU registers and the contents of its memory cells. The operating system saves it when a process is interrupted and restores it later, so that the process can continue exactly where it stopped.

Q49. Why is booting (bootstrapping) necessary?

When a computer is switched on, its main memory (RAM) is volatile and empty, so there is no operating system in it. The CPU therefore starts executing a small bootstrap program stored in nonvolatile memory (ROM). This program loads the operating system from mass storage (such as the hard disk) into main memory and hands control to it. Without booting, the operating system could not start managing the machine.

Q50. How do the scheduler and the dispatcher work together in the operating system's kernel?

Both are part of the kernel. The scheduler keeps track of the processes: it adds new processes to the pool, removes the completed ones and maintains the process table. The dispatcher controls the execution of the scheduled processes: it gives each one a time slice and uses an interrupt to end the slice and switch to the next process.

Q51. What is the role of the process table, and what does it contain?

The process table is a block of information in main memory kept by the scheduler. It has an entry for each process containing the memory area assigned to it, its priority and whether it is ready or waiting for an external event.

Q52. How is mutual exclusion related to semaphores?

Mutual exclusion means that only one process at a time may execute a critical region (a part of a program that uses a shared resource). A semaphore is a flag that guards the critical region. A process must test and set the semaphore before it enters the region, and clear it when it leaves, so only one process can be inside at a time. The test-and-set has to be done as one indivisible operation.

Q53. What three conditions must hold for a deadlock to occur, and how can deadlock be handled?

A deadlock needs all three of these conditions:

  • There is competition for non-sharable resources
  • Resources are requested on a partial basis, that is, a process holds some resources while waiting for others
  • Once allocated, resources cannot be forcibly retrieved

Deadlock can be handled by detection and correction (for example, detecting it and killing or rolling back a process) or by avoidance, which removes one of the conditions: for example, requiring all resources to be requested at once or making non-sharable resources sharable.

Q54. How are computer networks classified by size and coverage, and what are their typical uses?

  • PAN (Personal Area Network): very short range, such as a wireless headset connected to a smartphone
  • LAN (Local Area Network): computers in a single building or complex, such as a university campus
  • MAN (Metropolitan Area Network): covers a local community or city
  • WAN (Wide Area Network): connects machines over greater distances, across cities or continents

Q55. What distinguishes an open network from a closed (proprietary) network, and what is the implication for network development?

An open network is based on designs in the public domain, so anyone can use it without fees or licensing. A closed (proprietary) network is controlled by a particular entity, such as a company, which may charge licensing fees and impose restrictions.

Implication: open networks tend to become popular and widely adopted because anyone can use and improve them (the Internet is an example), while proprietary networks may earn income for their owner but have a smaller reach.

Q56. What is the difference between the bus and star network topologies? Give an example of each.

In a bus topology all machines are connected to a common communication line, the bus. Ethernet is the well-known example, popularized in the 1990s. In a star topology one central machine is connected to all the others, and all communication passes through it. Wireless networks, where the central machine is the access point, are the common example.

Q57. How does CSMA/CD work in a bus network, and why is it not suitable for wireless star networks?

Carrier Sense, Multiple Access with Collision Detection (CSMA/CD): each machine listens to the bus, and transmits only when it is silent. If two machines start at the same time, they detect the collision, stop, wait for a random period and try again.

It does not suit wireless star networks because a machine cannot always hear the transmissions of others (they may be out of range or interfere), so collisions cannot be detected reliably. Wireless networks therefore use CSMA/CA (Collision Avoidance), in which transmissions are coordinated through the access point to avoid collisions in the first place.

Q58. What is the fundamental difference between the imperative and declarative programming paradigms?

In the imperative paradigm the programmer writes the algorithm: a sequence of commands that manipulate data to produce the desired result. In the declarative paradigm the programmer only describes the problem to be solved, and the system applies pre-established, general-purpose problem-solving algorithms to find the solution. So imperative means "how to do it" and declarative means "what is to be solved".

Q59. Why were assembly languages a significant advancement over machine languages?

Machine languages require instructions to be written as numeric codes, which is tedious and error-prone. Assembly languages replaced them with mnemonic names (human-readable codes), so programs became easier to write, read and understand. A program called an assembler translates them into machine language. Assembly languages also paved the way for higher-level languages by adding a level of abstraction.

Q60. How did third-generation programming languages differ from earlier generations?

  • They used higher-level primitives: each statement expresses a larger step than a machine instruction, which makes programming more intuitive.
  • They were designed to be machine independent, so a program could be moved to a different computer with little change.

Early examples are FORTRAN (scientific and engineering) and COBOL (business applications).

Q61. Why did the development of programming languages follow several tracks?

Because different programming paradigms (approaches to the programming process) appeared and were developed independently: imperative, declarative, functional and object-oriented. Each is a fundamentally different way of building a solution, and each affects the whole software development process. They suit different kinds of problems, so each paradigm produced its own family of languages.

No comments:

Post a Comment

Please give us your feedback & help us to improve this site.

CS301 Mid Term Papers