Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 33

16 AUGUST 2021

Write a program to enter the name and mark of 200 pupils. Then output
(a) all the names and marks entered for example Krishna 45
(b) all names and marks of those who have got above 80 marks
(c) all names and marks of those who have obtained below 40 marks

23 AUGUST 2021

Write a code to enter the following details of 250 employees:


Name
Department
Salary
Output
(i) All the details. For example Lawmesh production 56900
(ii) All the details of employees who earn more 45000
(iii) All the details of employees whose name start with the letter “T”
(iv) All the details of employees whose salary is exactly divisible by 15

All Array:

Dim ArrayName(250) as string


Dim ArrayDepartment(250) as string
Dim ArraySalary(250) as double
Dim ArrayMore(250), ArrayStart(250), ArrayDivisible(250) as string
Dim CounterMore, CounterStart, CounterDivisible as Integer
Dim Index as integer
Const NumbeofEmployee = 250

CounterMore= 0
CounterStart = 0
CounterDivisble = 0
For Index = 1 to NumbeofEmployee
Console.writeline(“Please enter Name”)
ArrayName(index) = Console.readline

Console.writeline(“Please enter Department”)


ArrayDepartment(index) = Console.readline
LEFT
Console.writeline(“Please enter Salary”) RIGHT
ArraySalary(index) = Console.readline MID
MOD
If ArraySalary(index) > 45000 then
CounterSalary = CounterSalary + 1
ArrayMore(CounterSalary) = ArrayName(Index) & vbtab & ArrayDepartment(index) & vbtab &
ArraySalary(index)
Endif

If LEFT(ArrayName(Index),1 )= “T” Then


CounterStart = CounterStart + 1
ArrayStart(CounterStart) = ArrayName(Index) & vbtab & ArrayDepartment(index) & vbtab &
ArraySalary(index)
Endif

IF ArraySalary(index) MOD 15 = 0 Then


CounnterDivisible = CounterDivisible + 1
ArrayDivisible(CounterDivisible) = ArrayName(Index) & vbtab & ArrayDepartment(index) & vbtab &
ArraySalary(index)
Endif

NEXT

Console.writeline(“Here is the list of employees”)


For index = 1 to NumbeofEmployee
Console.writeline(ArrayName(Index) & vbtab & ArrayDepartment(index) & vbtab &
ArraySalary(index))
NEXT

Console.writeline(“Here is the list of employees whose salary is more than 45000”)


For index = 1 to CounterMore
Console.writeline(ArrayName(Index) & vbtab & ArrayDepartment(index) & vbtab &
ArraySalary(index))
NEXT

30-AUGUST 2021

Predefined Function

LEFT, RIGHT , MID, INT, LEN, UCASE, LCASE


T = “Amitabh Bachand”

LEFT(T,2) = “Am” There two parameters.


LEFT(T,4) = “Amit” DFG(X,Y,Z,R) has 4 parameters

RIGHT(T,3) = “and”
RIGHT(T,5) = “chand”

MID(T,4,3) = “tab”
MID(T,9,3) = “Bac”
MID(T,1,1) = “A”
MID(T,2,1) = “m”
LEN(T) = 15

INT(8.9) =8
INT(87.672) = 87
INT(0.782)= 0
LCASE(T) = “amitabh bachand”
UCase(T) = “AMITABH BACHAND”

Eg1 write a program to enter a name and then output whether


(i) It Starts with the letter “A”
(ii) It ends with the two letters “er”
(iii) It is of length above 5 characters
(iv) Its 3rd and 4th characters are “am”

Dim name as string

Console.writeline (“Enter a Name”)


Name =console.readline
IF Left(Name,1) = “A”) Then
Console.writeline (“It starts with the letter A”)
End
IF Right(Name,2) = “er” Then
Console.writeline (“The name ends with the two letters er”)
ENDIF
IF LEN(name) > 5 then
Console.writeline(“The length is above 5”)
ENDIF

IF MID(Name,3,2) = “am” then


Console.writeline(“Its 3rd and 4th characters are am”)
ENDIF
6 September 2021

Dim code as integer


Dim ch as char
Dim I as integer
Console.writeline (“Enter a code of 5 digits”)
Code = console.readline()
Ch = MID(code,1,1)
For i = 1 to 5
Console.writeline(ch)
Ch = MID(code, i ,1 )
Ch = MID(code,2,1)
Console.writeline(ch)
Console.writeline(ch)
Next
Ch = MID(code,3,1)
Console.writeline(ch)
Ch = MID(code,4,1)
Console.writeline(ch)
Ch = MID(code,5,1)
Console.writeline(ch)
Console.readkey

Qu. Write a program to enter two values M and N. Then program code must output all the integers
between M and N inclusive.
M = 12
Dim M, N, i as integer N = 17
Console.writeline (“Please enter value of M “) OUTPUT
M = Console.Readline

Console.writeline (“Please enter value of N “) 12, 13,14,15,16,17


N= Console.Readline

For i = M To N
Console.Writeline (i)
Next
Qu
Dry run the following given the following code

For i = 1 to 4
Console.writeline(“OK”)
Next
i output
1 OK
2 OK
3 OK
4 OK

Qu write a code to output all integers that are exactly divisible by 3 from 3 to 103. Do not use MOD
Use FOR loop
i
Dim i as integer 3 3
6 6
For i = 3 to 103 step 3 9 9
Console.writeline(i)
Next

i output
For I = 20 To 15 step -1 20 20
Console.writeline(i) 19 19
Next 18 18
17 17
16 16
15 15
13 September 2021

Write a program to enter the date of departure and date of arrival of a fishing boat. Output number of
days the boat was at the sea.

British Date dd/mm/yyyy 20/04/1980


US Date mm/dd/yyyy 04/20/1980

Variables (1) DateofDeparture


(2) DateofArrival
(3) NumberofDays

Module Module1

Sub Main()
Dim DateofDeparture, DateofArrival As Date
Dim NumofDays As Integer

Console.WriteLine("Enter the date of departure")


DateofDeparture = Console.ReadLine

Console.WriteLine("Enter the date of Arrival")


DateofArrival = Console.ReadLine

NumofDays = DateDiff(DateInterval.Day, DateofDeparture, DateofArrival)


Console.WriteLine("The number of days at sea is " & NumofDays)

Console.ReadKey()
End Sub

End Module
TO WORK OUT the pre-release Nov 2016 P22

Pseudocode: MOD
DIV returns the quotient

50 DIV 10 = 5
14 DIV 6 = 2
100 DIV 8 = 12

Write a pseudocode to enter a number and then output the quotient when it is divided by 4

DECLARE Num : INTEGER


DECLARE quotient : INTEGER

OUTPUT “Enter a number”


INPUT Num

Quotient = Num DIV 4

OUTPUT “The quotient of the number when divided by 4 is “, Quotient

20 September 2021
Qu 1 Give 3 Programming Concept.
1. Sequence
2. Selection
Examples of selection:
a. IF.. Else.. Endif
b. Case.. Endcase
3. Repetition/ Loop/Iteration
a. For..To..Next
b. While..Endwhile
c. Repeat..Until
4. Assignment
For example X← 20, X←Z+Y, count = count + 1
5. Totalling. Example TotalMark = TotalMark + Mark
6. Counting. Example Counter = counter + 1, Total=Total + 1

Qu 2 Write an algorithm, using pseudocode and a FOR..TO..NEXT loop structure or other loop structure,
to input 200 even numbers. If not even the user must enter the number again.

DECLARE Num : INTEGER


DECLARE index : INTEGER

CONSTANT NumberofValues = 200 Example of Repetition: FOR TO Next, Repeat Until


FOR index = 1 to NumberofValues Example of an assignment: Num MOD 2 = 0
Example of an Selection: IF NOT (Num MOD 2 = 0) 2
REPEAT
OUTPUT “Enter a number”
INPUT Num
IF NOT (Num MOD 2 = 0) 2
Then OUTPUT “ERROR. Please enter a number again.”
Endif
UNTIL (Num MOD 2 = 0)

NEXT

NOTE: There are two Loop structure in the above example


FOR TO NEXT and REPEAT UNTIL

27 September 2021
What is a database? It is a collection of tables. It can have a number of tables.

Qu Give the structure of the table.

Field name Data Type Field Size Description Suitable Validation


(byte)
HotelRef String 3 Reference number of hotel Length Check, Character
Check
NameHotel String 20 Hotel’s name Length check, Character
check
NumofStars Integer 1 Number of stars Type Check, Range Check
NumofRooms Integer 3 Number of Rooms Type Check, Range Check
Parking Boolean 1 Does hotel have parking Presence
PricePerPerson Integer 3 Price per person Range Check, type Check,
Character check
Distance Integer 2 Distance from airport Range Check, type Check,
Character check
33

1. How many records/tuples are there? Answer 8 2.


How many fields are there? Answer 7
3. Which field is used as primary key?
Primary key is a unique key which is used to identify a record. Examples: National Identity card
Number, Bank Account Number, Electricity or water Account Number.
Answer : Hotel Ref.
4. based on the table of structure, what is the length of one record? 33 bytes
5. What is the table size if the table consist 1000 such records? Answer 33000 bytes
6. Write a validation statement for Distance given that the highest distance is 100 Km Distance >=
0 AND distance <= 100
04 October 2021

Part of a database named PATIENT is shown below.

1. What is the table name? PATIENT


2. How many records are there? 12
3. How many fields are there? 6
4. Which field can be used as Boolean? Gender
5. What can be done to reduce the size of the record?
Answer: Some of the fields can be coded. For examples:
Gender can be coded as M for male and F for female
Disease can be coded as Blood Cancer with BC, Lung Cancer with LC and so on.

6.
(a Complete the table below with a query to display all patients who live at Riviere Du
Rempart.
Display their name, Fees Paid and Gender

FIELD NamePatient Address FeesPaid Gender

TABLE PATIENT PATIENT PATIENT PATIENT

SORT

SHOW   

Riviere Du Rempart
CRITERIA

OR

(b Complete the table below with a query to display all patients who live at Riviere Noire and and
have paid more than Rs 50000. Display their name, Fees Paid and number of days spent.

FIELD NamePatient Address FeesPaid DaysSpent

PATIENT PATIENT
TABLE PATIENT PATIENT

SORT

SHOW
  

CRITERIA
Riviere Noire >50000
OR

(b Complete the table below with a query to display all male patients who live either at
Riviere Noire or Amaury and have spent less than 10 days. Display their name and number
of days spent in ascending order of fees paid.

FIELD NamePatient Address FeesPaid Gender DaysSpent

PATIENT PATIENT PATIENT PATIENT


TABLE PATIENT

SORT Ascending

SHOW
 

CRITERIA
Riviere Noire Male <10
OR
Amaury

08 November 2021
Instruction Format:

Assembly language instruction.


Mnemonics : ADD, JMP, JNZ etc.

Normally an instruction has one or two parts.

Two Part : Operand and Operational Code (op Code)

Operand Opcode

For example Instruction


1. ADD 200
Where ADD is a mnemonic and 200 is a memory address
ADD is the Operand and 200 is the Opcode

2. DEC

Here we have only one part in the instruction. This means we have only the operand.
DEC is the operand

3. LDA #230
Load into the Accumulator the value 230.

LDA is the mnemonic and 230 is the data

Op Code can be either an address or Data

Complete the following table

Instruction Operand OP Code


Address Data
JNZ 1200 JNZ 1200
INC INC
ADD #120 ADD 120
STO 234 STO 234
HALT HALT

There are two types of Registers


General Purpose Register: Accumulator (ACC). It stores the result of a calculation or data needed for a
calculation
Special Registers:
1. Program Counter (PC): It holds/stores the address of the next instruction to be fetched and
executed.
2. Memory Address Register (MAR): it holds the address where the instruction to be fetched and
executed is held. The processor check the contents of the MAR to know exactly where in
memory is the instruction.
3. Memory Data/Buffer Register: This registers holds either a data or instruction that has been
fetched from the memory location.
4. Current Instruction Register (CIR): It holds the current instruction that is to be decoded and
executed.
It is in this register that the instruction is decoded and executed.
By decoded it means the instruction is split into operand and Op code

What are stored in the following registers:

Register Address Data Instruction


Program Counter (PC) 
Memory Address Register (MAR) 
Memory Data Register (MDR)  
Current Instruction Register 
Accumulator 

15 November 2021

Storage
Primary Storage
Secondary Storage
OFF Line Storage

Primary Storage
These storages are directly accessible by the processor.

Read Only Memory (ROM) and Random Access Memory (RAM)

ROM
It is a non-volatile memory which means that it keeps its contents (data/program) permanently. That is
its contents do not disappear when the power is disconnected.
Its contents cannot be deleted or altered.
ROM holds the
1. (Basic Input Output System) BIOS
2. Bootstrap: This program is used to start the computer
3. Any firmware for description of the manufacturer
Types of ROM
Programmable ROM (PROM)
Erasable PROM (EPROM0
Electrically Erasable PROM (EEPROM). This technology is used in Flash Memory

RAM
It is a volatile memory. It holds its contents temporarily. That is when the power is off, all its contents
disappear.
Its contents can be deleted or altered.
It is considered as the working space of the computer. Any program needs to be loaded into RAM for
execution.
Types of RAM: SRAM, DRAM NVRAM Contents
of RAM:
Part of the Operating system is held in the RAM
The program currently being executed
The data that are needed by the program

 Qu describe the contents of a ROM and RAM in a Washing Machine.


ROM contents:
Firmware (program written by manufacturer) to carry out simple tasks as washing, spinning, drying and
so on
Data such maximum level of water, maximum temperature for drying, maximum pressure for
spinning, maximum weight of clothes.

RAM Contents:
Input data such as time set for washing, drying etc.
Data received from sensors such the weight from weight sensor, water level from water level sensor
and so on

27 Nov 2021

16 `Free software, freeware and shareware

Free software
- Users have the freedom to run, copy, change or adapt free software. [cie] Examples include:
F-spot (photograph manager), Scribus (DTP)
- This software is free of charge. Can be downloaded and used. The source code of the software is
made available. The user can alter the source code to meet their needs and requirements.
- a user is guaranteed the freedom to study and modify the software source code in any way to
suit their requirements. [cie]
- it is not protected by any copyright restrictions.
- The originators of this type of software stress this is based on liberty and not price.

Essentially a user is allowed to do the following:

• run the software for any legal purpose they wish


• study the source code and modify it as necessary to meet their needs
• pass the software (in either original or modified form) on to friends, family or colleagues. A user of the
software doesn’t need to seek permission to do any of the above actions since it isn’t protected by any
copyright restrictions. However, it is important to realise that there are certain rules that need to be
obeyed. The user
• cannot add source code from another piece of software unless this is also described as free software
• cannot produce software which copies existing software subject to copyright laws
• cannot adapt the software in such a way that it infringes copyright laws protecting other software
• may not use the source code to produce software which is deemed offensive by third parties.

Summary
The user has the freedom to run, copy, modify or adapt the free software.
The user is availed with the source code which he can modify to suit his requirements.
The software is free of charge, does have any copyright.
The user can distribute the software to anyone without charging. It does not involve any cost.

Freeware
- FREEWARE is a software that a user can download from the internet free of charge.
- Once it has been downloaded, there are no fees associated with using the software
examples include: Adobe, Skype or media players.
- freeware is subject to copyright laws and users are often requested to tick a box to say they
understand and agree to the terms and conditions governing the software.
- Normally the user is not provided with the source code of the software.

Summary.
It is free of charge. No cost is involved. No licence fee to be paid.
Users can download and use the software only after having accepted the terms and conditions.
The software is copyrighted. This means it is protected by the law.

Shareware
• Users are allowed to try out the software free of charge for a trial period.
• At the end of the trial period, the author of the software will request that you pay a fee if you
like it.
• Once the fee is paid, a user is registered with the originator of the software and free updates
and help are then provided.
• Very often, the trial version of the software is missing some of the features found in the full
version, and these don’t become available until the fee is paid.
• Obviously, this type of software is fully protected by copyright laws and a user must make sure
they don’t use the source code in any of their own software.

Summary
1. This software is used for a certain period of time on trial basis free of charge.
2. Definitely the user is not provided with the full version of the software. This means some
features are missing and are available only after the user has registered.
3. After that period, the user can no longer use the software and therefore the user is given the
options whether to purchase.
4. To purchase the user has to pay a cost so that he\she can be registered for the full version of the
software.
5. The user is then provided with updates and helps.
6. Example of such software is antivirus software.
7. It is copyrighted. Must pay a fee for full version of the software and continue to use the
software.
8. On purchase the user gets a registration key/code.
9. Registration can be for a certain period of time and thus must be renewed.

29 Nov 2021

Firewalls
 A FIREWALL can be either software or hardware.
 It sits between the user’s computer and an external network (e.g. the internet).
 Filters information in and out of the computer.
 The firewall can be a hardware interface which is located between the computer (or internal
network external link) and the internet connection.

Tasks/purposes/functions carried out by a firewall:


1. examining the ‘traffic’ between the user’s computer and a public network (e.g. the internet)
2. checking whether incoming or outgoing data meets a given set of criteria
3. if the data fails the criteria, the firewall will block the ‘traffic’ and give the user
(or network manager) a warning that there may be a security issue.
4. logging all incoming and outgoing ‘traffic’ to allow later interrogation by the user
(or network manager)
5. criteria can be set to prevent access to certain undesirable sites; the firewall can
keep a list of all undesirable IP addresses.
6. helping to prevent viruses or hackers entering the user’s computer (or internal
network)
7. warning the user if some software on their system is trying to access an external
data source (e.g. automatic software upgrade); the user is given the option of
allowing it to go ahead or requesting that such access is denied.

Circumstances where the firewall can’t prevent potential harmful ‘traffic’:

• it cannot prevent individuals, on internal networks, using their own modems to bypass the firewall
• employee misconduct or carelessness cannot be controlled by firewalls (for example, control of
passwords or use of accounts)
• users on stand-alone computers can chose to disable the firewall, leaving their computer open to
harmful ‘traffic’ from the internet.
Summary
It prevents virus from entering a system/Prevents hackers to gain access to the system
It logs all the incoming and outgoing ‘traffic’
It checks whether data going out or coming in meets certain criteria. If it does not the access is blocked
by the firewall by giving a warning to the user.

04 Dec 2021

PROXY SERVER
1. It also known as Internet server.
2. PROXY SERVERS act as an intermediary between the user and a web server:

User’s Computer send a request to the web server to get access to a particular website.
This request goes through the Proxy server. It is the responsibility of the proxy server to check whether
to grant forward or block the request based on certain criteria.
If not blocked, the request is forwarded to the web server.
The web server then send the response to the proxy server.
The web server response is filtered by the proxy server and is forwarded to the user’computer

Functions of proxy servers


• allowing the internet ‘traffic’ to be filtered; they can block access to a website if necessary (similar type
or reaction as a firewall)
• by using the feature known as a CACHE, they can speed up access to information from a website;
when the website is first visited, the home page is stored on the proxy server; when the user next visits
the website, it now goes through the proxy server cache instead, giving much faster access
• keeping the user’s IP address secret – this clearly improves security
• acting as a firewall. This means it has the same functions as a firewall

Proxy server is a computer system


Security Protocols
Commerce:- Trade – buying and selling of goods and services
Transportation
Banking
Insurance

Electronic Commerce: commerce on Internet. Market place on Internet.

Two forms of security protocols when using the internet:


• Secure Sockets Layer (SSL)
• Transport Layer Security (TLS).

SECURE SOCKETS LAYER (SSL)


 Is a type of protocol (a set of rules used by computers to communicate with each other across a
network).
 This allows data to be sent and received securely over the internet.
 When a user logs onto a website, SSL encrypts the data – only the user’s computer
and the web server are able to make sense of what is being transmitted.
SSL encrypts data being transmitted over Internet. Only the user’s computer and the web server
will able to make sense of the data.
 A user will know if SSL is being applied when they see https or the small padlock in the status
bar at the top of the screen.

What happens when a user wants to access a secure website and receive and send data to it?

 INTERNET
Web Server

User’s Computer

1. The user’s computer web browser sends a message so that it can connect with the required
website which is secured by SSL. [cie]
The user’s computer uses its web browser to send its request to the web server. SSL encrypts
the request and then forwarded to the web server
2. The web browser asks the web server to identify itself.
3. The web server responds by sending a copy of its SSL certificate to the user’s web browser.
4. The web browser checks the authenticity of the certificate. If the certificate is authentic then
the web browser will send a message to the web server to start communication. Otherwise no
communication will start.
5. Once the message is received, the web server acknowledges the web browser.
6. The SSL two-way data transfer begins.
6 Dec 2021

TRANSPORT LAYER SECURITY (TLS)


It is an updated version of SSL. That is, it is similar to SSL but is a more recent security
system.
It is made up of two layers- record protocol and handshake protocol
It is essentially designed to provide encryption, authentication and data integrity in a more effective
way than its predecessor SSL.
TLS is a form of protocol that ensures the security and privacy of data between devices and users when
communicating over the internet.
When a website and client (user) communicate over the internet, TLS is designed to prevent a third
party hacking into this communication causing problems with data security.

Authentication:
Authenticity is the need to identify who sent the data and verify that the source is legitimate.

Data Integrity is that data should reach its destination without any changes.

TLS is formed of two layers:


• record protocol:
 It is one of the two TLS layers
 It can be used with or without encryption
 It contains the data being transferred over the internet.
• handshake protocol:
 It is one of the two TLS layers
 It permits the website and the client (user) to authenticate each other.
 It allows to make use of encryption algorithms for a secure session between client and website
when the session is established.
DIFFERENCE BETWEEN SSL and TLS
• It is possible to extend TLS by adding new authentication methods.
• TLS can make use of SESSION CACHING which improves the overall performance compared to SSL
• TLS separates the handshaking process from the record protocol (layer) which holds all the data.

Handshaking means exchange of signals between to devices over a network in order to establish
communication. For example computer to modem and so on.

Session caching
When opening a TLS session, it requires a lot of computer time (due mainly to the
complex encryption keys being used.
The use of session caching can avoid the need to utilise so much computer time for each connection.
TLS can either establish a new session or attempt to resume an existing session; using the latter can
considerably boost system performance.

Session Caching refers to the attempt to resume an existing session so as to considerably boost system
performance.

8 Dec 2021

Symmetric Encryption.
1. Plain Text
2. The encryption of the plain is done using a Secret Key.
3. Both the sender of the message and the receiver must know the secret key.
4. The sender use the secret key to encrypt the message (cipher Text) and then both the cipher
text and the secret key are sent to the receiver.
5. Hacker can intercept the secret key and thus be able to decipher the message.
Asymmetric encryption
There are four main security concerns when data is transmitted:
1 Confidentiality is where only the intended recipient should be able to read or decipher the data.
2 Authenticity is the need to identify who sent the data and verify that the source is legitimate.
3 Integrity is that data should reach its destination without any changes.
4 Non-repudiation is that neither the sender nor the recipient should be able to deny that they were
part of the data transmission which just took place.

 Each user gets a unique pair of keys (private key and public key).
private key and public key (H,I)

Rita Honey private key and public key


(A,B)

Internet

Fred Bobby

private key and public key (F,G) private key and public key (D,E)

 The public key of user is known to everyone who wants to communicate with the user.
For example, the public key of User 3 is known to user 1, user 2 and so on whereas the private key is
known only to the user and not others.
 Let Bobby is sending a message to Fred
Bobby uses the public key of Fred to encrypt the message. The encrypted message (cipher text)
is then sent to Fred.
Fred will use his private key to decrypt the message.
Will not it be possible for Honey to intercept the cipher text and decrypt it using his private key?
No, because Honey’s private key and the Fred’s public key used to encrypt the message will not
match as a UNIQUE pair of keys.
With asymmetric encryption, the message will be confidential.

Note
Each user who wants to send a message on a network a unique pair keys.
The pair of keys are private key and public key
The sender uses the receiver’s public key to encrypt the message.
Only the intended receiver will be able to decrypt the message by using his private key. This is because
the private key and the public key used for encryption form the legitimate unique pair of keys.
08 January 2022

Qu 1 Write the following denary in hexadecimal using 8 bits:


(i) 122
(ii) 34

12 6 3 1
8 4 2 6 8 4 2 1
       
Answer: 7A  0  1  1  1 1 0 1 0
Answer: 22
12
8 64 32 16 8 4 2 1
0 0 1 0 0 0 1 0
Qu 2
(i) Draw and complete the truth table for the following Boolean expression

[4]
Truth table:

a.b a'.
a b X b' ' a' b
0 0  0  1 0   1 0 
0 1  1  0  0  1  1
1 0  1  1 1   0  0
1 1  0  0  0 0  0 

(ii) Write the simplified Boolean expression of

Simplified expression: X = a XOR b

Qu give one purpose of an interrupt.


-To allow multitasking.
-to seek the attention of the processor
Qu complete the following table:

Uni
Directional

Bi-
directional

Qu
(a) What is COMPUTED TOMOGRAPHIC (CT) SCANNER? [2]
(b) How tomographic technology is used? [3]
(c) Give two different names of tomographic scanner. [1]

Answer
(a) COMPUTED TOMOGRAPHIC (CT) SCANNERS are used to create a 3D image of a solid object. They are
3-D scanners. / They are 3D scanners to create 3D image of a solid object.

(b)
To build up an image of the solid object through a series of very thin ‘slices’.
Together these 2D ‘slices’ make up a representation of the 3D solid object.
Each slice is built up by use of X-rays, radio frequencies or gamma imaging.
Each ‘slice’ is then stored as a digital image in the computer memory.
The whole of the solid object is represented digitally in the computer memory.

(c)
• X-rays: CT scanners computerised tomography
• radio frequencies: MRI magnetic resonance imaging
• gamma rays: SPECT single photon emission computed tomography.

Past exams paper as from February 2022.

15 January 2022
Qu an advantage that a programmer would get if he/she program code in assembly language.[2]
1. The program takes up less memory space.
2. The program runs faster than if it would have been developed in high level language.
3. Can write instruction to make use of special hardware.
Q2. Explain how an error detection method can be used to detect error on arrival of a message at its
destination. [4]

1. Automatic Repeat Request (ARQ)


It makes use of ACKNOWLEGEMENT and TIMEOUT.
IF the sender does not receive an ACKNOWLEDGEMENT from the receiver within the TIMEOUT, the
sender retransmits the data until the sender receives the ACKNOWLEDGEMENT.
2. Parity check
The sender calculates the ……parity………… ………bit……. for each byte of data being sent using
the agreed ………parity……. …………check……………… The byte of ……parity bits……. is sent together
with the bytes of data. On arrival the receiver recalculates the ……………parity……….. ……………
bits……………. And compare with the one received.
Storage devices

Hard disk drive (HDD)


 It is the most common method used to store data.
 Data is stored in digital format on the magnetic surfaces (platters) of the disk.
 The hard disk has a number of platters.
 The platters can spin at 7000 times a second.
 Each platter has two surfaces which can be used to store data.
 Normally each platter has their own READ/WRITE heads to access data on the surfaces of the
platters.
 These READ/WRITE heads can move very quickly.
 Data are stored on the surface in sectors and tracks.

Advantage
Very large volume of data can be stored.
Can rely on a it is most commonly used technology

Disadvantage:
Hard disk drive has very slow data access as compared RAM
LATENCY: many applications require the READ/WRITE heads to constantly seek for the correct blocks of
data. This means a large number of head movements.

LATENCY is defined as the time it takes for a specific block of data on a data track to rotate around the
READ/WRITE head.

Q1. Describe two precautions against


(1) Pharming
(2) virus

virus
precaution:
Use of an up-to-date antivirus software.
Do not open suspicious emails.
Use of firewall to detect and block virus.
Do not download and install software form unknown sources.
Must be very careful using free internet connection in public.
Pharming
Use anti-spyware software that can identify and remove Pharming code
The user should always be alert and looks out for clues that they are being redirected.
Do not surf on website not having the padlock in its URL.

19 Feb 2022

Latency is defined as the time it takes for a specific block of data on a data track to rotate around to the
read–write head.
Users will sometimes notice the effect of latency when they see messages such as ‘please wait’ or, at its
worst, ‘not responding’.
Solid-state Drives (SSD)
SOLID-STATE DRIVES (SSD)
Examples: Pendrive, SD Card, Flash Memory
1. They have no moving parts and all data is retrieved at the same rate. No moving parts means
they are robust.
2. They don’t rely on magnetic properties.
3. The most common type of solid-state storage devices store data by controlling the movement of
electrons within NAND chips.
The data is stored as 0s and 1s in millions of tiny transistors within the chip. This effectively
produces a non-volatile rewritable memory. This means the contents of the storage can be
deleted, modified or added and they are permanent. Here NAND technology is being used.
4. A number of solid-state storage devices sometimes use ELECTRONICALLY ERASABLE
PROGRAMMABLE READ-ONLY MEMORY (EEPROM) technology. This means NOR chip is used
instead of NAND chip
5. EEPROM technology makes them faster in operation than using NAND technology.
6. But devices using EEPROM are considerably more expensive than those that use NAND
technology.
7. EEPROM also allows data to be read or erased in single bytes at a time. Use of NAND only allows
blocks of data to be read or erased. This makes EEPROM technology more useful in certain
applications where data needs to be accessed or erased in byte-sized chunks.
8. Because of the cost implications, the majority of solid-state storage devices use NAND
technology.
9. The two types are usually distinguished by the terms FLASH (use NAND) and EEPROM (use NOR).

Differences between FLASH( Use NAND) and EEPROM (use NOR )


FLASH( Use NAND) EEPROM (use NOR )
Flash Memory uses NAND technology EEPROM uses NOR technology
It is cheaper. Majority SSDs device make It is more expensive
use of NAND technology
It is slower in operation It faster in operation
Use of NAND only allows blocks of data EEPROM also allows data to be read or
to be read or erased. erased in single bytes at a time. This makes
EEPROM technology more useful in certain
applications where data needs to be
accessed or erased in byte-sized chunks.

NOTE never compare two storage devices in terms of storage capacity. For example give a difference
between HDD and SSD.
HDD has larger storage capacity than SSD. X Never such answer. You will get Zero Mark

Main benefits of using SSD rather than HDD:


• they are more reliable because they do have no moving parts to go wrong.
• they are considerably lighter which makes them suitable for laptops.
• they do not have to ‘get up to speed’ before they work properly.
• they have a lower power consumption.
• they run much cooler than HDDs (these last two points again make them very suitable for laptop
computers)
• because they have no moving parts, they are very thin
• data access is considerably faster than HDD. There is no problem like latency.

Give two reasons why SSD is more suitable for laptop


1. they are considerably lighter which makes them suitable for laptops.
2. they have a lower power consumption.
3. they run much cooler than HDDs

Drawback of SSD
1. It has a shorter longevity than HDD.
2. SSD endurance is lower than HDD. This is why they are not used in servers where a huge
number of write operations take place every day.

What is meant by SSD endurance?/ Explain SSD endurance


Most solid state storage devices are conservatively rated at only 20 GB write operations per day over a
three-year period – this is known as SSD endurance.

Explain why SSD is not used in servers?


1. Because the endurance of SSD is lower than that of HDD.
2. Most solid state storage devices are conservatively rated at only 20 GB write operations per day
over a three-year period – this is known as SSD endurance.
For this reason, SSD technology is not used in servers, for example, where a huge number of
write operations take place every day.

You might also like