Mids - 2024 - OL P1 - MS
Mids - 2024 - OL P1 - MS
(4 marks)
Answer: Why Computers Use Binary:
- Computers are made up of circuits/logic gates that use binary for input and
output. That's why everthing is in binary.
- Binary matches the physical on/off state of computer hardware, making it a
natural choice for digital circuits.
- It simplifies the design and operation of computers, reducing complexity and
increasing reliability.
- Binary allows for efficient data processing and storage, with just two states
(0 and 1) representing all forms of data.
- The use of binary ensures compatibility and standardization across different
computing systems and devices.
2. Define a microprocessor and describe how it differs from a general purpose CPU.
(4 marks)
Answer:
- Microprocessor:
- A microprocessor is an integrated circuit that contains all the functions of a
central processing unit (CPU) on a single chip.
- It serves as the brain of a computer, or other digital devices, executing a
series of instructions to perform tasks.
5. Describe the purpose of the Arithmetic Logic Unit (ALU) in a CPU. (3 marks)
Answer:
- ALU Purpose:
- The ALU performs all arithmetic and logical operations within the CPU, such as
addition, subtraction, and comparison operations.
- It is a fundamental building block of the CPU, enabling it to solve
mathematical problems and make decisions based on logical comparisons.
- The ALU handles the execution of instructions that involve data manipulation,
essentially acting as the computational heart of the CPU.
- By processing these operations, the ALU plays a crucial role in the execution
of software programs, from simple calculations to complex decision-making
processes.
7. What is the effect of a logical right shift on the binary number 10010110?
- A) The number is divided by 2
- B) The number is multiplied by 2
- C) The most significant bit is lost
- D) The least significant bit is duplicated
Answer:
- The correct option is A) The number is divided by 2.
- A logical right shift by one position moves all bits to the right by one and
fills the leftmost bit with 0. This operation essentially divides the number by 2,
discarding any remainder.
8. Discuss how the number of cores, cache size, and clock speed affect CPU
performance. (4 marks)
Answer: CPU Performance Factors:
- Number of Cores: Increases multitasking and parallel processing capabilities.
- Cache Size: Larger cache reduces data retrieval time, speeding up processing.
- Clock Speed: Higher speeds allow more instructions per second, improving task
execution.
9. Describe an embedded system and provide two examples of devices where they are
used. (4 marks)
Answer: Embedded Systems:
- Definition: Specialized systems for specific functions, optimized for efficiency.
- Examples:
- Automotive Control Systems: Used for engine management and safety features.
- Home Appliances: Enable intelligent features in devices like washing machines
and smart thermostats.
11. Differentiate between lossy and lossless compression with examples. (5 marks)
Answer:
- Lossless Compression:
- Retains all original data after compression and decompression.
- Ideal for text and data files where precision is crucial.
- Example: ZIP compression, Run Length Encoding (RLE)
- Lossy Compression:
- Permanently removes some data to reduce file size.
- Used for audio, video, and images where a loss of some detail is acceptable for
significantly smaller file sizes.
- Example: JPEG for images, MP3 for audio.
12. Calculate the file size of an image with a resolution of 10x76 pixels and a
color depth of 4 bits. (3 marks)
Answer:
a. Calculate the total number of pixels:
- 10 x 76 = 760 pixels
b. Calculate the total number of bits required:
- Each pixel requires 4 bits, so 760 x 4 = 3040 bits
c. Convert bits to bytes:
- There are 8 bits in a byte, so 3040 / 8 = 380 bytes
- The file size of the image is 380 bytes.
13. In a CPU, the register that temporarily holds data being transferred to and
from immediate access store is the: (2 marks)
A) Memory Data Register (MDR)
B) Program Counter (PC)
C) Accumulator (ACC)
D) Memory Address Register (MAR)
Answer:
The correct option is A) Memory Data Register (MDR).
The MDR, or Memory Data Register, is used to temporarily hold data that is being
transferred to or from the memory. It acts as a buffer between the CPU and the
memory.
16. The process in the CPU that involves fetching an instruction from memory,
decoding it, and then executing it is known as the: (2 marks)
A) Control Sequence
B) Execution Loop
C) Fetch-Decode-Execute Cycle
D) Instruction Pipeline
Answer:
The correct option is C) Fetch-Decode-Execute Cycle.
This cycle describes the basic operation of a CPU: fetching an instruction from
memory, decoding what action is required, and then executing that action.
17. Fill in the blank: A sound wave is digitized for computer processing by
sampling it at regular intervals, known as the __________ rate. (2 marks)
Answer:
The blank should be filled with "sampling".
A sound wave is digitized for computer processing by sampling it at regular
intervals, known as the sampling rate.
18. Evaluating the Logic circuit and writing expression and tryuth table.
Answer:
a. The logic expression without simplification is: X = (A'.B) + C' (4 marks)
b. Truth Table: There are three inputs (A, B, C), so there will be 8 rows in the
truth table.