mot so cau hoi ve may tinh
TRANSCRIPT
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
1/36
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
2/36
1. Central Processing Unit (CPU).- CPU is the heart of the whole sys- CPU consists of the :
control unit (CU)
arithmetic logic unit (ALU)
accumulator (ACC)
program counter (PC)
instruction register (IR)
memory address register (MAR)
memory data register (MDR)
status register (SR)
general purpose register- The function of each components of CPU:
Control unit: control and co_ordinate all hardware functions of the
CS.
examine and decode all program instructions to thecomputer and initiate their execution by sending theappropriate signals.
ALU: performs all arithmetic and logiccomparision two values functions required bycomputer.
ACC: holds the first operand of the temporary result of the
ALU.
PC: contains the add of the next instruction to be
excuted.
IR: contains the current instruction to be executed.
Main memory
MAR: holds the address location to or from which data is to
be transferred
MDR:
contains the data to be written to or read out of theaddressed location.
SR: keeps track of the status of the accumalator.
General Purpose Register: for general purpose procedures.
Please refer to diagram for an illustratin of the basic components of the CPU.
2
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
3/36
IN
T
E
RN
AL
CPU
Control unit
Arithmetic Logic Unit
Accumulator
Program Couter
to main
Instruction Register
memory
Memory Address Register
Memory Data Register
Status Register
General Purpose Register
Basic components of a CPU.
Control Unit
Input Unit ALU OutputUnit
Main Memory
Backing Storage
Control signalsData flow
Components of a CS.
2. Input units- Used to enter data( raw unprocessed facts) and instructions to
the computer.3. Output units
- Used for delevering the processed result from the computer inuseful form.
4. Backing storage units
3
BUS
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
4/36
- Backing storage units need for high capacity data storagedevices that can store data in a more permanent form for laterretrieral, updating and referencing.
- Backing storage is also called secondary storage externalstorage and auxiliary storage.
Chapter 2: MICOPROCESSOR.Question 1. Cache Memory?
- Cache memory is a small amount of very fast store with fasteraccess time than the main memory.
- Cache memory is used to temporaryty store data instructionsthat are likely to be retrieved many times, thus speeds up theprocessing of data.
- Sits between main storage and the processor acting as holdingarea through which all data and instructions pass.
- Old data in the cache memory is over written by new then cacheis full.
Question 2.Virtual Memory?
- Virtual memory makes use of both the main memory andbacking store.- In a virtual memory sys, each user has the illusion that his
program is in the main memory all the time.- The sys maintains this illusion by keeping some of the unused
portion of the programs code and data on a backing store devicewhich is usually magnetic disk
- The movement of the unused portion from the backing store tothe mian memory is transparent to the users.
- Please refer to diagram for virtual memory.
Backing Store Main Memory
Virtual MemoryChapter 3: BATCH/ ONLINE AND REAL TIME PROCESSING SYSTEM.Question 1.Batch Processing System?
- Def: Computer processing does not begin until all the input datahas been collected and grouped together called BatchedGenerally data is accumulated for a certain period of time or unitla certain quantity.
4
A3
A1
A2
A2
A3
A1
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
5/36
- Ads: Response time is not critical. Need to process large volumn of data. Computer efficiency is more important than response
time.- Dis:
Time between recording and processing of sourcedocument is long
Rereen normally required if errors are encountered. Data is not current. Error correction is more difficult.
Question 2.Online Processing System?- Def: Inputs data enters the computer directly as soon as it is
being transacted. There information will be processedimmediately and updated into the master file.
- Ads: Enter availability of information for decision making.
More accurate data capture. Schedules suits user.
- Dis: CPU time is used less efficiently. Random arrival of transactions, terminal operator
process each transaction separately. More expensive than batch processing.
Question 3.Real Time Processing System?- Def: One which controls the environment by receiving data
processing them and returning results sufficiently quickly to
affect the functioning of the environment at that time.- Ads:
Response time is very critical and sufficient quick.- Dis:
Expensive hardware & software. Very complex in terms of hardware & software.
Chapter 4: PRINTERS AND TERMINALS.Question 1.Classification of printers?
1. Classifying printers according to speed.a. Serial printersSlow printers that print one character at a time.
Eg: Dot matrix printersDaisywheel printers
b. Line printersMedium to high speed printers that can print in excess of 2000 linesper minute.Eg: Chain Printers
Band PrintersDrum Printers
2. Calssifying printers according to method of printing
5
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
6/36
a. Impact printersUse hammers or prints to strike a print rebbon in order to form thecharacter on the paper.b. Non impact printersUse more silent methods of printing.Eg: Thermal printers
Ink Jet printersLazers printers
3. Classifying printers according to print qualityKinds of quality printersDraft qualityNear letter quality(NLQ)Letter qualityGraphic quality
Question 2.Describe some types of printer?1. According to speed:
a. Dot matrix printer
- Serial impact printers that can print draft, near letter quality anda limited amount of graphics.- The print resolution is generally lower than lazer printers.b. Daisywheel printers- Are serial impact printers, the speed of a daisywheel printer is
slow(20-55 characters per second), noisy in operation.- The print head has the letters arranged at the end of spokes
round a central hub.c. Chain printers- The chains printers has its characters set rapidly rotating on a
print chain.
d. Band printers- The band printer has rotating scalloped steel band.e. Drum printers- Are line printers, the print character are raised in bands around a
heavy metal drum which rotates at very high speed.- The print hammers strike the paper and a print ribbon against an
apropriate character on the line. An entire line of the samecharacter is printed on one rotation of the drum.
f. Thermal printers- Uses special heat sensitive paper and a matrix of print wires that
become hot when exposed to an electric current. The heated
wires come into close contact with the paper, burning the imageof the character onto it.- The more advanced thermal printers are using thermal transfer
printing.- They have a special heat sensitive ribbon and a print head with
wires that become hot when a currents is applied.- The heat from the print wires causes the ink from the ribbon to
fuse to a piece of regular paper.g. Inl Jet Printers
6
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
7/36
- The ink jet prints by using a small droplet generator to breakspecial inks into tiny drops, which are then forced towards apaper supply.
h. Lazer printers- Using a photoconductive drum.- A lazer is then used to write the image of the character onto the
drum.- After exposure to the lazer, the drum rotates through a
developing station, picks up toner and transfers it to the paper.- The character is fused onto the paper by heat.i. Ion deposition printers- Ions are created in a cavity, and directed electrically through an
orifice onto the dielectric surface of a rotating cylinder.- The required characters are formed as an electric charge image
on the cylinders surface.- Toner is the applied to the charged image and transferred to the
paper on which it is transfixed by pressure(cold fusion).
j. Electrostatic printers- Letterheads and logos are created electrostatically from achangeable metal cylinder.
k. Magnetic printers- A drum in the printer has a surface that can be coated with sows
of tiny spots of magnetion by means of thousands of minuterecording heads.
- As the drum rotates it becomes covered with these magneticspots so as to from a latent image of the page to be printed.
- Dry ink particles are brought into contact with the drums surfaceand these adthere to the magnetised spots. The ink was then
pressunal on to the surface and subsequently transferred ontothe paper.Question 3.Characteristics of a page printers?
- Speed- Characters sets- Copies- Intelligence- Output
Chapter 5: DATA STORAGE MEDIA.Question 1.Data storage Requirements Characteristics?
- Low access time: fast speed
- Storage capacity: much enough- Interchangeability: can be change easily- Security: safe enough- Transfer rate: fast enough- Cost: economic
Question 2.Magnetic disks?- This comprises a drive unit onto which one or perhaps two
magnetic disk cartridges are loaded.
7
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
8/36
- The drive consists of a control unit and a spindle housing thatrotates continuously when switch on.
- The cartridge are loaded by the operator so as to provide thedata currently needed for the job in hand.
- Bach tracks is devided up into sectors(often 4 or 8), sectors areread or written or more at a time as blocks by means of a read.
- There are usually one head for each surface, all the heads aremoved.
- Sunchronously across the tracks.- Once in position all the data on the equiradial tracks can be read
or written without further movement of the heads.- Cylinder is a set of equiradial tracks.- A cartridge comprises several flat disks mounted on a central
sprindle. When mounted it rotates at a high speed enabling datato be read from or written to it. The data is recordedmagnetically on both surfaces of each disk in the form ofconcertric tracks.
Certain models of disk units also have a number offixed read/write heads in addition to the movableheads.
The fixed head are positioned permanently overcertain of the outer tracks, there being one head pertrack, so climimating the need for head movement.
- The heads are very close disk surface.- Curshion of air carried by the rotating disk.
Question 3.Winchester disks( hard disks )?- Comprises a number of platters(disks) permanently into an
airtight enclosure.- All dust is excluded thus perimiting the read/write heads to be
positioned even closer to the surfaces and so enabling greaterrecording densities to be employed.
- The disks have greater storage capacity and a higher rate ofdata transger.
- It has the lubricated surfaces allowing the heads land when theplatters cease to rotate, so eliminating head crashes.
- Winchester platters are either 14 in, 8 in, 5 in or 3 indiameter.
Question 4.Floppy disks?
- Diskettes, generally called floppy disks, are single disks made offlexible plastic and permanently housed is an envelope.
- The data on floppy disks is in concentric tracks on the outer partof the surfaces and access to it is via slot in the envelope.
- The most common size are 3 in, 5in, and 8 in diameter disks,the 3 in disks have the advantages of a shutter.
- Floppy disks may be either single or double sided and of coursethe drive needs to be correspondingly equipped.
8
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
9/36
- Both the drives and the floppy disks themselves are inexpensivewith the result that they have come into extensive used by smallbusiness and home computer buffs.
- The range of capacities is from 1/4 to 2 megabytes and transferrates around 125 to 250 kilobytes per seconds.
Question 5.Optical disks?- Optical disk are comparatively new development for data
storage.- Optical disks consist of a single removable glass, plastic or metal
disk coated on one side with tellurium and protected by a 1 mmlayer or transpacent plastic.
- The disk diameters are mostly between 8 in and 14 in they rotateon a spindle in a similar fashion to magnetic disks.
- The data is recorded in the form of minute pits burned into thetelliurium coating by a finely-focused lazer beam.
- Optical disks hold between 0.7 and GBs, this is about 20 timesgreater than magnetic dis cartridges.
- The data is read by a low power laser beam which moved acrossthe surface and is reflected into a photo cell.- Optical disks rotate mostly at 1500 r.p.m which, allowing for the
movement of the laser unti, given access time of between 16 &500 ms and data transfer rates of 0.6 to 3 MVs per second.
- The draw back of optical disks is that the data cannot be erasedso making them non-rewriteable.
Question 6.Mass storage media?- Mass storage media is a high capacity disk system as when
necessary by transferring data from a number of datacartridges house in cells.
- Each cartridge consists of a 3 in wide magnetic modium inside aprotective cover- In order to load the disk system, the data cartridges are moved
automatically from the cells.- A typical system consists of 9440 cartridges giving a storage
capacity of 472000 million bytes.Question 7.Magnetic drums?
- A magnetic drum consists of a cylinder upon the surface of whichdata is stored in magnetic form in tracks running around itscircumference, each track has its own read/write head.
- A typical magnetic drum has 800 tracks each capable of holding
5000 bytes.Question 8.Charge_coupled Device Memory (CCD)?
- CCD consists of thousands tiny metal squares each capable ofholding an electric charge, thus representing a bit.
- The squares are in the form of an array 64 x 64 holding 4096bits.
- It is very impact.- CCD is volate lity storage.
Question 9.Magnetic Bubble Memory?
9
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
10/36
- A thin wayer of magnetic garnet is capable of containing tinydomains or cylinders of magnetism, called bubbles.
- By erasing unwanted bubbles, the resultant presence of abubbles represent a 1 or a 0 bit.
- The main ads are low power consumption, compactness,robustness reliability and non-volitility.
Question 10.Megnetic tape?- The magnetic tape usage is now more as a backup medium
rather than a primary method of backing storage.- It is often used as a depositony for disk dumped from fixed data
storage.- It is in reells of up 3600 feet and is made of Mylar plastic tape,
1/2 in wide and coated with a magnetic material on one side.- The data is read from one read and written to another.- A reel of tape is loaded on a magnetic tape drive, and so as
many drives are needed as reels during a processing run.- It is used as a backing medium than a primary method of
backing storage.- The seconds usually have to be sequence where store inmagnetic tape.
Chapter 7: COMPUTER FILES.Question 1.File Processes?
1. Sortinga. The records in logical file are brought into some sequence as
determined by key in the records.b. A computer is capable of sorting record into a nested
sequence.c. Sorting is done by a sorting generator. This is part of the
computers software and comprises several sophisticated sortingtechniques that are called into use according to the file and thesort requirements.
d. The need of sorting has dimished in line with the demise ofmagnetic tape as backing storage.
2. Merging- Merging implies that two or more files in the same sequence are
combined into one file.a. File merging
Two or more separate files of similar secondsand in the same sequence are marged
together so as to form one file.b. Record merging
The records from two or more input files,usually in the same sequence, are combinedone record in the output file.
3. Matchinga. Two or more input files (generally in the same sequence) are
compared records against record in order to ensure that there isa complete set of records for each key.
10
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
11/36
b. Masmatched records are highlighted for subsequent action4. Summanizing
a. Records with the same key in one file are accumulated togetherto form one record in the output file.
b. Summanizing usually applies to a file presorted into a certainsequence and the resultant file is in the same sequence.
c. Records to be summarized are generally of a similar type.5. Searching
a. Searching is looking for records with certain keys or holdingcertain data and in some way making a note of these.
b. An instance is a search for and count of all records with a debtbalance of above a certain amount.
6. Information retrievala. Information retrieval is the process that involves the bringing
together of data from several files.b. Data may also be extracted from several files and combined
before being presented as information.
Chapter 8: DIRECT ACCESS FILE ORGANIZATION AND STRUCTURES.Question 1.Storage and Access Modes?There are 3 principal modes for storing and accessing accords on a disk ordrum:
1. Serial mode:- The record are stored contigously regardless of their keys- The sole way of accessing serial seconds is to search through the
complete file starting with the first record.- It is sometimes possible to partition a serial files thus reducing
the search time by starting the search at the beginning of aknown partition.
- A serial file is normally of a temporary nature awaiting sortinginto a useful sequence.2. Sequential mode:
- direct access sequential mode normally involves accessingsequential a file that is stored sequentially.
- sequential mode is often associated with a master file held in acertain sequence and updated by a transaction file sorted intothe same sequence.
3. Indexed_sequential/ selective_sequential mode- Indexed_sequential is a mode of storage where by records are
held sequentially and accessed selectively.
- Groups of unrequired records are skipped past.- Indexed sequential files may also be accessed haphazandly.4. Random modes:
- Each record is stored in a location determind from the secondskey by means of an add generation algorithm.
- The only erricient way to find a record is to use the algorithm- Random mode is applicable to master files
Ads of random modes No index is required thus saving storage space
11
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
12/36
It is a fast access method because little or nosearching is involved
Transaction do not need storing, thus saving time New records are easily insertly into the random file
provided they are not excessive in number
Dis
The main problem with the random mode is inachieving a uniform spread of records over thestorage are allocated to the file
Question 2.Direct Access Addressing?- The key of record is used to identify by record- The key of record also is used to decide its storage location(or
address)1. Self addressing:
- Self addressing is a straight forwards method because a recordsaddress is equal to its keys value
- The file is inevitably stored in key sequence
Ads of self addressing It leads directly to the wanted record No indexing or searching is required The key itself need not necessarily be held within the
stored record- although it generally is
Dis
The storage space per second has to be the same
When records one missing, storage locations relatedto its must be left empty
2. Self addressing with key conversion
- This method a basically similar to self addressing except that thekey required a little processing to turn it into the recordsaddress
- This leads to either a pricise address3. Matrix addressing
- In somes case, it is necessary to find the add of a record heldwithin a multi dimensional matrix of record its called matrixaddressing.
Question 3.Direct Access Searching?- Where as addressing determines the location of a record by
using algorithmic methods, searching finds the record by
scanning groups of records, and index, or both.- ]The simplest method is to examine every record a file until the
required record is found a shortcut is generally desiable.1. Indexed sequential searching
- A cylinder index is created to hold the highest cylinders key- Associated with each cylinder is a block index holding the
highest key in each block within that cylinder- When searching for a records key in the index
12
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
13/36
The cylinder index is examined key_by_key until oneis found that is larger than or equal to the wantedkey this directs the search to the appropriate blockindex
The block index a similarly examined and the search The block is searched record by record until the
wanted record is found2. Binary searching( binary chopping )- The key in the index to be binary search must be in sequence
and form a complete set- The search starts at the midpoint of the index and then moves
half way to the left or right(down or up) depending upon whetherare wanted key is less than or greater than the midpoint key
- In pracice, the index is unlikely to as convenient as this examplebecause it is not always possible to exactly halve each sucessivemove(complete exact holvingis possible only when the totalnumber of keys in the index is 20-1)
- The average number of examinations comparisons is (log2k)-1
( kis the number of keys in the index)
3. Block searching- A block is a subdivision of an index. A block is devised to contain,
roughly the square root of the number of keys in the whole index- The search is first through the block index to find the appropriate
block and then through this to find the wanted key- The average number of examinations is square root k (k is the
total number of keys)4. Balanced binary tree searching
- A binary tree is a relationship of keys such that the examination
of any key leads to one of two other keys- The binary tree is actually in the form of an index containing all
the keys together with a directory showing the brachesstemming left and right from each key
- Binary tree searching is suitable for an unsequenced file- The search is similar to binary searching in that each key
examination holves the rinaining keys, on averageChapter 11: INTRODUCTION TO ARTIFICAL INTELLIGENCE.Question 1.AI?Atificial IntelligenceIt has three braches
1. Expert systems (or knowledge- base system)- ESs are programs that contain the knowledge of human expert,
encoded so a computer can understand it with encated-knowledge seasoning machinism, ES can tackle problem thatare beyond the seach of conventionally programmed computers.
2. Natural language systems (everyday native language)- Natural language systems are programs that understand the
native language of the user, such as E
13
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
14/36
- The most popular natural language systems are those that act asinterfaces to data bases
3. Simple perception systems (for vision, speed and touch)- They can interpret visual scenes and decide if object meet
inspection standards and quality control criteria, or move a robotto the proper location ot grasp a part for manufacturing
Question 2.Who does the updates?- Updating the knowledge bases is very diffirent when with
updating databases because of the difference in the type ofinformation and in the cause and effect relationship contained inknowledge bases
- A knowledge in the area, when databases may be modified by anormal users
Chapter 12: EXPERT SYSTEMS.Question 1.What is an ES( Expert system )?An ES is a knowledge-intersive program that solves a problem that normallyrequires human expertise
Characteristics of ESs- They solve problems as well as or better than human experts- They use knowledge in the form of rules or frames- They can consider multiple hypotheses simultaneouly
Types of ES- An assistant
Is the leasts expert or lowest level ESs It helps a decision maker by doing routine analysis
and porting out those portion of the work wherehuman expertise is required
- A colleage
The new discusses the problem until a joint decissionis reached
When system is going wrong, the user adds moreinformation to get it back on track
- True ES Is a system that advises the user without question There are no practical areas today in which decission
Question 2.A ES Life Cycle (ESLC)?- An accepted SDLC for expert systems has yet to be developed
There are 6 phases life cycle in an ES1. Phase1 Selection of an Appropriate Problem
- Phase 1 involves finding an appropriate problem for an ES,indentifying an expert to contribute the expertise
- Establishing a preliminary approach- Analysing the cost and benefitsPreparing a development plan
2. Phase 2 Development of a prototype system- A prototype sys is a small version of an ES designed to test
assumptions about how to encode the facts, the relationshipsand the knowledge of experts
14
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
15/36
- The prototype permits the knowledge engineer to gain theexperts commitment and to develop a deeper understanding ofthe field of expertise
- Other subtasks in this phase: Learning about the domain and the task Specifying performance criteria
Selecting an ES building tool Developing an implementation plan Developing a detailed design for a complete system
3. Phase 3 Development of a Complete System- The main work in this phase is the addition of a very large
number of rules- The knowledge base has to be expanded to full knowledge base
appropriate to the real world and the user interface has to bedeveloped
2. Phase 4 Evaluation of the system- This phase involves testing the system against the performance
establised in earlier stages5. Phase 5 Intergration of the system
- The ES has to be intergrated into the data flow and work patternsof the organization
- In this stage, the expert system has to be interfaced with otherdatabases, instruments and hardware.
6. Phase 6 Maintenance of the system- The maintenance of the ES involves is updating, charging in the
system when operating. When operating, more problems occur inthe system, so it is necessary to continue take care the systemby expert in a fix period of time
- So expert system, are so complex that in a few year themaintenance costs will equal the development costs.
BOOK II: Computer systems architecture.Chapter 1 2: NUMBER BASES.Question 1.Common number bases used in computer hardware operation?
Decimal(denary) system:- The base is ten there are 10 different symbols, the digits 0, 1,
2, etc...upto 9- To represent value less than ten involves only one digit larger
values need two or more digits
Binary system- The base must be two, with only the digits 0 and 1 available- To show values of two or ever require two or more binary digits
Octal system- Octal system has eight as its base, it uses the symbol 0, 1, 2 up
to 7 only- Two or more digits are needed for values of eight and above
Hexadecimal system(hex)
15
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
16/36
- Hexadecimal system has sixteen as its base, it use the symbols0, 1, 2...,9 & A, B, C, D, E, F, to stand for the digits ten, eleven,twelve, thirteen, fourteen, fifteen.
Question 2.Converting from Bases To Bases?1. Change the decimal
- Binary:Eg. (2559) 10
2559 11279 1
639 1319 1159 1
79 1 (2559)10 =(10111111111)2
39 119 19 1
4 02 10 0
- Octal:7690 8
49 96,1 810 16 120 8
40 15 8
(7690)10 = (17012)8- Hexadecimal:
6396 16159 399 16156 79 24 16
C F (6369)10 = (CF81)16
2. Convert to others from binary- To decimal(101010)2 (?)10
1.25 + 0.24 + 1.23 + 0.22 + 1.21 + 0.20 = 42
(101010)2 = (42)10
16
2 1
0 71
1
1
2
21
1
5
8
11
1
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
17/36
- To octal
100101101
1st step change into denary
= 1.28 + 1.25 + 1.23 + 1.22 + 1.20
= 256 + 32 + 8 + 4 + 1
=(301)10 2nd step: convert to octal
301 861 37 8
(301)10 = (455)8 (100101101)2 = (455)8- To hexadecimal
110111011011
1st step= 1.211 + 1.210 + 1.28 + 1.27 + 1.26 + 1.24 + 1.23 +
1.21 + 1.20
= 2048+ 1024 + 256 + 158 + 64 + 16 + 8 + 2 + 1= (3547)10
2nd step3547 16
384 221 1627 61
(3547)10 = (CCA)16 (110111011011)2 =(CCA)16
3. Convert into binary and display the answer in normalized exponentialform
247 1123 1
61 130 115 17 13 11 10 1
(247)10 = (11110111)2= 0. 1111011 x 2normalized exponential form
Question 3.Integer and Floating point arithmetic?
17
5 5 4
1
11
3
13
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
18/36
1. Floating point Additiona. (0.1011 x 25 ) + (0.1001 x 25 )
= (0.1011 + 0. 1001) x 25
= 1.0100 x 25
= 0.10100 x 26
b. (0.1001 x 23 ) + (0.1110 x 25 )= (0.001001 x 25 ) + (0.1110 x 25 )= (0.001001 + 0.111000) x 25
= 1.000001 x 25
= 0.1000 x 26 (here have truncation)(0.1000001 x 26 )
2. Floating point subtractiona. (0.1110 x 27 ) (0.1100 x 27 )
= 0.0010 x 27
= 0. 10 x 25
(0.1001 x 28 ) ( 0.1000 x 25 )= (0.1001 x 28 ) ( 0.0001 x 28 )
= 0.1000 x 2
8
3. Floating point multiplication(0.1010 x 23 ) x (0.1100 x 23 )
= (0.1010 x 0.1100) x 26
= 0.01111 x 26
= 0.1111 x 25
(0.11110 x 23 ) x ((0.01011) x 24 )= (0.11110 x 0. 01011) x 27
= 0.001111 x 27
= 0.1111 x 25
4. Floating point division.
(0.11010 x 26
) : (0.001 x 26
)= (0.11010 x 26) : (1 x 23)= 0.1101 x 26 : 1x 23
= 0.1101 x 23
(0.110111 x 26) : (0.1001 x 24)= (0.110111 : 0.1001) x 22
= (1101.11 : 1001) x 22
= 1.100001 x 22
= 0.1100001 x 23
Chapter 3: TYPES OF INSTRUCTION AND ADDRESSING.
Question 1.Types of instructions used in CS?1. Arithmetic instructions.Arithmetic instructions include directives to the computers to performadditions, subtraction, multiplications, divisions and exponentiations.2. Input/ output instructions.They direct the computer to read data values from the specified inputdevices into the main store for processing.They also include instructions to write the contents of memory locationsholding the result of processing to a specified output device.
18
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
19/36
3. Decision or control instructions.Most data processing application will contain situations where alternativecalculations or procedures will have to be executed based on the result ofcondition tests carried out.4. Data handling instructionsThey include the copying of the content of one memory location toanother or setting a memory locations to an initial value.Also include the management or insertion of characters into data itemsExamples of such instructions include branch instructions, jumpinstruction & stop instruction.
Question 2.Types of addressing?1. Direct addressingThe operands of each machine instructions is used to retrieve the data2. Indirect addressingThe operands is used to specify the memory address which contains theaddress of the data to be processed
Op code
OP CODE OPERAND OP CODE OPERAND
12345
Data item
12345Da
ta item Main storageDirect addressing
Indirect addressing3. Indexed addressing
- The main applications of this type of addressing technique is toenable to access of sequential locations in memory that areadjacent to each other
- Each adjcent memory address has value n+1, where n is theaddress of the previous location
- When the first of the location have been accessed, the next
memory location in sequence is accessed by simply increasingthe add of the present location by 1 & using accessing it- The starting address of the series of locations is specified in the
operand of the instruction- In order to access the next location in sequence, the content of
the index register is increased by 1 a added to the opreandaddress
- This is done repeatedly until the last memory location in theseries is processed
19
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
20/36
Indexed addressing.OP CODE OPERAND
Index Register
Chapter 4: PROGRAMMING LANGUAGES.Question 1.Program and level of language?
Program is group of constructions that is linked together to performspecific task. Its necessary for a computer program to be written in a
PL because at a computer program is created by a programing using asys analysts specification of the job in the hand.1. Machine language
- ML is the set of bit(0,1) that can performed considered by CPU- Ads
fast
short prog
store in small memory- Dis
difficult to understand & remember its code takes a lot of time to programming
difficult to use2. Low level language
- LLL is used to dercribe exactly procedure of performance of CPUat certain time
- Features: Instruction is written by natrural English or natural
language More powerful and so the prog is shortest Need less instruction Is a one to one relationship between the written
instruction and the machine instructions Its instruction tend to be machine. It runs in OS
- Ads:
Easy to write
Easy to understand
Known the processing data in CPU
Prog writing is shortset- Dis:
Must be complier
Data 1 Data 2 Data 3 Data 4
20
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
21/36
The time of running prog is longer than machinelanguage
3. High level language- HLL was developed in order to further easy the work of
programmers by making the programming language moreprocedure oriented
- Features: The statements of HLL are closer to natural englishor other natural language
A HLL source program must be translated intomachine code by means of a compiler or aninterpreter
- Ads: Easy to wirte Easy to understand May be used for everybody Closed to natural languages english language
- Dis: Must be interpreter by compiler or an interpreter
before processing by the computer The prog is long The time to run the prog is longer than low level
languageQuestion 2.Some High Level Languages (HLL)?
1. COBOL: Common Business Oriented Language- COBOL is an exetensively used HLL and since around 1960
several versions have appeared- The original intention was that COBOL should be capable of
being compiled and run on any model of computer- COBOL is now employed for many business data processing
applications, and so a brief explaination of its structure follows- A COBOL program consists of 4 divisions:
Identifycation division this identifies the prog
Enviroment division specifies the computer to beused for compiling and processing
Data division specifies the format and relates tothese to the names used in the procedure division
Procedure division comprises the statements in the
source program, this is the main part of a COBOLprogram
2. BASIC: Beginners ALL purpose Symbolic Instruction Code- BASIC is a straightforward HLL intended for use in a time-sharing
environment in this respect it is particularly beneficial ineducational institutions
- One of the difficulties with BASIC is the welter of dialectscurrently in use
21
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
22/36
- Essentially BASIC consists of statements made up of verbs &variables. The verbs are similar to those in COBOL but there is alarge to them that in effect become the addresses of theirlocations in the main store
- A variable name must be unique and generally consists of one ora few alphabetic characters, purhaps followed by a digit
3. PASCAL: named after the famous 17th century French mathematician- It was expressly designed as a language to make programming
more systematic and discriplired and in these respects lendsitself to structured programming
- It is however more difficult to learn than are COBOLS BASIC andso is unliked to be accepted as a language for microcomputersare geared to BASIC only
Question 3.Operating Systeim?- Concept of OS:
An OS consists of a suite of programs, one of which,the master, kernel or exeactive program, remains
resident in the main store. This program controls theother OS programs in th suites and between themthey controls the application programs
Often the operating system includes variousapplication packages among its suit of programs. Exof such software include: word processing, electronicmail, networking, speadsheet, graphics and filehandling
- Function of OS Pricrity assignment:
Jobs waiting execution are scheduled according to either a
predetermined or a dynamic assignments plan Control of multiprogramming
Control of accomplish multiprogramming an executive orsupervisor program is employed to control the application programs
CommunicationControl of data transmission between terminals and the computer, andcomputer to computer
DatabaseControl of DBMS
Software controlControl of assemblers, compilers, utility software, and subroutines sothat these are imediately available when required
SpoolingThe control of input/output peripherals in order to achieve their bestutilisation
Dynamic allocationOf main and backing storage, including virtual storage
Operating allocationVia the console printer or VDU
22
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
23/36
Debugging and editing new programsIn confunction with the compiler, and passing error msgs to the user
Operation logMaintaince of details of all jobs carried out by the computer
Application package controlEspecially with microcomputers, as describe above
Chapter 6: TRANSLATORS.Question 1.Translators?
1. Assemblers
Def: A program that translates assembly language into machinecode. Dos machine instruction is generated for each source instruction
- The resulting program ran only be executed when the assemblyprocess is completed
Operation:- Translates mnemonic operation codes into machine code &
symbolic address into machine address
- Includes the neressary linkages for closed subroutines andinserts appropriate machine code for macros
- Allocates area of storage- Detects and indicates valid source language instruction- Procedures the object program on tape or disk required- The lesting may also include error codes if appropriate. To
illustrate the methods used just think about an assemblyprogram. We must first look at the directives
A directive is used to control the assembly process, itis not asembled but is obeyed by the assemblerwhen it is encouteded, e.g END, is sometimes
called a pseudo-operation code on pseudo-opcode2. Interpreter
A program which translates and executes each source statement in logicalsequence as the program one instruction at a time, completely translatingand executing each instruction before it goes onto the next
- Interpreter, which deals with the source program one instructionat a time, completely translating and executing each instructionbefore it goes onto the next
- Interpreter seldom produce object code but call upon inbuiltroutines instead
- Some intermediate code is usually produced tempororily- If an interpreter is used, the source program will be translated
every time the program is executed- Interpreters are widely used, particular for the programming
language Basic on small computers
Interpriter are used for such things as:- Handling user commands in an interactive sys- Debugging programs as they run- Handling software produced for or by a different computer
3. Compilers:
23
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
24/36
A program that translates HLL into a machine orientated language, often themachine code. Many machine instructions are generated for each sourcestatement
- The compiler:
Translates the source program statements intomachine code
Includes linkage for closed subroutines
Allcocates areas of main storage Generates the object program on cards, tape and
disc as required Produces a printed listing of the source and objected
programs when required Tabulates a lish of errors found during compilation
- Compilers are commonly used for the translation of HLL program- Compiler translates the whole of the HLL source program into a
machine code object program prior to the program being loadedinto main memory and executed
- If a compiler is used, the same program need only be translatedonce
Stages of compilation
lexical analysis
systatical analysis
code generation
Chapter 7: SOFTWARE.Question 1.Application software?
- Application software comprises the programs that are writtenspecifically to achieve resulting appertaining to the companysactivities
- Application software comes from two source
They produce by themselves
Buy from an external agency1. Ads and dis of using application packages in house
Ads- The requirements of the application are more easily met- There is more control in testing and debugging- The more control over the usage and support obtained
Dis
- There is a waiting period before the application can beimplemented
- Development cost is higher than buying a package2. Ads and dis of using application package
Ads:- The packages can be used immediately- Documentation is generally good- It can be used on a varisty of machines
24
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
25/36
- It is cheaper as the costs of the packages are shared betweenmany users
- Comprehensive on line help information and guided tutorialsavailable
- Easily remembered command syntax- Can be used in confunction with other software in an integrated
fashion
Dis:- Modifications may be difficult for some applications- Package may be two generalized to suit user needs- Some features purchased may not be required- Support given depends on stability and professionalison of the
vendor- User are required to comply with the owners regulations
Question 2.Utility software?- Certain processing is common to a high proportion of computer
users, and so utility software has been created to cater for this
need- Utility software is intended to be sufficiently flexible to meetmost users requirements and is tailored to meet their preciseneeds by means of parameter entered prior to use
- Some of the utility programs described below may beincorporated into the OS that is used with a particular computer
File conversion: this convers the transference of datafrom any medium to any other
File copying: an exact copy of a data set is made onto another lot for the same type of storage medium
File reorganisation: direct access, files over flow
records are stored in designed blocked, this isacceptable up to a point but from time it si necessaryto reorganise the file so as to remove the overflow
File maintenance(amendment): this procedureinvolves the straightforward insertion and deletion ofrecords into or form sequential files
Sorting: is frequently necessary in order to arrange aset of records into a certain sequence based on theirkey values
Dumping routines: a dump routine is used inconfunction with a restfirt program ...
House keeping operations: there are programs orparts of a programs not directly concerned with thesolution of the problem in hand
Trace routines: these entails, the dumping, display orprinting of th program or other contents of the mainstore during program testing to facilitate errordetection
- Utilitys are commonly used to perform these functions:
25
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
26/36
Copying of files Sorting of data Merging of files Data recovery Reformating of records by reamanging their fields File reorganization
Reporting of sys status and usagesQuestion 3.System software?There are three main types of memory placement policy:
- First fit- Best fit- Worst fit
1. First fit policy, an incoming job is placed in the first available freespace large enough to fit it. This allows the placement decision to bemade quickly
2. Best fit policy, an incoming job is placed in the free space in which itfits most tightly
3. Worst fit policy, an incoming job is placed in the largest possible holeof free space
Question 4.Types of scheduling?- Scheduling of job is also an important part of any OS. It involves
keeping track of and deciding which job is to be executed- Types of scheduling
Deadline scheduling First in first out scheduling(FIFO) Round robin scheduling Shortest job first(STF) scheduling
Shortest remaining time scheduling(SRT)- More details about types of scheduling In deadline scheduling certains are scheduled to be
completed by a specifir time or deadline. Deadlinescheduling can be very complex requiring substantialoverhead in resource management
FIFO scheduling: processes are dispatched accordingto their arrival time in the ready queue. This type of
Round robin scheduling is similar to FIFO schedulingbut the difference lies in that each job is given a sliceof CPU time
SJF scheduling: shorter jobs are more favoured thanlonger one. SJF selects job that ensures the next jobswill complete & leave the sys as soon as possible
SRT scheduling: the job will the smallest estimatedremaining run time is executed first. In SRT, arunning job may be replaced by a new job with ashorter estimated run time
Chapter 8: MEMORY MANAGEMENT.Question 1.Virtual Storage System?
26
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
27/36
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
28/36
D C- Work stations connect to the ring- More cabling requiring than BUS- The connectors used with a lot of problem- Cable is used UTP, STP
4. Bus network( or multidrop network)A B
- All workstations are connected the same cable segment- Commonly used for implomenting ethenet at 10 mbps(Mb/s)
- The cable is terminalled at each end- Writing is normally store point to point- A faulty cable or work station will take the entire LAN down
Question 2.Network control?1. Modems(modulation demodulation)
A telephone line B
Modem modemDigital signal analog signal
OR
Data transmission Using a Modem- To communicate between computers via telephone line, there is
a need to convert signals from the computer into a form suitablefor transmission over the telephone line or convert from digitalsignals into analogue signals, and convert back from analoguesignals to digital signals
- From source: digitals signals are converted into analoguesignals(modulation)
- At the received end analogue signals are converted back into
digital signals (demodulation)- A device to handle modulation, demodulation process is calledModem
2. Bandwidth and Fibre OptiesThe major benefits of fibre opties are:
- Fibre optic cables are much lighter and smaller in size- Greatly increased speed in data transmission- Greatly reliability- Greater secerity as lines can not be tapped
28
Computer ComputerModem Modem
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
29/36
3. Transmissiona. Simplex transmission
This method allows for transmission in one direction only
b. Half duplex transmission
This method means thats data can be transmitted in both directions, but isonly on direction at a time
c. Full duplex trasmission
This method of transimission allows for transmission in both directionssimultaneously
* Two modes of transmission are used when transmitting data overcommunication lines. They are
asynchrorous synchronous
Asynchronous:
- One character at a time is transmitted or received- Each character is preceded by a start bit and a stop bit The start bit is used to indicate or character is being
sent
The stop bit is used to indicate the end of thecharacter
- Asynchronous transmission is used for low speed devicesDirection of transmission
S S S ST T T T
A 11000001 O 1111111 A 11000010 OR P R PT T
Synchronous:- The speed of transmission is much faster- Transmission groups of character can be send down the line
without the start and stop bitsDirection of transmission
000111000001011100000011Question 3.LAN_Local Area Networks?
Def: A LAN is a communication network in that connects officeequipment to provide a variety of data communication servicewhich features high transmission rates and low error rates
Characteristics:- Utilisation of some type of switching topology- Locality restricted to a few miles or in the same bulding- Proprietorship by a single organisation
Features:
29
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
30/36
- LAN is after used in offices & it connects of fire equipment toprovide a variety of data communication. Service with lighttransmission rate and low errors rate
- The majorities of LANs are connected by coxial cable, and theprotocol(rule for communication) is very simple
Three other important aspects of LANs:
- Acess method (protocol) Central controlCSMA_CDEmpty slot accessToken access/token passing
LAN transmission modes:There are 2 main types of LAN transmission modesa. Baseband transmission: is essentially & binary method, each bit
being represented by one of two states of an electric pulsepassing through the network.Baseband is nevertheless suitable for most LANs, and is the
mode employed by Ethernet and Cambridge Ring networkb. Broadband transmission: the data is modulates into a carrierwave. Broadband transmission has a much greater band widththan baseband, it can transmit sth like ten times as much in agiven time
LAN is one of the distributed processing designs- LAN are considered loosely coupled system processors are
located in separate machines and communicate at relatively lowspeeds
- LAN is the means by which distribution takes places, regardlessof what are distributed
Chapter 10: DATA COMMUNICATIONS.Question 1.Write a short note of?
1. Communication is an extensive subject in its own right, encompassingnot only data transmission but also sound and video transmission viatelephone lines, radio links and satellite links.
2. Multiplexing is a means of combining together data from severalsources so that it can be transmitted along one comminication line
3. Front end processing: A front end processor is usually aminicomputer or a microcomputer interposed between the maincomputer and the multiplexor
Its purpose is to relieve the host computer from the bunden of
communications housekeeping4. Concentrators are device used to gather the bit from each terminal or
group of terminal and hold them on buffer store unit until there aresufficient to justify forward transmission
5. Protocol is an agreement where by devices can communicate is afully understand manner
6. Multidrop line has several terminals on concentratorattached to it
30
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
31/36
7. Distributed data processing sys is one of which interconnected pointsat which processing power and storage capacity are availble
Question 2.Fibre Optics?
Fibre optics is that data and other information is transmitted in theform of light through very fine glass fibres
Ads:
- High bandwidth eg data transmission capacity- Low cross talk eg interference between adjacent fibres- Low attenuation eg loss of signal strength- Freedom from interference from external electrical and
electromagnetic equipment- High reliability- Safe because no heat, sparks or electrical voltages are created- Economic because glass is loss expensive than copper
Chapter 11: DISTRIBUTED PROCESSING.Question 1.Client/ Server Model?
- Its common way to employ distributed processing that is client/server
architecture which splits into components- Server store & main palates the actual data & provide secenity, lostingfunction transaction logging recovery capabilities
- Client/ server model seems like PC lan each server support more users- Data request in form of SQL(structure quenf language) command
travel across the network from client to server
Client ServerDatabase
Request
LAN Response
Question 2.File sharing VS client server?Network
Client ServerThe file sharing model
>
31
Applicationtool
Applicationtool Database
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
32/36
Network
Interface InterfaceThe client/ server model
File sharing
- File are shared for a lot ofmachines in thenetwork(each machine canaccess to the shared files)
- It can create heavy networktraffic(each access to a largefile can potentially block ofthe file, showing the systemamount of informationtemporarily unavailable toother user)
Client server
- Database are stored in theserver machines and clientmachines can sendrequest for appropriatedata
- Only the records matchingthe request criteriararesent back to clientmachines so the sys neverhas heavy traffic
Question 3.Distributed Database Topology?- With distributed processing system, user can access data, that islocated among a number of physically separate servers. It providesuser with a globol view of the data.
- With distributed database, the problems with implementing still exists.- Developing distributed database application requires extensive
planning to anticipate the many complex possibilities.- For a large number of transactions travelling across the network the
capacity of communication lines and the possible impact a systemmust be carefully considered.
Chapter 12: THE TCP/IP PROTOCOL SUITE.
Question 1.The OSI model? - OSI model, adopted in 1983 by IOS , which is a framework for defining standards forlinking hetenogenerous computer
- The communication function are pastitioned into a vertical set oflayers. Each layer performs are lated subset of the functions requiredto communicate with other sys
- The OSI layers
32
Application
tool process
Databaseengine Database
Databaseengine
SQL execute
commands
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
33/36
Physical: concerned with transmission ofunstructured bit stream over physical medium, dealswith the mechinical, electrical, functional, andprocedual characteristrics to access the physicalmedium
Data link: provides for the reliable transfer of
information across the physical link, send blocks ofdata with the necessary synchronization, errorcontrol, and flow control.
Network: provides upper layers with independencefrom the data transmission and switchingtechnologies used to connect systems, responsiblefor establishing, maintaining and terminatingconnections
Transport: provides rediable, transparent transfer ofdata between end points, provide end_to_end errorrecovery and flow control.
Session: provides the control structure forcommunicaton between applications, establishes,manages, and terminates connections betweencooperating applications.
Presentation: provide independence to theapplication processes from difference in datarepresentation(syntax)
Application: provide access to the OSI environmentfor users and also propvides distributed informationservices
User oriented Application Users of transport
Presentation serviceEnd to end Session
connection oriented TransportNetwork
Point to point Data link Network servicelink oriented Physical
Perspectives on the OSI architectureQuestion 2. Protocols?Both OSI and the TCP/IP protocol suite deal with communications amonghetrnogenerous computers
Both are based on the concept of protocol and have many similaritiesTCP/IP protocol architectureTCP: Transmission Control ProtocolIP: Internet Protocol- The TCP/IP protocol architecture is based on a view of communication
that involves three agents: processes, hosts, and networks- Communication between processes takes place across networks to
which the hosts are attached
33
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
34/36
- A network need only be concerned with routing data between hosts, aslong as the hosts agree how to direct data to processes
- It is natural to organize protocols into four layeri. Network access layer: contains those protocols that provide access to
a communication networkii. Internet layer consists of the procedures required to allow data to
traverse multiple networks between hostsiii. Host_host layer: containts protocol entities with the ability to deliver
data between two processes on different host computersiv. Process/ application layer: contains protocols for resource sharing and
remote accessOperation of TCP/IP
Application ApplicationTCP TCP
OS
IP OS
IP
Network accessprotocol 1 Network accessprotocol 2
Network 1 Network 2
Netwo
Communications using the TCP/ IP protocol architectureNAP: Network Access Points
- IP is implemented in all of the end systems it keeps track of blocks ofdata to ansure that all are dilivered veliably to the appropriateapplication
- For successful communication, every entity in the over all sys musthave a unique address, two level of addressing are needed
Global Internet Address(for communication) Ports(for service)
Try your best, you will get the best!
34
IP
NAP 1
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
35/36
Contents
BOOK I: Computer system fundamentals.
CHAPTER 1 INTRODUCTION TO COMPUTER..................................................2
CHAPTER 2 MICROPROCESSOR.....................................................................3
CHAPTER 3 BATCH/ ONLINE AND REAL TIME PROCESSING SYSTEM.............4
CHAPTER 4 PRINTERS AND TERMINALS........................................................5
CHAPTER 5 DATA STORAGE MEDIA...............................................................7
CHAPTER 7 COMPUTER FILES........................................................................9
CHAPTER 8 DIRECT ACCESS FILE ORGANIZATION AND STRUCTURES........10
CHAPTER 11 INTRODUCTION TO ARTIFICIAL INTELLIGENCE.........................12
CHAPTER 12 EXPERT SYSTEMS.....................................................................12
35
-
8/6/2019 Mot So Cau Hoi Ve May Tinh
36/36
BOOK II: Computer systems architecture.
CHAPTER 1 NUMBER BASES........................................................................13
CHAPTER 2 NUMBER BASES........................................................................13
CHAPTER 3 TYPES OF INSTRUCTION AND ADDRESSING.............................16
CHAPTER 4 PROGRAMMING LANGUAGES....................................................18
CHAPTER 6 TRANSLATORS..........................................................................20
CHAPTER 7 SOFTWARE...............................................................................21
CHAPTER 8 MEMORY MANAGEMENT...........................................................23
CHAPTER 9 NETWORKING...........................................................................23
CHAPTER 10 DATA COMMUNICATION...........................................................26
CHAPTER 11 DISTRIBUTED PROCESSING......................................................27
CHAPTER 12 THE TCP/IP PROTOCOL SUITE...................................................28
36