KSC-GECB 1
VIDEO 1 1
KSC-GECB 2
VIDEO 1 1
KSC-GECB 3
VIDEO 1 1
INPUT DEVICES
• Keyboards
• Mouse
• Digital Scanners
• Digital cameras
• Web camera
• Joysticks
• Microphones
• Barcode reader
• Digital Pen
OUTPUT DEVICES
• Monitor
• Printer
• Plotters
• Speakers
• Headphones
• Projector
KSC-GECB 4
VIDEO 1 1
KSC-GECB 5
A deck of punched cards comprising a computer program
Five-hole and eight-hole punched paper tape
VIDEO 1 1
Memory
Primary
memory
CPU
Register
Cache
RAM
DRAM
SRAM
ROM
PROM
EPROM
EEPROM
Secondary
memory
Magnetic
tape
Magnetic
disk
Optical
disk
Flash
storage
KSC-GECB 6
VIDEO 1 1
KSC-GECB 7
VIDEO 2 1
•Application software
•Word processor
•Spreadsheets
•Games
•Email client
•Web browser
•Autocad
•System software
•Operating systems
•BIOS
•Device drivers
•Disk defragmenter
•System restore
•Development tools
(Assembler,
Compiler)
KSC-GECB 8
VIDEO 2 1
HIGH LEVEL LANGUAGE
C, C++, JAVA, PYTHON
FORTRAN, PASCAL
LISP, PROLOG
BASIC, ADA, ALGOL, PHP..
LOW LEVEL LANGUAGE
Machine Language
Assembly Language
KSC-GECB 9
Assembler
Compiler and Interpreter
VIDEO 2 1
SL.NO HIGH LEVEL LANGUAGE LOW LEVEL LANGUAGE
1.
It is programmer friendly
language.
It is a machine friendly language.
2.
High level language is less
memory efficient.
Low level language is high memory
efficient.
3. It is easy to understand. It is tough to understand.
4. It is simple to debug. It is complex to debug comparatively.
5. It is simple to maintain.
It is complex to maintain
comparatively.
6. It is portable. It is non-portable.
7. It can run on any platform. It is machine-dependent.
8.
It needs compiler or interpreter
for translation.
It needs assembler for translation.
KSC-GECB 10
KSC-GECB 11
VIDEO 3 1
Write an Algorithm to find Simple Interest for a deposit.
Step 1: Input the Amount - P
Number of Years- N
Rate of interest - R.
Step 2: Calculate Interest, I = (P * N * R)/100.
Step 3: Output the Interest amount.
Step 4: Stop.
KSC-GECB 12
I =
𝑃𝑁𝑅
100
VIDEO 3 1
Write an Algorithm to find the biggest of three numbers.
Step 1: Input the three numbers say A, B and C.
Step 2: Compare A and B. If A>B then Biggest = A, otherwise
Biggest = B.
Step 3: Compare biggest with the third number C. If C> Biggest then
Biggest = C.
Step 4: Print Biggest.
Step 5: Stop.
KSC-GECB 13
VIDEO 3 1
A B C
5 6 7
Write an Algorithm to find the sum of first 'N' natural
numbers.
Sum= 1+2+3+.... + N
Step 1: Input the limit say N.
Step 2: Let a variable i =1 and let another variable sum = 0.
Step 3: If value of i is greater than N, then go to step 7
Otherwise go to step 4.
Step 4: Add i to sum. .
Step 5: Increment the value of i by 1.
Step 6: Go back to step 3.
Step 7: Print the value of sum.
KSC-GECB 14
VIDEO 4 1
Write an Algorithm to find the sum of first 'N' natural
numbers.
Sum= 1+2+3+.... + N
KSC-GECB 15
VIDEO 4 1
i Sum = 0
1 1
2 3
3 6
4 10
5 15
6 21
7
Sum = Sum + i
i = i + 1
N=6
Sum = 21
KSC-GECB 16
VIDEO 5 1
Write an Algorithm to find Simple Interest for a deposit.
Step 1: Input the Amount - P
Number of Years- N
Rate of interest - R.
Step 2: Calculate Interest, I = (P * N * R)/100.
Step 3: Output the Interest amount.
Step 4: Stop.
KSC-GECB 17
VIDEO 5 1
Write an Algorithm to find the
biggest of three numbers.
Step 1: Input the three numbers say A, B
and C.
Step 2: Compare A and B. If A>B then
Biggest = A, otherwise Biggest = B.
Step 3: Compare biggest with the third
number C. If C> Biggest then Biggest = C.
Step 4: Print Biggest.
Step 5: Stop.
KSC-GECB 18
VIDEO 5 1
KSC-GECB 19
Write an Algorithm to find the sum of first 'N' natural
numbers.
Sum= 1+2+3+.... + N
Step 1: Input the limit say N.
Step 2: Let a variable i =1 and let
another variable sum = 0.
Step 3: If value of i is greater than N, then
go to step 7
Otherwise go to step 4.
Step 4: Add i to sum. .
Step 5: Increment the value of i by 1.
Step 6: Go back to step 3.
Step 7: Print the value of sum.
VIDEO 5 1
Write pseudocode to create a program to add 2
numbers together and then display the result.
Start Program
Enter two numbers, A, B
Add the numbers together
Print Sum
End Program
KSC-GECB 20
VIDEO 6 1
Write pseudocode to compute the perimeter of a
rectangle:
Enter length, l
Enter width, w
Compute Perimeter = 2*l + 2*w
Display Perimeter of a rectangle
KSC-GECB 21
VIDEO 6 1
KSC-GECB 22
VIDEO 7 1
KSC-GECB 23
VIDEO 7 1
KSC-GECB 24
5 1 2 6 4 11 8 9
1 2 4 5 6 8 9 11
SORTING
VIDEO 7 1
KSC-GECB 25
VIDEO 7 1
KSC-GECB 26
23 45 65 24 74 28 36 31 55 48
Number to be searched: 74
74 is found at position 5 in the list
VIDEO 7 1
Step 1: Input the series of numbers. Consider n= number of
elements.
Step 2: Enter the number to search, x.
Step 3: Initialize i=1.
Step 4: Is the ith term equal to x? If yes, go to step 5. Else goto step 6.
Step 5: Display “Search value found at position i.”
Step 6: Increment i by 1 unit.
Step 7: If i is greater than n, Go to step 8. Else go to step 4.
Step 8: Display: “Search over.”
KSC-GECB 27
VIDEO 7 1
74 74 65 24 23 28 36 31 55 48
Number to be searched: 74
74 is found at position 1 in the list
KSC-GECB 28
VIDEO 7 1
Step 1: Input the series of numbers. Consider n= number of elements.
Step 2: initialize i=1 and j=1.
Step 3: if i is less than n, go to step 4. Else go to step 8.
Step 4: Compare jth term and j+1th term. If jth term is smaller, go to
step5. Else, swap positions and go to step 5.
Step 5: Increment j by 1 unit.
Step 6: If j is less than or equal to n-i, goto step 4. Else, goto step 7.
Step 7: Increment i by 1 unit, set j=1. Go to step 3.
Step 8: Output the series of numbers.
KSC-GECB 29
BUBBLE SORT
9 8 7 6 5
30
9 8 7 6 5
8 9 7 6 5
8 7 9 6 5
8 7 6 9 5
5 6 7 8 9
ROUND 1
8 7 6 5 9
BUBBLE SORT
31
8 7 6 5 9
7 8 6 5 9
7 6 8 5 9
7 6 5 8 9
5 6 7 8 9
ROUND 2
BUBBLE SORT
32
7 6 5 8 9
6 7 5 8 9
6 5 7 8 9
5 6 7 8 9
ROUND 3
BUBBLE SORT
33
6 5 7 8 9
5 6 7 8 9
5 6 7 8 9
ROUND 4
KSC-GECB 34
9 8 7 6 5
8 9 7 6 5
8 7 9 6 5
ROUND 1
8 7 6 5 9
7 8 6 5 9
7 6 8 5 9
7 6 5 8 9
ROUND 2
8 7 6 9 5
8 7 6 5 9
1&2
2&3
3&4
4&5
1&2
2&3
3&4
KSC-GECB 35
7 6 5 8 9
6 7 5 8 9
6 5 7 8 9
ROUND 3
6 5 7 8 9
5 6 7 8 9
ROUND 4
1&2
2&3
1&2
j<=n-i
j<=5-3
j<=2
Step 4: Compare jth term and j+1th term. If jth term is smaller, go to
step5. Else, swap positions and go to step 5.
Step 5: Increment j by 1 unit.
Step 6: If j is less than or equal to n-i, goto step 4. Else, goto step 7.
Step 7: Increment i by 1 unit, set j=1. Go to step 3.
Step 1: Input the series of numbers. Consider n= number of elements.
Step 2: initialize i=1 and j=1.
Step 3: if i is less than n, go to step 4. Else go to step 8.
Step 4: Compare jth term and j+1th term. If jth term is smaller, go to
step5. Else, swap positions and go to step 5.
Step 5: Increment j by 1 unit.
Step 6: If j is less than or equal to n-i, goto step 4. Else, goto step 7.
Step 7: Increment i by 1 unit, set j=1. Go to step 3.
Step 8: Output the series of numbers.
KSC-GECB 36
KSC-GECB 37

Computer basics

  • 1.
  • 2.
  • 3.
  • 4.
    INPUT DEVICES • Keyboards •Mouse • Digital Scanners • Digital cameras • Web camera • Joysticks • Microphones • Barcode reader • Digital Pen OUTPUT DEVICES • Monitor • Printer • Plotters • Speakers • Headphones • Projector KSC-GECB 4 VIDEO 1 1
  • 5.
    KSC-GECB 5 A deckof punched cards comprising a computer program Five-hole and eight-hole punched paper tape VIDEO 1 1
  • 6.
  • 7.
  • 8.
    •Application software •Word processor •Spreadsheets •Games •Emailclient •Web browser •Autocad •System software •Operating systems •BIOS •Device drivers •Disk defragmenter •System restore •Development tools (Assembler, Compiler) KSC-GECB 8 VIDEO 2 1
  • 9.
    HIGH LEVEL LANGUAGE C,C++, JAVA, PYTHON FORTRAN, PASCAL LISP, PROLOG BASIC, ADA, ALGOL, PHP.. LOW LEVEL LANGUAGE Machine Language Assembly Language KSC-GECB 9 Assembler Compiler and Interpreter VIDEO 2 1
  • 10.
    SL.NO HIGH LEVELLANGUAGE LOW LEVEL LANGUAGE 1. It is programmer friendly language. It is a machine friendly language. 2. High level language is less memory efficient. Low level language is high memory efficient. 3. It is easy to understand. It is tough to understand. 4. It is simple to debug. It is complex to debug comparatively. 5. It is simple to maintain. It is complex to maintain comparatively. 6. It is portable. It is non-portable. 7. It can run on any platform. It is machine-dependent. 8. It needs compiler or interpreter for translation. It needs assembler for translation. KSC-GECB 10
  • 11.
  • 12.
    Write an Algorithmto find Simple Interest for a deposit. Step 1: Input the Amount - P Number of Years- N Rate of interest - R. Step 2: Calculate Interest, I = (P * N * R)/100. Step 3: Output the Interest amount. Step 4: Stop. KSC-GECB 12 I = 𝑃𝑁𝑅 100 VIDEO 3 1
  • 13.
    Write an Algorithmto find the biggest of three numbers. Step 1: Input the three numbers say A, B and C. Step 2: Compare A and B. If A>B then Biggest = A, otherwise Biggest = B. Step 3: Compare biggest with the third number C. If C> Biggest then Biggest = C. Step 4: Print Biggest. Step 5: Stop. KSC-GECB 13 VIDEO 3 1 A B C 5 6 7
  • 14.
    Write an Algorithmto find the sum of first 'N' natural numbers. Sum= 1+2+3+.... + N Step 1: Input the limit say N. Step 2: Let a variable i =1 and let another variable sum = 0. Step 3: If value of i is greater than N, then go to step 7 Otherwise go to step 4. Step 4: Add i to sum. . Step 5: Increment the value of i by 1. Step 6: Go back to step 3. Step 7: Print the value of sum. KSC-GECB 14 VIDEO 4 1
  • 15.
    Write an Algorithmto find the sum of first 'N' natural numbers. Sum= 1+2+3+.... + N KSC-GECB 15 VIDEO 4 1 i Sum = 0 1 1 2 3 3 6 4 10 5 15 6 21 7 Sum = Sum + i i = i + 1 N=6 Sum = 21
  • 16.
  • 17.
    Write an Algorithmto find Simple Interest for a deposit. Step 1: Input the Amount - P Number of Years- N Rate of interest - R. Step 2: Calculate Interest, I = (P * N * R)/100. Step 3: Output the Interest amount. Step 4: Stop. KSC-GECB 17 VIDEO 5 1
  • 18.
    Write an Algorithmto find the biggest of three numbers. Step 1: Input the three numbers say A, B and C. Step 2: Compare A and B. If A>B then Biggest = A, otherwise Biggest = B. Step 3: Compare biggest with the third number C. If C> Biggest then Biggest = C. Step 4: Print Biggest. Step 5: Stop. KSC-GECB 18 VIDEO 5 1
  • 19.
    KSC-GECB 19 Write anAlgorithm to find the sum of first 'N' natural numbers. Sum= 1+2+3+.... + N Step 1: Input the limit say N. Step 2: Let a variable i =1 and let another variable sum = 0. Step 3: If value of i is greater than N, then go to step 7 Otherwise go to step 4. Step 4: Add i to sum. . Step 5: Increment the value of i by 1. Step 6: Go back to step 3. Step 7: Print the value of sum. VIDEO 5 1
  • 20.
    Write pseudocode tocreate a program to add 2 numbers together and then display the result. Start Program Enter two numbers, A, B Add the numbers together Print Sum End Program KSC-GECB 20 VIDEO 6 1
  • 21.
    Write pseudocode tocompute the perimeter of a rectangle: Enter length, l Enter width, w Compute Perimeter = 2*l + 2*w Display Perimeter of a rectangle KSC-GECB 21 VIDEO 6 1
  • 22.
  • 23.
  • 24.
    KSC-GECB 24 5 12 6 4 11 8 9 1 2 4 5 6 8 9 11 SORTING VIDEO 7 1
  • 25.
  • 26.
    KSC-GECB 26 23 4565 24 74 28 36 31 55 48 Number to be searched: 74 74 is found at position 5 in the list VIDEO 7 1
  • 27.
    Step 1: Inputthe series of numbers. Consider n= number of elements. Step 2: Enter the number to search, x. Step 3: Initialize i=1. Step 4: Is the ith term equal to x? If yes, go to step 5. Else goto step 6. Step 5: Display “Search value found at position i.” Step 6: Increment i by 1 unit. Step 7: If i is greater than n, Go to step 8. Else go to step 4. Step 8: Display: “Search over.” KSC-GECB 27 VIDEO 7 1 74 74 65 24 23 28 36 31 55 48 Number to be searched: 74 74 is found at position 1 in the list
  • 28.
  • 29.
    Step 1: Inputthe series of numbers. Consider n= number of elements. Step 2: initialize i=1 and j=1. Step 3: if i is less than n, go to step 4. Else go to step 8. Step 4: Compare jth term and j+1th term. If jth term is smaller, go to step5. Else, swap positions and go to step 5. Step 5: Increment j by 1 unit. Step 6: If j is less than or equal to n-i, goto step 4. Else, goto step 7. Step 7: Increment i by 1 unit, set j=1. Go to step 3. Step 8: Output the series of numbers. KSC-GECB 29
  • 30.
    BUBBLE SORT 9 87 6 5 30 9 8 7 6 5 8 9 7 6 5 8 7 9 6 5 8 7 6 9 5 5 6 7 8 9 ROUND 1 8 7 6 5 9
  • 31.
    BUBBLE SORT 31 8 76 5 9 7 8 6 5 9 7 6 8 5 9 7 6 5 8 9 5 6 7 8 9 ROUND 2
  • 32.
    BUBBLE SORT 32 7 65 8 9 6 7 5 8 9 6 5 7 8 9 5 6 7 8 9 ROUND 3
  • 33.
    BUBBLE SORT 33 6 57 8 9 5 6 7 8 9 5 6 7 8 9 ROUND 4
  • 34.
    KSC-GECB 34 9 87 6 5 8 9 7 6 5 8 7 9 6 5 ROUND 1 8 7 6 5 9 7 8 6 5 9 7 6 8 5 9 7 6 5 8 9 ROUND 2 8 7 6 9 5 8 7 6 5 9 1&2 2&3 3&4 4&5 1&2 2&3 3&4
  • 35.
    KSC-GECB 35 7 65 8 9 6 7 5 8 9 6 5 7 8 9 ROUND 3 6 5 7 8 9 5 6 7 8 9 ROUND 4 1&2 2&3 1&2 j<=n-i j<=5-3 j<=2 Step 4: Compare jth term and j+1th term. If jth term is smaller, go to step5. Else, swap positions and go to step 5. Step 5: Increment j by 1 unit. Step 6: If j is less than or equal to n-i, goto step 4. Else, goto step 7. Step 7: Increment i by 1 unit, set j=1. Go to step 3.
  • 36.
    Step 1: Inputthe series of numbers. Consider n= number of elements. Step 2: initialize i=1 and j=1. Step 3: if i is less than n, go to step 4. Else go to step 8. Step 4: Compare jth term and j+1th term. If jth term is smaller, go to step5. Else, swap positions and go to step 5. Step 5: Increment j by 1 unit. Step 6: If j is less than or equal to n-i, goto step 4. Else, goto step 7. Step 7: Increment i by 1 unit, set j=1. Go to step 3. Step 8: Output the series of numbers. KSC-GECB 36
  • 37.