Form 4 Part 1

Page 1

COMPUTER STUDIES NOTES

1. APPLICATION SOFTWARE SOFTWARE: Computer software, or just software is a general term used to describe the role that computer programs, procedures and documentation play in a computer system. It's the intangible part of the computer system. On the other hand unlike hardware software cannot be touched. Imagine software as being a layer between the hardware and the user. This layer is divided into two main parts the layer nearest to the hardware is called the system software or the operating system, while the layer facing the user is called application software. -

System Software – we need only 1 installed inside the computer and it take care of all the hardware and the user needs. It is also called the Operating System. Example: Windows. -

Application Software – are all the other programs installed into the computer in order for the computer to do something. Example: Ms Word, Ms Excel, Games ….

APPLICATION SOFTWARE: Applications programs are written to solve particular problems. Application software, or just software, is a collection of computer programs and related data that provide the instructions for telling a computer what to do and how to do it. In other words, software is a conceptual entity which is a set of computer programs, procedures, and associated documentation concerned with the operation of a data processing system. We can also say

MR NOEL ATTARD

PAGE: 1


COMPUTER STUDIES NOTES

software refers to one or more computer programs and data held in the storage of the computer for some purposes. These are custom or bespoke programs written by the user (DIY), or a software house under contract, to perform a specific job. APPLICATION PACKAGES: An application package is a software package that is created for a specific purpose or industry. These are prewritten programs purchased ‘off the shelf ‘ or ‘taylor made’ by the user. They are very important to non-specialists, in the home or in business, and for beginners. There is a wide range and variety of packages which continues to increase. The quality continues to improve: packages are genuinely versatile and include such aids as on-line help facilities for ease of use. OFF SHELF SOFTWARE: Programs that are ready made for the general public. The end-user buys them from the computer outlets. For example: Microsoft Word, Corel Draw, Access, Excel, , Games. Benefits of buying off-the-shelf package: • Cheaper in price • Quicker and less costly • Proven and more tested • Documentation provided with package • User friendly • Automatically and free updates • May not fit 100% your need or your hardware TAYLOR MADE SOFTWARE: Programs written by the user himself, or ordered to be done for him by a software house to perform exactly the specific job he wants. Examples include an aeroplane autopilot control or programs used to create special effects in movies. Benefits of buying Taylor Made Package: • Every expensive • Takes time to do • Will fit exactly to your needs • No updates and if yes at a cost • Little or no Documentation • Will fit your hardware MR NOEL ATTARD

PAGE: 2


COMPUTER STUDIES NOTES

FREEWARE SOFTWARE: This software can be loaded, used and modified by everyone free of charge. If you have a freeware software you can also share free with others. SHAREWARE SOFTWARE: This software can be used by everyone free of charge for a limited time, but the creator of the software retains the rights. If the user is satisfied with the software, he has to pay for the license to continue using it.

INTEGRATED PACKAGES: These combine word processing, spreadsheet, database, graphics and communications facilities into one program. There is no need to load separate programs or data and standard commands are used throughout. Such a package would include a number of application software that can share the same information. For example, cutting a selection from one application and pasting it in another application. Examples of integrated software packages include Microsoft Office, Corel Graphics Suite..

INTEGRATED ACCOUNTING PACKAGES: These comprise a number of program modules which make up all or part of an organization’s accounting system. Popular packages on microcomputers include Sage and Pegasus.

APPLICATION-SPECIFIC PACKAGES: These can be used in a wide range of businesses but are written for a specific routine or application, e.g. payroll, stock control.

MR NOEL ATTARD

PAGE: 3


COMPUTER STUDIES NOTES

OCCUPATION-SPECIFIC PACKAGES: These are designed for a particular vertical market, i.e. an identifiable group of users such as farmers, estate agents, hoteliers, dentists. By their very nature they sell less well and therefore tend to be more general packages which have a more widespread appeal. Look up a computer magazine called Micro Decision and check the specialized software section. This will give you a useful overview of the main types of vertical market software. SOFTWARE PACKAGES: This section gives a brief overview of the most popular software packages. These are: • Word processing • Database management • Spreadsheet • Graphics • Accounting • Desk-top publishing • Communications Popular packages include: • MS Office – includes a bundle of software with it.

WORD PROCESSING (WORD): WP packages are in widespread use. There is little point in buying a typewriter nowadays as the benefits of WP significantly outweigh it. • Easy editing and correction – abolishes copy typing; • The output of ‘clean top-copy’ document; • Output in different formats and styles; and versions. • Storage of standard documents such as letters, contracts and minutes – different versions of them can be made up to meet different needs without having to retype everything. SPREADSHEETS - EXCEL: Spreadsheets are designed to manipulate numeric data. They are easy to use and have many applications particularly in accounting, statistics and mathematics. A spreadsheet is the electronic equivalent of an accountant’s ledger – a large piece of paper divided by vertical columns and horizontal rows into a grid of cells. The name derives from spreading the

MR NOEL ATTARD

PAGE: 4


COMPUTER STUDIES NOTES

organization’s accounts on a sheet of paper. The program starts by showing a blank grid of cells and the user can directly enter one of three types of information into a cell: • Numbers • Formulae –referencing other cells • Text. DATABASE MANAGEMENT - ACCESS: Information is vital to all business and a database is a collection of organized information stored in a way that makes it easy to find and present. All business keep records although they may not be efficiently organized or kept in one place. Many of them are ‘manual’ system held in a filing cabinet or card index.

GRAPHICS PACKAGES: Graphics require a lot of main memory and usually a special circuit board (card) and a high resolution screen capable of displaying many small points of light – called pixels – if high definition is required. Graphics output on plotters or dot-matrix or laser printers. Graphics software can be classified as follows: • Business graphics • Computer-Aided Design (CAD) These packages demand more sophisticated kit and consist of special functions aimed at helping the graphic designer, architect, engineer or draughtsman to design products, buildings or parts. The screen becomes the canvas and a light pen (or mouse or digitizer) the equivalent of the brush or pen. They allow work of professional quality to be produces quite quickly and include such facilities.

MR NOEL ATTARD

PAGE: 5


COMPUTER STUDIES NOTES

ACCOUNTING SOFTWARE - SAGE: Accounting systems are vital to all types of organization as the main internal source of information. Their importance and the fact that they are made up of a set of formal rules and procedures led to the early development and growth of computer-based accounting systems usually running on large (mainframe and mini) computers. Nowadays there are many popular accounting packages available for the small business which run on a microcomputer.

DESK-TOP PUBLISHING (DTP) – PUBLISHER: DTP packages are designed to help produce documents, newsletters, posters and other illustrated articles which combine large amounts of text with illustrations. They combine the features of word processing and graphics packages, placing particular emphasis on the format and style of presentation – a simpler version of the modern methods of newspaper composition. Standard graphics symbols and free-form drawings can easily be incorporated. From reading the advertisements for it, you might conclude that all a business needed to meet its ‘publishing and printing’ requirements was a micro, a printer and DTP package. So equipped, a secretary should be quite capable of saving the company the expense involve in putting printing work out to the trade. COMMUNICATION SOFTWARE: Packages such as Msn Messenger enable the user to send or receive files or programs to and from other computers – a very powerful feature nowadays. They usually offer links to most public electronic mail and external database facilities. The software handles all the communications protocols, speeds etc. for you.

MR NOEL ATTARD

PAGE: 6


COMPUTER STUDIES NOTES

Similarly, the software will automatically deal with incoming files, messages etc. from other users. THE EDUCATIONAL SOFTWARE:

Software aimed at teaching or facilitating the teaching of certain topics. There is also reference software like online encyclopedia An example is Encarta or Wikipedia. Example of educational software can be divided into: • • • •

CBT – Computer Based Training CAL – Computer Assisted (Assisted) Learning CAI – Computer Aided (Assisted) Instruction CML – Computer Managed Learning.

SOFTWARE PROGRAMS TERMS: SITE LICENCE UPGRADES PATCHES

UPDATES

PLUG – Ins

DRIVERS

SKINS

A payment so that the program will be distributed to specified number of network terminals. Program enhancements that are made available only to the subscribers. Pieces of object code that are inserted (patched) into an already existing executable program to act as a temporary solution to a program bug. Every software is open to programming errors. When a number of errors have been found and fixed, the creator sends a new version of the complete and modified program to the registered users. Also known as ADD-ONs or SNAP-INs are small program modules created to act under the operating system’s controls. They interact with other programs already resident in the computer operating system to supplement certain features that will allow the end-user to complete his needs. Like the Active-X. Device drivers are small programs that allow the operating system to interact with the hardware peripherals. These programs instruct the operating system with the ways of how to control and communicate with a peripheral such as printers, hard disks, etc … Also known as Themes, are graphical accessories that enhance aesthetically the software as well as make the interface more userfriendly. Example: MSN Messanger,

MR NOEL ATTARD

PAGE: 7


COMPUTER STUDIES NOTES

PROGRAMMING LANGUAGES: A programming language is used to write computer programs such as • Applications • Utilities • Servers • Systems Programs A program is written as a series of human understandable computer instructions that can be read by a compiler and linker, and translated into machine code so that a computer can understand and run it. A computer ‘works’ by executing a series of instructions – the program. A program can be written in a variety of programming languages. In order of development there are several ‘generations’ of languages: Machine & Assembly Language

PASCAL / BASIC / C++

Low-level languages

High Level Languages

High-Level & Low-Level Languages –> TRANSLATED TO Machines Language

MACHINE CODE A manufacturer designs a computer to obey just one language, its machine code, which will be represented inside the computer by combinations of binary digits. The set of binary codes which can be recognized by the computer is known as the machine code instruction set. INSTRUCITON FORMAT The instruction format of a machine code instruction has two main parts: • A function (or operation) opcode; • An address (operand).

e.g.

MR NOEL ATTARD

Op. code

Operand address

0 0 1 1

0 0 0 0 0 0 0 0 1 0

PAGE: 8


COMPUTER STUDIES NOTES

The function code tells the control unit of the CPU what to do with the item held in the address. For example, for one computer: 4 A 2

187

Instruction Address (op. code)code instruction for: ‘add the might be the hexadecimal machine

contents of storage location 187 to the contents of register 2’. The absolute address of each store location is a binary number which can be decoded so that when data is required from a memory cell the right location is selected.

LOW-LEVEL LANGUAGES Programming of the first stored-program computer systems was performed in machine language. This is the lowest level of programming language. All the commands and data values are given in ones and zeros, corresponding to the "on" and "off" electrical states in a computer. The programming process became easier with the development of assembly language, a language that is logically equivalent to machine language but is easier for people to read, write, and understand. But the limitations of the low-level languages – machines code and assembly – led to the development of high-level languages which are: • ‘user friendly’ (people based); • similar to English with vocabularies of words and symbols; • ‘problem’ rather than ‘machine’ based; • shorter than their low-level equivalents – one statement translates into many machine code instructions.

HIGH-LEVEL LANGUAGES A programming language in which the program statements are not closely related to the internal characteristics of the computer is called a high-level language. As a general rule, one statement in a high-level programming language will expand into several machine language instructions. This is in contrast to assembly languages, where one statement normally generates one machine language instruction. Example: PASCAL , BASIC, C++

MR NOEL ATTARD

PAGE: 9


COMPUTER STUDIES NOTES

PROGRAMMING LANGUAGE GENERATIONS In the computer industry, these abbreviations are widely used to represent major steps or "generations" in the evolution of programming languages. 1GL OR FIRST-GENERATION LANGUAGE – Low Level The first generation of programming language is a machine-level language that makes use of the binary system (0 and 1) as codes for the program. The system would then convert these codes into instructions. Machine-level language was fairly quick in execution since it is directly instructed by the CPU; however it is fairly confusing to learn and to edit since the programming language uses numerical representations of instructions that do not appear significant to a human user. Example: Machine code

2GL OR SECOND-GENERATION LANGUAGE – Low Level The second generation of programming language makes use of assembly language, meaning, it has a slight similarity with the human language, although it has to be converted into machine language (the binary system) in order to be executed. Each command is mapped into a set of binary codes, which the CPU performs in a similar way that it executes machine-level language. Normally an assembly language statement consists of a label, an operation code, and one or more operands. Labels are used to identify and reference instructions in the program. The operation code is a symbolic MR NOEL ATTARD

PAGE: 10


COMPUTER STUDIES NOTES

notation that specifies the particular operation to be performed, such as move, add, subtract, or compare. It has a significant speed advantage, although machine-level language is still quicker in execution due to its direct instruction into the CPU. The assembler (sometimes called "assembly") language is a typical 2GL instruction looks like this: ADD

12,8

An assembler then converts the assembler language statements into machine language, before instruction is executed, as the computer ONLY UNDERSTANDS MACHINE CODE. Example: Assembler

3GL OR THIRD-GENERATION – High Level

Third generation programming languages are designed for easier human use. General representations of human arithmetic and other logical operations are represented in third generation languages. 3GL language is a "high-level" programming language, such as Pascal, C, or Java. Java language statements look like this: public boolean handleEvent (Event evt) { switch (evt.id) { case Event.ACTION_EVENT: { if ("Try me" .equald(evt.arg)) {

A compiler converts the statements of a specific high-level programming language into machine language. (In the case of Java, the output is called byte code which is converted into appropriate machine language by a Java virtual machine that runs as part of an operating system platform.) A 3GL language requires a considerable amount of programming knowledge. Programs are shorter then the other 1st & 2nd generation, and more easier to debug and transportable on different machines. Example: Pascal, Java

MR NOEL ATTARD

PAGE: 11


COMPUTER STUDIES NOTES

4GL OR FOURTH-GENERATION LANGUAGE – High Level Fourth generation programming languages were made to remedy the third generation language's flaws. While third generation languages performed complex functions in the program, the fourth generation language's objective was to lessen the error and quicken the process of the execution of the commands. This kind of language was designed for specific purposes, such as mathematical problem solving or systems engineering. An example of a 4GL is the query language that allows a user to request information from a database with precisely worded English-like sentences. A query language is used as a database user interface and hides the specific details of the database from the user. 4GL is designed to be closer to natural language than a 3GL language. Languages for accessing databases are often described as 4GLs. A 4GL language statement might look like this: EXTRACT ALL CUSTOMERS WHERE "PREVIOUS PURCHASES" TOTAL MORE THAN $1000

Example: Visual Basic, MS Access

5GL OR FIFTH-GENERATION LANGUAGE – High Level The fifth generation programming language was designed generally for the user's ease. The user does not specifically need to create an entirely new program, since the language is designed to solve the problems based on user input. The user does not need to worry about making the program; the program readily performs the required routine and algorithm with the necessary input. Fifth generation language is involved with artificial intelligence research. 5GL is programming that uses a visual or graphical development interface to create source language that is usually compiled with a 3GL or 4GL language compiler. Microsoft, Borland, IBM, and other companies make 5GL visual programming products for developing applications in Java, for example. Visual programming allows you to easily envision object-oriented programming class hierarchies and drag icons to assemble program components. Example: Lisp

MR NOEL ATTARD

PAGE: 12


COMPUTER STUDIES NOTES

OBJECT-ORIENTED LANGUAGES In object-oriented programming, a program is no longer a series of instructions, but a collection of objects. These objects contain both data and instructions, are assigned to classes, and can perform specific tasks. With this approach, programmers can build programs from pre-existing objects and can use features from one program in another. This results in faster development time, reduced maintenance costs, and improved flexibility for future revisions. Some examples of object-oriented languages are: C, Java, and Ada

TRANSLATORS TO MACHINE LANGUAGE Is a computer program used to convert a program from one language to another (for example from a low-level language to machine code). This is general name for the three types of translation programs, assemblers , compilers and interpreters.

Source program Low-level language

Translator

Object Program

Assembler

Assembly Machine Language High-level language E.g. BASIC, COBOL

Interpreter or Compiler

TRANSLATORS FOR LOW LEVEL LANGUAGES ASSEMBLER: The translation program needed to translate mnemonics (the assembly code) into machine code, as at the end computers only understand MACHINE CODE. TRANSLATORS FOR HIGH LEVEL LANGUAGES INTERPRETER: The interpreter translates and executes each instruction at a time. The program runs slower since it is being translated to machine code during runtime. Debugging is easier since the interpreter stops on encountering an error.

MR NOEL ATTARD

PAGE: 13


COMPUTER STUDIES NOTES

COMPILER: The compiler translates the whole program completely, and then executes the machine language version. When using a compiler a programmer ends up with 2 versions of the program – the source code and the object code (.exe). The program executes faster. Compile-time errors are listed at the end of program compilation.

SOFTWARE COPYRIGHT LAW In the US, unauthorized duplication of computer software products for simultaneous use constitutes copyright infringement and is punishable in a federal criminal action pursuant to 17 U.S.C. Section 506(a) by a fine of up to $25,000 and imprisonment for up to one year. In addition, federal civil penalties provided in 17 U.S.C. Section 504(c) allow the recovery of actual damages based upon the number of copies produced, or statutory damages. Where the copyright owner proves that infringement was willful, the court has discretion to increase the award of statutory damages up to $100,000 for each copyrighted product, which has been infringed. Finally, 17 U.S.C. Section 505 provides for the recovery of attorney’s fees by the prevailing party.”

SOFTWARE LICENCE AGREEMENT A software license agreement is a contract between the "licensor" and purchaser of the right to use software. The license may define ways under which the copy can be used, in addition to the automatic rights of the buyer including the first sale doctrine and 17 U.S.C. § 117 (freedom to use, archive, re-sale, and backup). Many form contracts are contained in digital form, only presented to a user click-through where the

MR NOEL ATTARD

only and as a user

PAGE: 14


COMPUTER STUDIES NOTES

must "accept". As the user may not see the agreement until after he or she has already purchased the software, these documents may be contracts of adhesion. These documents often call themselves enduser licensing agreements (EULAs)

SOFTWARE PROTECTION Software manufacturers spend great expense and effort in producing and marketing software, and therefore want to protect themselves against software theft (piracy). There are various software protection schemes a manufacturer can use to protect against software theft:

Security locks, or dongles, are hardware devices, which attach to a port on the computer. The software will check that the correct dongle is attached, and will not run if it is not.

Keyword protection is frequently used with cheap software. In this protection scheme, every time the software is run it will ask you to input a word from the manual, each time a different word from a different page.

Software registration is also intended as a deterrent against piracy. Someone who buys the original package receives a registration card, which he/she sends off to the software manufacturers. This entitles the user to various types of se such as free help, cheap updates etc.

MR NOEL ATTARD

Key disk protection uses specially formatted disks, which cannot be copied. Every time the software is run, it asks you to insert one of the original disks (called a key disk) into the disk drive. It then checks the disk, and if it isn’t the original the software won’t run.

PAGE: 15


COMPUTER STUDIES NOTES

TYPES OF SOFTWARE PIRACY INDUSTRIAL PIRACY Industrial Piracy occurs when an individual or group attempts duplication and distribution on a large scale for profit.

CORPORATE PIRACY The LAN is at the root of corporate piracy. By installing one copy of a software application on a LAN server, potentially hundreds of employees may gain unlicensed access.

RESELLER PIRACY Reseller Piracy involves computer hardware companies selling machines with illegal copies of software pre-loaded on their hard drives.

HOME PIRACY Home piracy includes everything, from trading disks with friends to running a not bulletin board for the purposes of illegal software distribution.

WHY SHOULD WE BUYING SOFTWARE 1. Buying original software ensures that you have the latest version, including manuals and all accompanying support material. 2. The software manufacturer will be able to help registered users if they encounter difficulties in using the software. 3. Product upgrades at reduced prices. 4. Breaking the law. 5. Reduce virus risk 6. Why should I buy software, and then distribute it free of charge to others?

MR NOEL ATTARD

PAGE: 16


COMPUTER STUDIES NOTES

DATA PROTECTION ACT: The Data Protection Act 1998 is a United Kingdom Act of Parliament which defines UK law on the processing of data on identifiable living people. In practice it provides a way for individuals to control information about themselves. Anyone holding personal data for other purposes is legally obliged to comply with this Act. This law which start that certain data with is sensitive stored on computer must be protected by passwords so that unauthorized users will not access it or pas it to others without the consensus of the owner. Data Controllers are persons who check that this law is obey and no data is stolen!!! What must be done on stored data: o o o o o

Delete old and unwanted file Update frequently so data will be up to date Create passwords so data will be secure Do and protect backup of data. Before publishing any data – owner must give you go ahead!!

DATA SECURITY: It is when you protect your data stored on the computer. It is done: • • •

by backup o (so no data is lost if something happens) by passwords o (so no data is stolen by unauthorized users) old data deleted o especial after updates or very old data

DATA INTEGRITY: It is when data inputted into the computer is 100% correct. This is done by the • • • •

Data preparation form o printed filled form MUST look like input screen Visual Check o after typing check with eyes Verification o typing x2 times by two different persons & compare Validation o different types of checking – type, range, etc

MR NOEL ATTARD

PAGE: 17


COMPUTER STUDIES NOTES

2. BINARY ARITHMETIC ADDITION RULES: This becomes extremely simple as only two digits are used. The rules for addition are: 1. 2. 3. 4. 5.

0+0=0 0+1=1 1+0=1 1 + 1 = 0 carry 1 1+1+1=1 carry 1

Example: 0101 0101 + -------------1010

0110 0111 + ----------------11 01

MULTIPLICATION RULES Again the rules here are much simpler than for the decimal system. The rules for multiplication are: 1. 2. 3. 4.

0 0 1 1

x x x x

0 1 0 1

= = = =

0 0 0 1

Example: multiply the following binary numbers: (i) 1 0 1 x 10 000+ 1010 1010

MR NOEL ATTARD

(ii)

101x 111 101+ 1010 10100 100011

PAGE: 18


COMPUTER STUDIES NOTES

SUBTRACTION: Subtraction does not prove to be quite simple as the other arithmetical processes. A computer cannot subtract a number from another. It can only add two numbers. Let us consider the case when we need to subtract two numbers. ` Subtract B from A A - B Add –B to A A + (-B) The above two statements yield the same result. To carry out the above addition, we need to find the code for –B in the binary and then add it to A. This idea brings us to what is known as complementation

ONE’S COMPLIMENT The easiest form of complementation is known as one’s compliment. The method of finding the one’s compliment of binary digit is by replacing ones for zeros, and zeros for ones (inverting all bits). Example: find the one’s compliment of 1001101 Number Invert all bits

1001101 0110010

TWO’S COMPLIMENT The two’s complement is obtained by adding 1 to the one’s compliment of a binary digit. We use this complement in a subtraction operation. Therefore the two’s compliment of 1001101 is Number One’s compliment Add 1 Two’s compliment

1001101 0110010 +1 0110011

SUBTRACTION RULES The rules to subtract two numbers are: 1. Pad with zeros until both numbers are the same length. 2. Take the two’s complement of the digit to be subtracted. 3. ADD the result to the first binary number. 4. Ignore the carry result to preserve the initial size. MR NOEL ATTARD

PAGE: 19


COMPUTER STUDIES NOTES

Example: if X=1101010 and Y=11101. Find the value of A, if A=X-Y. A= A=

X - Y 1101010 – 11101 1101010 – 0011101

1 1

0011101 1100010 +1 1100011

Y 1’s compliment 2’s compliment Answer

1 0 1 0 1 0+ 1 0 0 0 1 1 0 1 0 1 0 1 1

1 Ignore the carry result and so the answer is: 1010101

RIGHT & LEFT SHIFTS, NUMERIC OVERFLOW A REGISTER is a storage location with a fixed number of bits. Hence, in an 8-bit register, the number 1 will be stored as: 00000001 Numeric overflow is usually the result of a computation which is outside a fixed range. Assuming that data is being stored in 8-bit registers, the following computation causes numeric overflow.” 10110100+ 10011100 ---------------101010000 This is so because if we use an 8-bit register, we have 256 combinations (28), which means we can represent numbers in the range of 0…255. The numbers 156 and 220 can both be represented using such a register. However, number 350 is outside this range and therefore cannot be represented in this register. The result of the above computation is a nine bit digit which exceeds the fixed size of the register, which is 8 bit. Thus this is called a numeric overflow occurs. As a result of numeric overflow, 2 MR NOEL ATTARD

PAGE: 20


COMPUTER STUDIES NOTES

registers have to be taken up in order to store the result of the above computation, as shown below, as else result will not fit:

Two 8-bit registers 00000001

01010000

LEFT AND RIGHT SHIFTS: LEFT SHIFT Shifting a binary number left by 1 bit effectively multiplies it by 2. 1011002 = 4410 Sifting a binary number left by 1 bit means inserting a 0 to the right, so that this becomes the new least significant bit: 10110002 = 8810 RIGHT SHIFT

Shifting a binary number right by 1 bit effectively halves it. 1001112 = 3910 Shifting a binary number right by 1 bit means deleting the present least significant bit, irrespective of whether this is a 1 or a 0, so that the bit next to it, (on the left), becomes the new significant bit: 100112 = 1910

NOTE THAT WHEN SHIFTING A BINARY NUMBER TO THE RIGHT, AND A 1 IS DELETED, SINCE THAT WAY DATA IS LOST, THE VALUE MAY NOT BE EXACTLY HALVED.

MR NOEL ATTARD

PAGE: 21


COMPUTER STUDIES NOTES

3. CHARACTERS REPRESENTATION BITS & BYTES TABLE: 1 bit = one on or off position 1 byte = 8 bits 1024 Byte = 1 Kilo Byte 1024 KB = 1 Mega Byte 1024 Mb = 1 Giga byte 1024 Gb = 1 Terra byte

A character is one of a set of symbols which can be represented in a computer such as a number, letter, space or punctuation mark. Two other types of character are •

Graphics characters - shapes can be used to build up pictures and graphs

•

Control characters - characters which send signals to control operating functions rather than data, e.g. instructing a printer to start on a new page.

Character codes are the binary patterns used to represent the character set. Some codes are specific to the manufacturer but there are a number of standard codes which help the exchange of data between systems. So All letters, numbers, and symbols are assigned code values of 1's and 0's. A number of different digital coding schemes are used by digital devices. Three common code sets are: ASCII EBCDIC Unicode

(used in UNIX and DOS/Windows-based computers) (for IBM System 390 main frames) (for Windows NT and recent browsers)

MR NOEL ATTARD

PAGE: 22


COMPUTER STUDIES NOTES

The ASCII code set uses 7 bits per character, allowing 128 different characters. This is enough for the alphabet in upper case and lower case, the symbols on a regular English typewriter, and some combinations reserved for internal use. An extended ASCII code set uses 8 bits per character, which adds another 128 possible characters. This larger code set allows for foreign languages symbols and several graphical symbols. ASCII has been superseded by other coding schemes in modern computing. It is still used for transferring plain text data between different programs or computers that use different coding schemes. ASCII – AMERICAN STANDARD CODE OF INFORMATION INTERCHANGE Example: ASCII Code for C is 67 or 1000011

UNICODE uses 16 bits per character, so it takes twice the storage space that ASCII coding, for example, would take for the same characters. But Unicode can handle many more characters. The goal of Unicode is to represent every element used in every script for writing every language on the planet. In fact in version 3 of Unicode has 49,194 characters instead of the few hundred for ASCII and EBCDIC. All of the current major languages in the world can be written with Unicode, including their special punctuation and symbols for math and geometry.

MR NOEL ATTARD

PAGE: 23


COMPUTER STUDIES NOTES

PARITY BIT With all these 0's and 1's, it would be easy for the computer to make a mistake! Parity is a clever way to check for errors that might occur during processing. In an even parity system an extra bit (making a total of 9 bits) is assigne d to be on or off so as to make the number of on bits even. So in our example above 10101100 there are 4 on bits (the four 1's). So the 9th bit, the parity bit, will be 0 since we already have an even number of on bits. In an odd parity system the number of on bits would have to be odd. For our example number 10101100, there are 4 on bits (the 1's), so the parity bit is set to on, that is 1, to make a total of 5 on bits, an odd number. If the number of on bits is wrong, an error has occurred. You won't know which digit or digits are wrong, but the computer will at least know that a mistake occurred. Memory chips that store your data can be parity chips or non-parity chips. Mixing them together can cause odd failures that are hard to track down.

MR NOEL ATTARD

PAGE: 24


COMPUTER STUDIES NOTES

4. COMPUTER LOGIC A logic gate is an elementary building block of a digital circuit . Most logic gates have two inputs and one output. At any given moment, every terminal is in one of the two binary conditions low (0) or high (1), represented by different voltage levels. The logic state of a terminal can, and generally does, change often, as the circuit processes data. In most logic gates, the low state is approximately zero volts (0 V), while the high state is approximately five volts positive (+5 V). There are THREE basic logic gates: AND, OR, NOT, The combination of the above 3 together can produce: XOR ,NAND, NOR, and XNOR The AND Gate is so named because, if 0 is called "false" and 1 is called "true," the gate acts in the same way as the logical "and" operator. The following illustration and table show the circuit symbol and logic combinations for an AND gate. (In the symbol, the input terminals are at left and the output terminal is at right.) The output is "true" when both inputs are "true." Otherwise, the output is "false."

The OR Gate gets its name from the fact that it behaves after the fashion of the logical inclusive "or." The output is "true" if either or both of the inputs are "true." If both inputs are "false," then the output is "false."

Input 1 Input 2 Output 0

0

0

0

1

0

1

0

0

1

1

1

Input 1 Input 2 Output 0

0

0

0

1

1

1

0

1

1

1

1

A logical inverter , sometimes called a NOT gate to differentiate it from other types of electronic inverter devices, has only one input. It reverses the logic state.

MR NOEL ATTARD

Input Output 1

0

0

1

PAGE: 25


COMPUTER STUDIES NOTES

BOOLEAN EXPRESSION OF A LOGICAL CIRCUIT •

+

Means an OR Gate

.

Means an AND Gate

.

Means the NOT Gate -

MR NOEL ATTARD

– (A + B) = A OR B - (A . B) = A AND B A= NOT A

PAGE: 26


COMPUTER STUDIES NOTES

5. THE CPU The CPU is short for Central Processing Unit; this is the part of the computer where work gets done. In most computers, there is one processing chip. The CPU is the brains of the computer. Sometimes referred to simply as the processor or central processor, the CPU is where most calculations take place. In terms of computing power, the CPU is the most important element of a computer system. The term processor has generally replaced the term central processing unit (CPU). The processor in a personal computer or that is embedded in small devices is often called a microprocessor. The CPU is that little device located on your motherboard that seems to be the heart of the system. Your CPU has several jobs but only one primary objective, that is take simple tasks and do them FAST! INPUT

When data is passed to the computer in a form that the computer can

DEVICE

use.

OUTPUT

When the user is provided with the information produced by the

DEVICE

computer system. Consists of two types: •

RANDOM ACCESS MEMORY (RAM) - VOLITILE

READ ONLY MEMORY (ROM) – NON VOLITILE

MEMORY

Memory is physically outside the CPU and is placed at different areas

UNIT

on the motherboard. Input data and any results of any calculations are stored within RAM. Bootstrap loader is stored in ROM.

CPU

The CPU is made up of two main parts:

Central

ARITHMETIC LOGIC UNIT (ALU) - performs Maths and Logic

Processing

CONTROL UNIT (CU) - manages all movement to and from all

Unit

peripherals to the CPU. Refers to the computers ability to maintain data or information for use at a later time. A computer has two main means of storage: Main

STORAGE

Memory (Primary Memory or Working Memory) and Secondary Storage (or Backing Storage) – like the hard disk.

MR NOEL ATTARD

PAGE: 27


COMPUTER STUDIES NOTES

CPU Control Unit Arithmetic Logic Unit

Input

data / information control lines

Memory

Output

Backing Storage

There are two buses: an address bus and the data bus. The data bus transfers actual data whereas the address bus transfers information about where the data should go. There is also the Control bus – which controls data transfer. The size of a bus, known as its width, is important because it determines how much data can be transmitted at one time. For example, a 16-bit bus can transmit 16 bits of data, whereas a 32-bit bus can transmit 32 bits of data.

THE ADDRESS BUS: The address bus is a collection of wires connecting the CPU with the main memory that is used to identify particular locations (addresses) in main memory. The width of the address bus (that is, the number of wires) determines how many unique memory locations can be addressed. Modern PCs and Macintoshes have as many as 36 address lines, which enables them theoretically to access 64 GB (gigabytes) of main memory. However, the actually amount of memory that can be accessed is usually much less than this theoretical limit due to chipset and motherboard limitations. So the larger the address bus the more MEMORY location can be accessed

THE DATA BUS: The data bus is a set of parallel copper strips acting as wires along which data travels between the CPU, central memory and peripherals.

MR NOEL ATTARD

PAGE: 28


COMPUTER STUDIES NOTES

In fact all that requires data transfer is connected to the data bus. The width of the data bus depends also on the type of CPU and determines the word length, that is, the maximum number of bits a computer can pass at once along the bus. The larger the data bus, the faster the computer will perform.

THE CONTROL BUS: It is a bus with 1 wire – True or False, to check is data passed ok. CLOCK SPEED: Processors are measured in Mhz (Megahertz) which is an expression of millions, or GHz (Gigahertz) that is thousand millions. A 400 MHz can do 400 million operations a second. A 1.5GHz processor can do 1500 million operations a second. On personal computers and small workstations, the CPU is housed in a single chip called a microprocessor. Three typical components of a CPU are:

ARITHMETIC AND LOGIC UNIT – ALU: This is the part that executes the computer's commands. A command must be either a basic arithmetic operation: + - */ or one of the logical comparisons: > < = not =. Everything else has to be broken down into these few operations. Only one operation is done in each Machine Cycle. The ALU can only do one thing at a time but can work very, very fast. The ALU has two main registers; the accumulator and the shift register. • The accumulator is used for storing the current result of a calculation. • The shift register is capable of shifting its contents one or more positions to the right or to the left, in order to carry out arithmetic operations. This shifting will result in a division by two when shifting to the left.

CONTROL UNIT - CU: It is a typical component of the CPU that implements the microprocessor instruction set. It extracts instructions from memory and decodes and executes them, and sends the necessary signals to the ALU to perform the operation needed. Control Units are either hardwired (instruction register is hardwired to rest of the MR NOEL ATTARD

PAGE: 29


COMPUTER STUDIES NOTES

microprocessor) or micro-programmed. Two registers which are found in the CU are the Instruction Register and the Program Counter. • The Instruction Register stores a copy of the current instruction being processed. • The Program Counter stores the Address of the next instruction, in the program, to be executed The MAIN MEMORY UNIT OR PRIMARY STORAGE :

Storage of data and programs is one of the most important features of an information processing system. This is done: • Temporarily while a program is running. This is stored in main store. • Long-term to preserve programs and data while not in use. This is called backing store. Note: Memory is another term used for storage. Computer memory is one of the most expensive components that make up a computer. This memory known as central memory or primary storage is divided into two: the RAM and the ROM •

The Random Access Memory is used for the temporary storage of data and programs. The time taken to fetch data is called the Access time. RAM is volatile, this means that everything stored in the RAM is lost when the computer is switched off. It is mainly for this reason that backing stores are an essential part of a computer system. The Read Only Memory is part of the central memory and is used to store data of a permanent nature. The information is normally put on a storage chip at the manufacturing stage. The contents of ROM cannot be changed. ROM is used primarily for storing the Bootstrap Loader.

MAIN DISTINCTIONS BETWEEN ROM AND RAM ROM RAM Can only be read by computer Can be both read from and written to by the computer The contents of the chips are not Contents are lost when the power lost when the power is switched is switched off (volatile) off (non-volatile)

MR NOEL ATTARD

PAGE: 30


COMPUTER STUDIES NOTES

OTHER TYPES OF ROM’S: Although we mentioned that ROM is read only memory and cannot be altered there are other types of ROM, which allow some minor sort of reprogramming though this is of a very limited nature and is generally confined to a serial number, a code or settings. •

Programmable ROM (PROM): once programmed cannot be altered or erased. The difference between a prom and an ROM is that whilst a ROM is programmed by the manufacturer a prom may be programmed by a programmer

Erasable PROM (EPROM): this chip may be erased by exposure to ultra violet light. More expensive than a PROM and has a window to allow the passage of ultra violet light.

Electrically Alterable PROM (EAPROM): these chips may be partially programmed. Since these chips tend to wear out if it has to be read many times it is normally read into ram and then subsequently read from there.

USES OF MAIN MEMORY AND SECONDARY STORAGE The • • •

main store is needed: To store the program currently being executed To hold data produced as the program is run To hold other data such as the contents of the screen.

The Secondary Storage (Backing store) is needed: • For long-term storage of data and programs • For data and programs where there is not enough room in the main store. • For Backup purpose.

MR NOEL ATTARD

PAGE: 31


COMPUTER STUDIES NOTES

STORAGE MEDIA A storage medium is the material on which the data is stored e.g. magnetic tape, floppy disc, CDROM. A storage medium is exchangeable if it can be removed from the drive and replaced by another one of the same type. CHARACTERISTICS OF BACKING STORE • • • •

Data is usually accessed using read/write heads. These transfer the data while the medium rotates in the drive Access to backing store is slower that to main store They are non-volatile. The data is stored on the medium until it is deleted. There are 3 Mediums on which we can store our DATA: MAGNETIC – OPTICAL - ELECTRICAL

Memory Unit

ALU ACCUMULATOR

SHIFT REGISTER

RAM

CU PROGRAM COUNTER

ROM INSTRUCTION REGISTER

BACKING STORE

MR NOEL ATTARD

PAGE: 32


COMPUTER STUDIES NOTES

REGISTERS INSIDE THE CPU: There are 4 registers, the instruction register and the program counter which are found in the control unit, the accumulator and shift register which are found in the arithmetic logic unit. • • • •

Instruction Register: stores a copy of the current instruction being processed. Program Counter: stores the address of the next instruction to the program to be executed. Accumulator: is used for storing the current result of the calculation. Shift Register: is a cable of shifting its contents one or more positions to the right or to the left, in order to carry out arithmetic operations.

MACHINE CODE: Is the set of all possible instructions available from the electronic design of a particular computer. These instructions usually reflect the hardware design of the computer, and operate on very basic data, such as bytes or even single bits. The instruction can only be understood by the computer when expressed in binary notation. Computer Speed: The first and most important is the speed with which the CPU chip can operate. This depends on the internal clock of the CPU and is measured in MHz or MIPs (million of instructions per second). Opcode: It is short for operational code and is the mnemonic part of an instruction sort of the action to do part. Operand: It is the mathematical part of the instruction – data upon which the op code is to carry out the action. (where to do action)

MR NOEL ATTARD

PAGE: 33


COMPUTER STUDIES NOTES

6. THE FETCH AND EXECUTE CYCLE The fetch execute cycle is the time period of which the computer reads and processes the instructions from the memory, and executes them. This process is a continuous cycle which is used until the computer is turned off or there are no more instructions to process. FETCH The fetch part of the cycle starts by instructions being collected either from the hard-drive, the RAM, the cache or the registers. The way it knows which order to retrieve the instructions in is by each instruction being given a unique ID which are stored in a register so the control unit knows exactly what its looking for. (similar to how a computer has a unique IP Address on a network). EXECUTE After the correct instructions have been fetched the CPU will then interpret what the instruction is telling it to do then it will simply execute the instruction and the whole process will begin again until there are no more instructions or the computer is turned off. So the fetch-decode-execute is a repetitive process (steps) of fetching an instruction from main memory unit and executing it. Step 1: Set the value of the Program Counter to the address of the 1st instruction. Step 2: Fetch the instruction from the location specified by the Program Counter. Step 3: Store a copy of this instruction in the Instruction Register. Step 4: Increment the Program Counter by 1. Step 5: Execute the instruction. Step 6: Go back to Step 2 until the program ends.

Flow of Data inside the CPU

MR NOEL ATTARD

PAGE: 34


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.