Learn ICT Faster and Better
Theory, Programming Exercises, Past Paper Questions and Answers, Assignments with Answers Practical Videos Learn ICT By Examples
In ICT, memory isn't just one component; it is a complex system designed to balance speed, cost, and capacity.
1. The Memory Hierarchy
The Memory Hierarchy is a structured arrangement of storage elements. It is designed to bridge the gap between high-speed processors and slower, high-capacity storage.
Need for Hierarchy: CPUs operate at extremely high speeds. A hierarchy ensures that the most frequently used data is closest to the CPU to avoid idle time.
Comparison Criteria:
Physical Size/Density: Smaller components like Registers have lower density compared to mass storage.
Access Time: Registers have the lowest delay (nanoseconds), while secondary storage is the slowest.
Capacity: Increases as you move down the hierarchy (Registers < Cache < RAM < HDD).
Cost: Price per bit decreases as you move down the hierarchy.
2. Volatile Memory: Fast and Temporary
Volatile memory requires power to maintain stored information. Once power is cut, data is lost.
Registers: Located inside the CPU for immediate instructions.
Cache Memory: High-speed buffer between CPU and RAM (L1, L2, and L3 levels).
Main Memory (RAM): The primary workspace. Includes SRAM (fast/expensive), DRAM (needs refreshing), and SDRAM (synchronized).
3. Non-Volatile Memory: Permanent Storage
Non-volatile memory retains data even when the power is turned off.
Read-Only Memory (ROM): Used for firmware like the BIOS.
PROM: Programmable once.
EPROM: Erasable via UV light.
EEPROM: Electrically erasable and rewritable.
Feature
Volatile Memory
Non-Volatile Memory
Data Retention
Temporary; lost when power is off.
Permanent; retained without power.
Speed
Extremely Fast.
Slower than volatile memory.
Cost
Higher cost per unit of storage.
Lower cost per unit of storage.
Capacity
Typically smaller (GBs).
Typically much larger (TBs).
Examples
RAM, Cache, Registers.
ROM, HDD, SSD, Flash Drives.
Primary Use
Current tasks and active data.
Long-term file and OS storage.
4. Secondary Storage: The Mass Repositories
Secondary storage provides long-term, high-capacity storage for files and software.
Magnetic Memory: Uses magnetic fields (e.g., HDD). Affordable for high capacity.
Optical Memory: Uses lasers to read/write (e.g., CD, DVD, Blu-ray).
Flash Memory: Electronic circuits with no moving parts (e.g., SSDs, USB drives).
๐ป Von Neumann Architecture – Complete Student Guide
Learn the core working of computers: CPU, Memory, Fetch Cycle & More in a simple and smart way.
The Von Neumann Architecture is the basic design used in most computers today. It introduced a powerful idea: store both data and instructions in the same memory.
This design allows computers to run different programs without changing hardware, making them flexible and efficient.
๐ 1. Stored Program Concept
Instructions and data are stored together in memory
The CPU reads instructions one by one
Programs can be easily updated
๐ Why It Matters:
✔ Enables software development
✔ Makes computers general-purpose
✔ Supports automation
๐ One computer can run games, apps, and browsers because of this concept.
๐งฉ 2. Main Components
๐น Input Unit
Accepts user data
Converts to binary
Examples: Keyboard, Mouse, Scanner
๐น Output Unit
Displays results
Converts to human-readable form
Examples: Monitor, Printer, Speakers
๐น Memory Unit
Stores data and instructions
RAM – Temporary, fast
HDD/SSD – Permanent storage
Supplies data and instructions to CPU when needed
๐น Processor (CPU)
Control Unit (CU) – Controls operations
ALU – Performs calculations
๐ CU decides what to do, ALU performs the action
๐ 3. Fetch–Execute Cycle
Fetch: CPU retrieves instruction (PC stores address)
Decode: Instruction is understood
Execute: Task is performed
๐ Happens billions of times per second
๐ This process powers every application you use
๐ง 4. CPU – In Depth
๐น ALU
Performs calculations
Handles logical decisions
๐น Control Unit
Manages all operations
Sends control signals
๐น Registers
Very fast memory inside CPU
PC – next instruction
IR – current instruction
๐น Buses
Data Bus – transfers data
Address Bus – carries location
Control Bus – sends signals
๐ Without buses, components cannot communicate
๐น Multi-Core Processors
Multiple cores run tasks simultaneously
Improves speed and multitasking
๐ More cores = better performance
⚠️ Limitation
Von Neumann Bottleneck
Single path for data and instructions
Causes slower processing
๐ Modern systems reduce this using advanced techniques
๐ Section A: MCQs
1. What is the main idea of the Von Neumann Architecture?
A) Separate memory for data and instructions
B) Store data and instructions in the same memory
C) Use multiple processors
D) No memory usage
Answer: B
2. Which component performs calculations?
A) Control Unit
B) Memory Unit
C) ALU
D) Input Unit
Answer: C
3. Which unit controls the operations of the computer?
A) ALU
B) Control Unit
C) Output Unit
D) Register
Answer: B
4. What does the Fetch stage do?
A) Executes instruction
B) Stores data
C) Retrieves instruction from memory
D) Displays output
Answer: C
5. Which of the following is NOT a CPU component?
A) ALU
B) Control Unit
C) Register
D) Printer
Answer: D
6. Which bus carries data?
A) Control Bus
B) Address Bus
C) Data Bus
D) Memory Bus
Answer: C
7. What is the function of the Program Counter (PC)?
A) Stores results
B) Holds next instruction address
C) Performs calculations
D) Controls output
Answer: B
8. Which stage follows Decode in the cycle?
A) Fetch
B) Store
C) Execute
D) Input
Answer: C
9. What is a register?
A) External storage
B) Slow memory
C) High-speed internal memory
D) Input device
Answer: C
10. What is the Von Neumann Bottleneck?
A) Slow input devices
B) Limited memory
C) Single path for data and instructions
D) Low power supply
Answer: C
✏️ Section B: Short Answers
1. Define Von Neumann Architecture. ✅ A computer design where data and instructions are stored in the same memory and processed by the CPU.
2. What is the stored program concept? ✅ It means instructions and data are stored together in memory and executed by the CPU.
3. Name two main components of the CPU. ✅ ALU and Control Unit
4. What is the function of the ALU? ✅ Performs arithmetic and logical operations.
5. What does the Control Unit do? ✅ Controls and coordinates all operations of the computer.
6. What is the Fetch-Execute Cycle? ✅ The process where the CPU fetches, decodes, and executes instructions.
7. What is a data bus? ✅ A pathway that carries data between components.
8. What is a register? ✅ A small, fast memory inside the CPU used to store temporary data.
In the 21st century, Information and Communication Technology (ICT) is not just a subject; it is a fundamental driver of global progress. From how we farm to how we enforce laws, ICT is everywhere.
1. ICT Applications Across Sectors
EducationUse of LMS and Interactive Whiteboards. E.g., Zoom, Google Classroom.
HealthcareTelemedicine and EHR systems.
AgricultureIoT-based smart farming systems.
Business & FinanceE-commerce and online banking.
EngineeringCAD tools like AutoCAD.
TourismOnline booking and GPS navigation.
Media & JournalismDigital news & social platforms.
Problem 1
Write an algorithm to read two numbers and print their sum.
Algorithm (Pseudocode>
Start
Read A, B
SUM ← A + B
Print SUM
Stop
Pascal Program
program SumOfTwoNumbers;
var
A, B, SUM: integer;
begin
writeln('Enter value of A: ');
readln(A);
writeln('Enter value of B: ');
readln(B);
SUM := A + B;
writeln('Sum = ', SUM);
end.
Python Program
# Read two numbers
A = int(input("Enter value of A: "))
B = int(input("Enter value of B: "))
# Calculate sum
SUM = A + B
# Print result
print("Sum =", SUM)
Problem 2
Write an algorithm to find the larger of two numbers.
Algorithm Pseudocode
Start
Read A, B
If A > B
Print A
Else
Print B
Stop
Pascal Program
program FindGreaterNumber;
var
A, B : integer;
begin
readln(A, B);
if A > B then
writeln(A)
else
writeln(B);
end.
Python Program
A = int(input())
B = int(input())
if A > B:
print(A)
else:
print(B)
Problem 3
Write an algorithm to check whether a number is even or odd
Algorithm Pseudocode
Start
Read N
If N mod 2 = 0
Print "Even"
Else
Print "Odd"
Stop
Pascal Program
program EvenOdd;
var
N: integer;
begin
writeln('Enter a number: ');
readln(N);
if N mod 2 = 0 then
writeln('Even')
else
writeln('Odd');
end.
Python Program
N = int(input("Enter a number: "))
if N % 2 == 0:
print("Even")
else:
print("Odd")
Problem 4
Write an algorithm to calculate simple interest.
Formula:
SI = (P × R × T) / 100
Algorithm Pseudocode
Start
Read P, R, T
SI ← (P × R × T) / 100
Print SI
Stop
Pascal Program
program SimpleInterest;
var
P, R, T, SI: real;
begin
writeln('Enter Principal (P): ');
readln(P);
writeln('Enter Rate (R): ');
readln(R);
writeln('Enter Time (T): ');
readln(T);
SI := (P * R * T) / 100;
writeln('Simple Interest = ', SI:8:2);
end.
Python Program
P = float(input("Enter Principal (P): "))
R = float(input("Enter Rate (R): "))
T = float(input("Enter Time (T): "))
SI = (P * R * T) / 100
print("Simple Interest =", SI)
Problem 5
Write an algorithm to reverse a number.
Algorithm Pseudocode
Start
Read N
REV ← 0
While N > 0
DIGIT ← N mod 10
REV ← REV × 10 + DIGIT
N ← N / 10
EndWhile
Print REV
Stop
Pascal Program
program ReverseNumber;
var
N, REV, DIGIT: integer;
begin
writeln('Enter a number: ');
readln(N);
REV := 0;
while N > 0 do
begin
DIGIT := N mod 10;
REV := REV * 10 + DIGIT;
N := N div 10;
end;
writeln('Reversed Number = ', REV);
end.
Python Program
N = int(input("Enter a number: "))
REV = 0
while N > 0:
DIGIT = N % 10
REV = REV * 10 + DIGIT
N = N // 10
print("Reversed Number =", REV)
Problem 6
Write an algorithm to check whether a number is a palindrome.
Algorithm Pseudocode
Start
Read N
TEMP ← N
REV ← 0
While TEMP > 0
DIGIT ← TEMP mod 10
REV ← REV × 10 + DIGIT
TEMP ← TEMP / 10
Endwhile
If REV = N
Print "Palindrome"
Else
Print "Not Palindrome"
Stop
Pascal Program
program PalindromeNumber;
var
N, TEMP, REV, DIGIT: integer;
begin
writeln('Enter a number: ');
readln(N);
TEMP := N;
REV := 0;
while TEMP > 0 do
begin
DIGIT := TEMP mod 10;
REV := REV * 10 + DIGIT;
TEMP := TEMP div 10;
end;
if REV = N then
writeln('Palindrome')
else
writeln('Not Palindrome');
end.
Python Program
N = int(input("Enter a number: "))
TEMP = N
REV = 0
while TEMP > 0:
DIGIT = TEMP % 10
REV = REV * 10 + DIGIT
TEMP = TEMP // 10
if REV == N:
print("Palindrome")
else:
print("Not Palindrome")
Problem 7
Write an algorithm to find the sum of digits of a number.
Algorithm Pseudocode
Start
Read N
SUM ← 0
While N > 0
DIGIT ← N mod 10
SUM ← SUM + DIGIT
N ← N / 10
EndWhile
Print SUM
Stop
Pascal Program
program SumOfDigits;
var
N, SUM, DIGIT: integer;
begin
writeln('Enter a number: ');
readln(N);
SUM := 0;
while N > 0 do
begin
DIGIT := N mod 10;
SUM := SUM + DIGIT;
N := N div 10;
end;
writeln('Sum of Digits = ', SUM);
end.
Python Program
N = int(input("Enter a number: "))
SUM = 0
while N > 0:
DIGIT = N % 10
SUM = SUM + DIGIT
N = N // 10
print("Sum of Digits =", SUM)
Problem 8
Write an algorithm to count the number of digits in a number.
Algorithm Pseudocode
Start
Read N
COUNT ← 0
While N > 0
COUNT ← COUNT + 1
N ← N / 10
Endwhile
Print COUNT
Stop
Pascal Program
program CountDigits;
var
N, COUNT: integer;
begin
writeln('Enter a number: ');
readln(N);
COUNT := 0;
while N > 0 do
begin
COUNT := COUNT + 1;
N := N div 10;
end;
writeln('Number of digits = ', COUNT);
end.
Python Program
N = int(input("Enter a number: "))
COUNT = 0
while N > 0:
COUNT = COUNT + 1
N = N // 10
print("Number of digits =", COUNT)
Problem 9
Write an algorithm to check whether a year is a leap year.
Algorithm Pseudocode
Start
Read YEAR
If (YEAR mod 400 = 0)
Print "Leap Year"
Else if (YEAR mod 100 = 0)
Print "Not Leap Year"
Else if (YEAR mod 4 = 0)
Print "Leap Year"
Else
Print "Not Leap Year"
Stop
Pascal Program
program LeapYear;
var
YEAR: integer;
begin
writeln('Enter the year: ');
readln(YEAR);
if (YEAR mod 400 = 0) then
writeln('Leap Year')
else if (YEAR mod 100 = 0) then
writeln('Not Leap Year')
else if (YEAR mod 4 = 0) then
writeln('Leap Year')
else
writeln('Not Leap Year');
end.
Python Program
YEAR = int(input("Enter the year: "))
if YEAR % 400 == 0:
print("Leap Year")
elif YEAR % 100 == 0:
print("Not Leap Year")
elif YEAR % 4 == 0:
print("Leap Year")
else:
print("Not Leap Year")
Problem 10
Write an algorithm to search an element in a list.
Algorithm Pseudocode
Start
Read N
Read array A
Read key
For i ← 1 to N
If A[i] = key
Print "Found"
Stop
EndFor
Print "Not Found"
Stop
Pascal Program
program LinearSearch;
var
A: array[1..100] of integer;
N, i, key: integer;
found: boolean;
begin
writeln('Enter number of elements: ');
readln(N);
writeln('Enter array elements: ');
for i := 1 to N do
readln(A[i]);
writeln('Enter key to search: ');
readln(key);
found := false;
for i := 1 to N do
begin
if A[i] = key then
begin
writeln('Found');
found := true;
break;
end;
end;
if not found then
writeln('Not Found');
end.
Python Program
N = int(input("Enter number of elements: "))
A = []
print("Enter array elements:")
for i in range(N):
A.append(int(input()))
key = int(input("Enter key to search: "))
found = False
for i in range(N):
if A[i] == key:
print("Found")
found = True
break
if not found:
print("Not Found")