0% found this document useful (0 votes)
23 views4 pages

Mids - 2024 - OL P1 - MS

The document covers various fundamental concepts in computer science, including the use of binary for data representation, the definition and function of microprocessors, and the role of the CPU and its components. It also discusses embedded systems, compression types, and basic arithmetic operations in binary. Additionally, it includes practical examples and calculations related to image file sizes and logic circuits.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views4 pages

Mids - 2024 - OL P1 - MS

The document covers various fundamental concepts in computer science, including the use of binary for data representation, the definition and function of microprocessors, and the role of the CPU and its components. It also discusses embedded systems, compression types, and basic arithmetic operations in binary. Additionally, it includes practical examples and calculations related to image file sizes and logic circuits.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

1. Explain why computers use binary to represent all forms of data.

(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.

- Differences from a General-Purpose CPU:


Some microprocessors are specialized for specific tasks (like in embedded
systems) called special purpose computers, whereas general-purpose CPUs are
designed for a wide variety of computing needs across many types of software.

3. Convert the denary number 156 to a binary number. (2 marks)


Answer: 10011100.

4.What is the primary function of the CPU?


A) Store data
B) Process instructions and data
C) Control peripheral devices
D) Manage network connections
Answer:
The correct option is B) Process instructions and data.
The CPU (Central Processing Unit) is the main part of a computer that interprets
and executes commands from the computer's hardware and software.
It performs the basic arithmetical, logical, and input/output operations of the
system.

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.

6. Perform an 8bit binary addition of 10101010 and 11001100. Indicate if there is


an overflow error. (4 marks)
Answer:
8-bit Binary Addition:
- Given Numbers: 10101010 + 11001100
- Binary Addition Process:
- Start adding from the rightmost bit: 0 + 0 = 0
- Move to the next bit: 1 + 0 = 1
- Continue adding each pair of bits: 0 + 1 = 1, and so on.
- If adding two 1s, write 0 and carry over 1 to the next higher bit.
- Result:
- The sum is: 1 01110110
- Since this is an 8-bit system, the leftmost 1 indicates an overflow because it
exceeds the maximum value that can be represented in 8 bits.

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.

10. The 8bit two's complement representation of -18 is ______________. (4 marks)


Answer: The 8-bit two's complement representation of -18 is 11101110.

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.

14. ASCII represents the character 'A' as: (1 mark)


A) 01000001
B) 10000001
C) 01100001
D) 00100001
Answer:
The correct option is A) 01000001.
In the ASCII encoding scheme, the character 'A' is represented by the binary code
65 in denary and 01000001 binary.

15. How many bytes are there in 1 Kibibyte (KiB)? (1 mark)


A) 1000 bytes
B) 1024 bytes
C) 2048 bytes
D) 512 bytes
Answer:
The correct option is B) 1024 bytes.
1 Kibibyte (KiB) is equal to 1024 bytes, according to the binary system used in
computing to measure memory and storage.

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.

A B C A' C' A'B X


---------------------------
0 0 0 1 1 0 1
0 0 1 1 0 0 0
0 1 0 1 1 1 1
0 1 1 1 0 1 1
1 0 0 0 1 0 1
1 0 1 0 0 0 0
1 1 0 0 1 0 1
1 1 1 0 0 0 0 (4 marks)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy