Introduction To Computer
Introduction To Computer
Instructor Seble
M.T
2005
WWW.AAU.EDU.ET
1.1.
Information and Communication Technology (ICT) is an umbrella term that covers all technical means for processing and communicating information. While this technically encompasses pre-digital technologies, including paper-based writing, it is most often used to describe digital technologies including: Methods for communication (communication protocols, transmission
techniques, communications equipment, media (communication)), as well as Techniques for storing and processing information (computing, data storage, etc.) The term has gained popularity partially due to the convergence of information technology (IT) and telecommunication technology. ICT allows users to participate in a rapidly changing world in which work and other activities are increasingly transformed by access to varied and developing technologies. By this definition, you could almost say ICT is technology's version of economic growth, to satisfy the needs and wants of the community over time. ICT tools can be used to find, explore, analyze, exchange and present information responsibly and without discrimination. ICT can be employed to give users quick access to ideas and experiences from a wide range of people, communities and cultures.
Chapter One
Page 2
software applications and computer hardware." i deals with the use of electronic computers and computer software to convert, store, protect, process, transmit, and securely retrieve information. i is the combination of computer and communication technologies i is a general term that describes any technology that helps to produce, manipulate, store, communicate, and/or disseminate information Data Processing The difference between Data and Information Data: Think of data as a "raw material" - it needs to be processed before it can be turned into something useful, hence, the need for "data processing". Data comes in many forms - numbers, words, symbols. Data relates to transactions, events and facts. On its own - it is not very useful. Think of the data that is created when you buy a product from a retailer. This includes: Time and date of transaction (e.g. 10:05 Tuesday 23 December 2003) Transaction value (e.g. 55.00) Facts about what was bought (e.g. hairdryer, cosmetics pack, shaving foam) and how much was bought (quantities) How payment was made (e.g. credit card, credit card number and code) Which employee recorded the sale Whether any promotional discount applied
At its simplest, this data needs processing at the point of sale in order for the customer to receive a valid receipt. So, the data about the transaction is processed to create "information" - in this case a receipt. You can imagine that the same data would also be useful to the manager of the retail store. For example, a report showing total sales in the day, or which are the best-selling products. So, the data concerning all shop transactions in the day needs to be captured, and then processed into a management report. Chapter One Page 3
Computer Science is a science concerned with information i.e. representation, storage, manipulation or processing and presentation of information. Like any other science, which uses some devices for the practical aspect, computer Science uses a special device called COMPUTER. Computer science has different fields of specialization or sub-disciplines like other sciences. There are seven sub-disciplines of computer science. Software engineering: It is concerned about the development of a better quality software by applying scientific &basic engineering principles. Computer engineering (Architecture): deals with studying, analyzing and designing of computer hardware (organization and interconnection of computer system components) and its working principle. Automata theory: Automata Theory Is The study of machines or devices which accept a certain inputs such that the out put or at least the probabilities of output s are determined by the input. Formal Language Theory: Embraces the study of programs of programming languages, which is important for the understanding, and construction of compilers. Complexity theory: concerned with the study and analysis of algorithms, which helps in measuring the efficiency of the algorithms. Database Architecture: involves the study and design of efficient methods for information storage, process & retrieval. Artificial intelligence: Is concerned with means by which Computers may perform tasks that would be characterized as intelligent if performed by human beings.
Chapter One
Page 4
The characteristics of a computer show the capability and the potential of the computer for processing data. This saves time, space, money, labors etc. And they answer the questions why computers are used? Why have they become so popular? i Speed The ability of the computers to carry out their instructions in a very short period of time is one of the main reasons for their popularity. Computers can perform within a matter of seconds or minutes tasks that would be impossible for a person to complete by hand in lifetime. Its speed is measured by the amount of time it took to perform or carry out a basic operation.And its speed measured in terms of micro second (10-6 one millionths), nano second (10-9 one billionths), and Pico second (10-12 one trillionths). Hence a computer with speed 1 microsecond can perform 1 million instructions in just 1 second. ( For example in one second this computer can perform the following tasks: Compute the grade point average for 3000 students Calculate the total number of all books used by students in a university i Accuracy Now a days computers are being used in life-and-death situations (For example, jet pilots rely on computer computations for guidance, Hospitals rely on patientmonitoring systems in critical care units) which needs almost hundred percent accuracy. From this we can understand that computer is accurate and consistent. Unless there is an error in the input data or unreliable program the computer processes with a very accurate.
Chapter One
Page 5
Chapter One
Page 6
There are different types of Computers. Their difference is depending on different categories of characteristics. Classification by the method of operation (processing) They are classified into three: I. Analog Computers
Analog computers operate by measuring. They deal with continues variables; they dont compute directly with numbers, rather, they operate by measuring physical magnitude such as pressure, temperature, voltage, current etc. Examples i Thermometer, Voltmeter, Speedometer i Gasoline pomp Contains an analog Computer that converts the flow of pumped fuel into two measurements the price of the delivered gas and the quantity of pumped fuel. Note: They are special purpose computers. Analog computers have limited accuracy II. Digital Computers
Digital computers deal with discrete variables; they operate by counting rather than measuring. They operate directly up on numbers (or digits) that represent numbers, letters, or other special symbols. Examples: i Abacus i Desk & pocket computers i The general purpose computers Digital computers have higher accuracy and speed than the analog ones. III. Hybrid Computers
The best features of analog and digital computers can be combined into a single device to form a hybrid computer. A hybrid computer processes the information by collecting input data with analog method, convert it into digital quantities, processes the digital values and convert the output from digital to analog form.
Chapter One
Page 7
They are designed to solve a single type of problem, that is their components and function are uniquely adapted to a specific situation involving specific application. Example: i The public telephone box i Traffic control system i Ticket machines (used in grocery, super market etc.) i Pocket calculators i Counters etc.. Most analog computers are special purpose computers. II. General-purpose computers
They are designed to solve variety of problems through the use of store program concept. A program or set of instructions designed to solve a problem is read and stored into the memory and then executed by the computer one by one. The same computer can be applied to solve another set of problem using different program. General purpose computers are more flexible and versatile. Examples i Micro computers i Mini computers i Super computers etc. Chapter One Page 8
They are used to process huge amount of data and are commonly used in space technology centers, meteorology stations,astronomical observatories, inter continental communications, airline organizations. Mainframe computers: Smaller than super computers in size and capacity, lower in speed & memory capacity than the super computers. However they are multi-user systems and handle hundreds of users, usually used in large organizations. Mini computers Have relatively lower speed, can handle multi-users, are smaller in size than the mainframe computers. They use terminals for inputs and output. Mini computers are used in small organizations. Micro computers: Micro computer (personal or desktop computer) is a computer whose CPU is microprocessor. Microprocessor is a processor all of whose components are on a single integrated-circuit chip. Since its CPU is integrated in a single circuit, it can serve only a single user at a time. Most of home and personal office computers are microcomputers. The relative performance and usage of personal computer is relatively increased with a very high rate.
Chapter One
Page 9
Chapter One
Page 10
Chapter One
Page 11
Chapter One
Page 12
Development of Computers
CHAPTER TWO
calculator could only add and subtract, it could be used indirectly for multiplication (by successive addition) and division( by successive subtraction) as well. 3. The difference engine It is the forerunner of the modern computer. Charles Babbage (1792-1871), a British mathematician and engineer, is considered by many to be the real father of todays computer was the developer of the difference engine and designer of the analytical engine. The difference engine also based on the rotating wheels principle, was operated by means of a single crank. This devise has a power of calculation and print the out put with out human intervention. He finally designed significantly improved version of the difference engine (but not built) called Analytic engine. It has different key components i The store: A memory wheel consisting of set of counter wheels i The mill: An arithmetic unit capable of performing the four basic arithmetic operations. It operated on pairs of mechanical registers and produced a result stored in another register, all of which were located in the store. i Operation cards: These card selected one of the four arithmetic operations by activating the mill to perform the selected function. i Variable cards: These cards selected the memory locations to be used by the mill for a particular operation ( a source of operand and the destination of the result ). i Output: was to print or a card punch device. But finally the design halt largely due to the technology of the day is not far enough too supply the required raw materials. 4. Herman Holleriths tabulating machine Herman Hollerith was a statistician that in 1880 and develop his machine commissioned by the U.S. Census Bureau to develop a technique for speeding up the processing of census data that took at least 8 years before. He develops his machine that uses the punched card to punch the census the data and tabulated by using his machine. This machine processes the 1890 American census data with in 3 years. It was really a great development. He finally began the tabulating Machine Company, which later becomes the International Business Machine Corporation (IBM) Chapter Two Page 2
Development of Computers
5. Mark I
Development of Computers
Developed by Howard Aiken at Harvard university (1944) which were the one first electromechanical computer. Instruction were provided by means of punched paper tape, which combined the functions of Babbages operation cards and variable cards. Each instruction had the format: A1 A2 OP , where A1 and A2 are registers storing the operands and OP is the operation to be performed( e.g. +,-,x,%) Mark I could do a single addition in 6 seconds and division in 12 seconds 6. ENIAC( Electronic Numerical Integrator And Computer) Developed by Eckert and Mauchly at the university of Pennsylvania. This was the first electronic calculator and first general purpose digital computer. This machine was enormous, weighing 30 tones. occupying 15,000 square feet of floor space and containing over 18,000 vacuum tubes. When operating, it consumed over 140 kWh of power. It had a capability of performing 5,000 addition per second. Its memory consisted of 20 accumulators each capable of holding a 10 digit decimal number. Each digit was represented by a ring of 10 vacuum tubes. At any time, only one of the 10 tubes was in ON state, representing one of the 10 digits. i ENIAC did not use internally stored programs. Programs were wired on boards similar to a telephone switch board. i One of the major drawbacks of ENIAC was that it had to be programmed manually by setting switches and plugging and unplugging cables. 7. The Von Neumann Machine The task of entering and altering programs for the ENIAC was extremely tedious. Von Neumann was the consultant on the ENIAC project and forward the stored program concept, i.e designing the computer to get its instruction by reading them from memory alongside the data and a program could be set or altered by setting the values of a portion of a memory. Based on this concept, the first true electronic computers were developed by the name EDVAC( electronic Discrete Variable Computer) and EDSAC( Electronic Delay Storage Automatic Computer).
Chapter Two
Page 3
8. Commercial Computers
Development of Computers
The 1950s saw the birth of computers industry with two companies, Spery and IBM, dominating the market place. In 1947, Eckert and Mauchly develop their successful Computer). UNIVAC was division of Remington Rand (later Sperry_Rand Corporation). IBM also the major manufacturer of punched card processing equipment ,delivered its first electronic stored program computer, the IBM 701, in 1953. commercial computer called UNIVAC I (Universal Automatic
Generation of Computers
Although computer professionals do not agree on exact dates or specifics, computer developments are often categorized by generations. Actually there are four generations and major characteristics that distinguish these generations are the following; i Dominant type of electronic circuit elements used. i Major secondary storage media used. i Computer language used. i Types or characteristic of operating system used. i Memory access time (time to store or retrieve a word or data from memory). Computer generations are usually categorized by dramatic improvement in the hardware, typically refold or better increases in speed and reliability. 1. First generation (1950s) i Used vacuum tubes as components for the electronic circuit. i Punched cards were the main source of inputs, and magnetic grams were used for internal storage. i Operate in a speed of milliseconds (thousands of a second) and could handle more than 10,000 additions each second. i Most applications were scientific calculations.
Chapter Two
Page 4
Development of Computers
2. Second generations (early 1960s) i Transistors were the main circuit components. (Transistors are a solid state device made from silicon which is smaller, cheaper, faster, dissipate less energy and more reliable than vacuum tube but work in the same way with the vacuum tube.) i Invented by Bell Labs. i Magnetic tapes (similar with home tape caste), used for main storage, i Operate in microseconds (millionths of a second) with more than 200,000 additions possible each second. i Business applications become more commonplace, with large data files stored on magnetic tape and disk. (Magnetic disk: is a circular platter constructed of substance.) i High-level languages COBOL and FORTRAN were introduced during this period. Batch operating systems are used that permitted rapid processing of magnetic tape files. 3. Third generation (late 1960s, early 1970s) Characterized by solid-state logic and integrated circuit (IC). (A single, selfmetal or plastic materials coated with magnetizable
contained transistor is called discrete component. In early 1960 electronic equipment composed of discrete components transistors, capacitors, resistors, . They are i manufactured separately i Packed in their own containers and soldered (wired together) on a circuit board. So the entire manufacturing process was cumbersome and expensive. Do to these and other problems in 1958 the achievement that revolutionized electronics started the era of microelectronics: the invention of integrated circuit. i Computer storage switched from magnetic cores to integrated circuit boards that provide modularity (expandable storage) and compatibility (interchangeable equipment i New input/output methods such as optical scanning and plotters. i Software become more important with sophisticated operating systems, improved programming languages, Chapter Two Page 5
Development of Computers
i Greatly expanded storage capabilities and improved circuitry. i Has a large-scale integrated circuits (LSI) which has several hundred thousands transistors placed on one tiny silicon chip. i Computer memory operates at speeds of nano seconds (billionths of a second) with large computers capable of adding 15 million numbers per second. 5. Fifth generation The fifth generation computer is in progress. An architecture, which makes use of the changes in technology and allows a simple and natural methodology for solving problems, is being sought. These computers will have intelligent processors i.e., processors which can draw inferences. Users will also be able to interact with them in natural languages such as English, German etc. Japans are working intensively on the project for developing the 5th generation.
Generation Circuit element SSD Language Operating system Mem. Access time Approx. date Examples 1st Vacuum tube Punched card Machine assembly Operator control 1ms 1946-57 ENIAC, UDVAC UNIVAC, & 2nd Transistor Magnetic Tape Fortran, COBOL etc Batch system 10s 1958-64 IBM7090, 7094 3rd IC Magnetic disk Structured language Application oriented 10ns 1965-71 IBM system 1ns From 1971 above Late IBM product Time sharing LSI Mass storage device Application oriented 4th 5th VLSI
Chapter Two
Page 6
CHAPTER THREE
Computer System
Objective: What a computer system is and how it works to process data
3.1. Introduction
System is a group of components, consisting of subsystems or procedures that work in a coordination fashion to achieve some objective. A Computer System is composed of components that are classified either as Computer hardware or Computer software.
functional, performance, and cost goals. It can be described as the logical structure of the computer system. Computer hardware is the physical part of the computer that can be touched, seen, broken. What a computer in general does is, that It takes input (in various forms) Process it (according to a given set of instructions) and Produce an output (in required form). Store the information
Based on this the hardware part of a computer system is composed of a number of interacting physical parts. The different hardware parts of a computer which are responsible for these operations are illustrated by the following model.
Page 1
Page 2
Input Unit
Primary Memory Random Access Memory (RAM) Read Only Memory (ROM)
Output Unit
3.2.1.
The CPU or the microprocessor (or simply processor) is referred as the brain of the computer system; it is a VLSI chip inside the system, plugged onto the motherboard. A processor controls all internal and external devices, and performs arithmetic and logical operations. It is the most costly and main component of the computer system. A processor operates only on binary data, that is, data composed of 1s and 0s. These 1s and 0s correspond to electrical switches being switched ON or switched OFF. The processor performs, supervises, and controls the arithmetic and logic functions. It performs arithmetic operations such as additions, multiplication, division, and logical operations such as is A greater than B? The functions of a processor can be summed up as: Carrying out arithmetic and logical operations
Page 3
Registers
Controls the flow of information.
Control unit
As the name implies, it performs all the control functions of the computer. It retrieves the instruction from memory. Translates those instructions into computer functions and sends signals to other computer hardware units to carry out those functions. It is also responsible for determining the next instruction to be executed by the computer. In general it serves as the computer traffic cope.
Page 4
The Arithmetic Logical Unit (ALU) Register Control unit Register flags
ALU
It is referred as the computers "number crunchier ". It performs the arithmetic calculations: addition, subtraction, multiplication, division and comparisons (and, or, xor) and it is used to keep track of and execute instruction. All modern digital computers can do is addition; multiplication is merely a continuous addition; subtraction is the addition of the complements of the number to be subtracted; Division is the addition of complements.
Registers The registers are special purpose, high speed memory units. They hold various types of information such as data, instructions, addresses, and the intermediate results of calculations. Especially, they hold the information that the CPU is currently working on. Registers can be thought of as CPUs working memory. As soon as a particular instruction or piece of data is processed, the next instruction immediately replaces it, and the information that results from the processing is returned to main memory (RAM). Data and instructions do not enter either the ALU or the CU, instead the ALU work on the data held in the registers along with the instruction on which it acts. Instruction addresses are normally stored in consecutive registers and are executed sequentially. The control unit reads an instruction in the memory by a specific address in the register and executes it. The next instruction is then fetched from the sequence and executed, and so on. This type of instruction sequencing is possible only if there is a counter to calculate the address of the
Page 5
Page 6
Page 7
3.2.2.
Storage Units
Storage units are used to store data. There are two types of storage units: Primary and Secondary.
3.2.2.1.1.
RAM can be defined as a block of sequential memory locations, each of which has a unique address determining the location and those locations contain a data element. It stores programs and data that are in active use. Storage locations in main memory are addressed directly by the CPUs instructions. It is volatile in nature, which means the information stored in it remains as long as the power is switched ON. As soon as the power is switched OFF, the information contained in it vanishes. RAM can be further divided into two categories: 1. Dynamic RAM (DRAM): - This type of RAM holds the data in dynamic manner with the help of a refresh circuitry. Each second or even less than that the content of each memory cell is read and reading action refreshes the contents of the memory. Due to this refreshing action, the memory is called DRAM.
Page 8
3.2.2.1.2.
As the name suggests, read only memory can only be read, not written. In other words, CPU can only read from any location in the ROM but cannot write. The contents of ROM are not lost even in case of a sudden power failure, making it
Page 9
Types of ROM
Masked ROM: It is a hard-wired device that contained a pre-programmed set of data or instructions. The contents of such ROMs have to be specified before chip production, so the actual data could be used to arrange the transistors inside the chip. Programmable ROM (PROM): Blank PROM chips can be coded by anyone with a special tool such as PROM-Programmers. However, once a PROM has been programmed, its contents can never be changed. It is also known as one-time programmable (OTP) device. Like other ROMs, the information stored in PROM is also non-volatile, but they are more fragile that other ROMs as a jolt of static electricity can easily cause fuses in the PROM to burn out, changing essential bit pattern from 1 to 0. Erasable Programmable ROM (EPROM): It is programmed in exactly the same manner as a PROM. However, unlike PROMs, it can be erased and reprogrammed repeatedly. An EPROM can be erased by simply exposing the device to a strong source of ultraviolet light for certain amount of time. An EPROM eraser is not selective; it will erase the entire EPROM. Electrically Erasable Programmable ROM (EEPROM): It can be erased by an electrical charge and then written to by using slightly higher-thannormal voltage. It can be erased one byte at a time. Hence, the process of reprogramming is flexible, but slow. It is often used to store programmable instructions in devices, such as printers and other peripherals. Flash ROM: Also called Flash BIOS or Flash memory, is a type of constantly powered non-volatile memory that can be erased and re-programmed in blocks. It is often used to hold control code such as the BIOS in a personal computer. It is used in Digital cellular phones, digital cameras, LAN switches, PC Cards for notebook computers, digital set-up boxes, embedded controllers, and other devices.
Page 10
Secondary Storage: - Secondary storage or auxiliary storage, can take many forms, which have traditionally included punched cards, papers tape, magnetic tape, magnetic disk, floppies, and CD-ROMs. The information in the secondary storage device can be accessed, depending upon how the information is stored on the storage medium. Primarily, there are two methods of accessing data from the secondary storage devices: x Sequential: - Sequential access means the computer system must search the storage device from the beginning until it finds the required piece of data. The most common sequential access storage device would be a magnetic tape where data is stored sequentially and can be processed only sequentially. This access method is less expensive than other methods. The disadvantage of sequential organization is that searching for data is slow. x Direct: - Direct access, also known as random access, means that the computer can go directly to the information that the user wants. The most common direct access storage is the disk and the most popular types of disks today are magnetic and optical disks.
3.2.2.2.1.
Punched Cards Punched cards are one of the oldest and most familiar forms of data storage. There are two types of punched cards, 80 columns, and 96 columns and the first one is a standard punched card. Using one card we can represent 80 characters. If only a numeric punch is in any column, it represents whatever number is punched out.
Page 11
Page 12
Disk drive: - is part of a computer system which reads from and writes data on a disk.
Hard Disk
A high capacity magnetic disk made up of metal which can be fixed in the system unit of the computer. Serves as a secondary storage. Enables very fast accessibility of data. Accessing data from hard disk is faster than from floppy disks. The disks, which are usually grouped together into a disk pack, are separated by small air spaces to allow access for read/write head. Each disk has approximately 200 tracks on which information is stored. Tracks of the small number on all adjacent disks are referred to as a cylinder of that disk. The disk pack is mounted on a magnetic disk drive which rotates the disk at speed up to 1,000 revolutions per second. Cross section of a disk pack The total collection of tracks available on one movement of the access mechanism is known as cylinder. The amount of time it takes to retrieve (or store) data from (or to) disk is called the disk access time.
Page 13
3.2.3.
Input/output units
Input/Output units allow people and other technologies to put data into a computer and get information out of a computer.
Page 14
Page 15
Page 16
Drum Printers
x x x x Drum printers can print an entire line in a single operation. Hence, these printers are known as line printers. Their printing speed varies from 150 lines to 2500 lines per minute with 96 to 160 characters on a 15-inch line. Have limited multi-font capability, and often produce lower print quality than most recent printing technologies. Line printers are designed for heavy printing applications. They are very expensive. 2. Non-impact Printers Non-impact printers are faster and quieter than impact printers, and you find them almost everywhere these days. Non-impact printers form characters and images without direct physical contact between the printing mechanism and the paper. Two types of non-impact printers often used with microcomputers are:
Page 17
B. Plotters
A plotter is a specialized output device designed to produce high-quality graphics in a variety of colors. Plotters are used for creating large hardcopy items, such as maps, architectural drawings, and 3-D illustrations items typically too large for regular printers.
C. Microfilm
It is an extremely high speed, low cost process, which records computer generated information directly from the computer tape or cartridge to a
Page 18
Flat-Panel Displays
x x Compared to CRTs, flat-panel displays are much thinner, weigh less, and consume less power. Their biggest limitations are: Cost an LCD (Liquid-crystal display) for a desktop microcomputer costs 2-3 times as much as an equivalent CRT monitor; Images are not always as good as CRT images; and Flat-panel images cannot be clearly viewed from an angle.
Page 19
Page 20
Refresh Rate Refresh rate is the number of times per second the pixels are recharged so that their glow remains bright. Graphics Standard It is related to resolution; graphics standards combine resolution and use of color. A computer monitor is used with a graphics adapter card, an interface board between computer and monitor that performs one of severally used IBM compatible standards: color graphics adapter (CGA, the oldest and lowest resolution standard); enhanced graphics adapter (EGA), Video graphics array (VGA), and super VGA (SVGA which has the best resolution of all). There are different standards for monitors, and they support different color depths. VGA (Video Graphic Array) VGA, for video graphics array, will support 16 to 256 colors depending on the resolution. At 320 x 200 pixels it will support 256 colors; at the sharper resolution of 640 x 480 pixels it will support 16 colors, which is called 4-bit color. SVGA (Super Video Graphic Array) SVGA, for super video graphics array, will support 256 colors at higher resolution than VGA. SVGA has two graphics modes: 800 x 600 pixels and 1024 x 768. SVGA is called 8-bit color. Most new computers offer SVGA.
Page 21
3.2.4.
Interconnecting Components in a Computer and Information Movement in a Computer System. We have seen that there are different components of a computer and each performs a specific function. But to perform a given task in synchronized form there should be some mechanism of communication. For this reason there is an electronic circuit which produces communication path between the different components of a computer system along which data are transferred, that is Bus. The bus, which communicates the different parts of the CPU, is called Internal Bus. And the bus, which communicates the CPU with memory and peripheral devices, is called External Bus. The size of the bus determines the speed of efficiency of the computer. Address Bus: - is a unidirectional bus over which digital information is transferred to identify either a particular memory location or particular I/O address. Data Bus: - a bus system which interconnects the CPU, memory and all the peripheral Input / Output devices of a computer system for the purpose of exchanging data.
Page 22
This arrangement allows the processor more efficient access to memory, as the CPU-memory bus can operate at very high speeds. These high speeds are only possible, if the physical bus length is quite short. Thus, by providing a second I/O bus to accommodate the various I/O devices that may be connected to the computer, the length of the CPU-memory bus can be kept shorter than it would be if the I/O devices were to be directly attached to a single system bus. On the other hand, to keep the cost of a computer system low, a single bus running at a slower speed, may be used to connect all devices to the CPU.
Page 23
Page 24
Page 25
A. Operating system
Operating system coordinates the activity between the user and the computer. An operating system has three major functions. i. Controlling operations (control program) Coordinates, or supervises the activity of the computer system. Decides where programs and data should be stored in the computer memory. Handles communications among the computer components, applications software and the user. Controls the saving and retrieving of files to and from disks in the disk drive. It performs all its controlling tasks without the involvement or awareness of the user. ii. Input/output Management The I/O manager coordinates the computers communication with outside world, flow of data to the display screen and other output devices (printers/ plotters) and from the key board or other input devices. Handles the flow of data to and from the disk drives (file management). Handles the process of preparing a disk for use, the copying, renaming, erasing task of a file. iii. Command Processing ( command Interpreter) It interprets the commands or what you enter using the keyboard or other input devices. If you write an internal command it carries out the function of that
Page 26
Page 27
Page 28
Assembly Language
Assembler
It is machine dependent. It is not portable from one machine to another. It uses symbolic codes (mnemonic) instead of binary digits A mnemonic code is usually a strict abbreviation of the words it stands e.g. Add for Addition, SUB for subtraction, etc It is still used to write disk drive programs Advantage Writing in Assembly Language saves time and reduces the need for detail. Fewer errors are made and those made are easier to find. These programs are easier to modify. Easier to learn Easier to locate correct errors
Page 29
Disadvantage
Page 30
3.3.2.
Application Software
Is software that is designed to perform tasks for the specific area or areas. But for use in more than one installation. Are usually called application packages as they may include a number of programs along with operating instruction, documentation and so forth. Depending on their function or task they are categorized in to the following. 1. Word Processors/ Word processing is a computerized typewriter which permits the electronic creation, editing, formatting, filing and printing text. Is the most common application of microcomputers. Until recently, word processing could be done only dedicated word processors. A dedicated word processor is a computer that denies its users the opportunity to execute any other program. Example: WordStar, WordPerfect, Microsoft word 2. Spreadsheet is an electronic worksheet display on the VDU. Until recently, financial analysis and other mathematical calculation were done by entering numbers on pages of an accountants ruled ledger pad. You can quickly create a model of a situation on a spreadsheet by entering labels, numbers & formulas. Using the programs built-in function you can perform complicated calculations such as net percent value, internal rates of return, and monthly payments on a loan. Example: Lotus 1-2-3, Microsoft Excel, Quatropro 3. Database management system. Allow you to store information on a computer, retrieve it when you need it and update it when necessary. You can do this with index cards, but database management programs do them more quickly and easily. Example: You can store large mailing list, inventory record or billing and
Page 31
Page 32
CHAPTER FOUR
In the computer ON is represented by the existence of current and OFF is represented by the non-existence of current. On a magnetic disk, the same information is stored by changing the polarity of magnetized particles on the disks surface. BYTE: Bits can be organized into large units to make them represent more and
1 of 22
meaningful information. This large unit is called a byte and is the basic unit of data representation in a computer system. The commonly used byte contains 8 bits. Since each bit has two states and there are 8 bits in a byte, the total amount of data that can be represented using a single byte is 28 or 256 possible combinations. Each byte can represent a character (a character is either a letter, a number or a special symbol such as +,-,?,*, $, etc). A byte is then used as a unit of measurement in the computer memory, processing unit, external storage and during communication. If the computer memory is 524288 byte, this is expressed in short by saying 512KB, where KB stands for kilobyte. WORD: Word refers the number of bits that a computer process at a time or a transmission media transmits at a time. Although bytes can store or transmit information, the process can even be faster if more than one byte is processed at a once. A combination of bytes, then form a word. A word can contain one, two, three or four bytes based on the capacity of the computer. Word length is usually given in bits. We say that a computer is an 8-bit, a 16 bit, a 32 bit or a 64 bit computer to indicate that the amount of data it can process at a time. The larger the word length a computer has the more powerful and faster it is. 4.2 Concept of Number Systems and Binary Arithmetic Since the early days of human civilization, people have been using their fingers, sticks, and other things for counting. As daily activities became more complex, numbers became more important in trade, time, distance, and in all spheres of human life. A number system defines a set of values used to represent quantity. There are various number systems e.g. decimal, binary, octal, hexadecimal, etc 1 Kilobyte (1KB) is 210 or 1024 bytes 1 Megabyte (MB) is 220 bytes or 210 kilobytes 1 Gigabyte (GB) is 230 bytes or 220 kilobytes or 210 megabytes
2 of 22
each differs one another by the number of symbols used in the system. Each numbering system used different symbols to represent a given quantity.For a computer, everything is a number whether it may be numbers, alphabets, punctuation marks, its own instructions, etc. The number systems that are generally used by computers are: decimal, binary, octal, and hexadecimal. 4.2.1 The Decimal Number System The primary number system used is a base ten number system or decimal number system. The Decimal number system is based on the ten different digits or symbols (0,1,2,3,4,5,6,7,8,9). Starting at the decimal point and moving to the left, each position is represented by the base (radix) value (10 for decimal) raised to power. The power starts at Zero for the position just to the left of the decimal point. The power incremented for each positions that continues to the left. Moving to the right of the decimal point is just like moving to the left except that we will need to place a minus sign in front of each power. For example: (8762)10 = (8*103) + (7*102) + (6*101) + (2*100) (0.475)10= (4*10-1) + (7*10-2) + (5*10-3)
4.2.2 The Binary number system Computers do not use the ten digits of the decimal system for counting and arithmetic. Their internal structure (mainly the CPU and memory) are made up of millions of tiny switches that can be either in an ON or OFF states. Two digits, 0 and 1, are used to refer for these two states. Binary number system is based on the two different digits; 0 and 1. With binary number system, it is very easier for the hardware to represent the data. Binary number system is base two number system. For example: (01100)2 , (10110.011)2 , etc
3 of 22
The octal number system with its eight symbols (0, 1, 2, 3, 4, 5, 6, 7) is a base
For example: (322)8, (10.25)8, etc 4.2.4 Hex adecimal number system Hexadecimal number system is another number system that works exactly like the decimal and binary number systems, except that the base is 16. It uses 16 symbols (0-9, and A-F characters to represent 10-15). For example: (8F0)16 , (D.45)16, etc 4.2.5 Conversion between Number Systems Computers use binary numbers for internal data representation whereas they use decimal numbers externally. Therefore, there should be some conversion between number systems in order to represent data in a computer that is originally represented in other number systems. Some conversion methods are discussed below. Decimal to Binary It is important to note that every decimal number system has its equivalent binary number. For example:
Binary 0 01 10 11 100
Decimal 0 1 2 3 4
Decimal 5 6 7 8 9 etc.
Conversion from binary to its equivalent decimal and from decimal to its equivalent binary is possible. The method, which is used for the conversion of decimal into binary, is often called as the remainder method. This method involves the following steps. Begin by dividing the decimal number by 2 (the base of binary number system) 4 of 22
Note the remainder separately as the rightmost digit of the binary equivalent Continually repeat the process of dividing by 2 until quotient is zero and keep writing the remainders after each step of division (these remainders will either be 0 or 1) Finally, when no more division can occur, write down the remainders in reverse order (last remainder written first)
Example: Determine the binary equivalent of (44)10 2 2 2 2 2 2 44 22 11 5 2 1 1 Remainder 0 0 1 1 0 LSB (List Significant Bit) MSB (Most Significant Bit)
Taking the remainder in reverse order we have 101100. Thus the binary equivalent of (44)10 is (101100)2 In general to convert a decimal number X to a number in base M, divide X by M, store the remainder, again divide the quotient by M, store the remainder, and continue until the quotient is 0. And concatenate (collect) the remainders starting from the last up to the first. Example: Convert 7810 to base eight (Octal) 7810=1168 Example: Convert 3010 to base sixteen (hexadecimal) 3010=1E16
Binary to Decimal
In the binary to decimal conversion, each digit of the binary number is multiplied by its weighted position, and each of the weighted values is added together to get the decimal number. Example: Determine the decimal equivalent of (100100)2 1*25 + 0*24 + 0*23 + 1*22 + 0*21 +0*20 = 32+4 =36 5 of 22
Therefore, the decimal equivalent of (100100)2 is 36 simply expand the number with base m. That is
To convert binary to hexadecimal group four binary digits together starting from right and if there are no enough digits add zeros at the left. Example: hexadecimal 111100100 =0001 1110 =1 =1 14 E 0100 4 4 = (1E4)16 To convert from Octal to binary, convert each octal digit to its equivalent 3 bit binary starting from right. Example: Convert (675) eight to binary 675eight =110 111 101 =(110111101)two Convert 231eight to binary 231eight = 010 011 001 =(10011001)two Convert 111100100 to Convert 111001111 to Hexadecimal 111001111 =0001 1100 1111 =1 =1 12 B 15 F
=(1BF)16
6 of 22
To convert from Hexadecimal to binary convert each hex. Digit to its equivalent 4-bit binary starting from right. Example: Convert 23416 to binary 23416 =0010 0011 0100 = 10001101002 Convert 2AC to binary 2AC16 =0010 1010 1100 =10101011002
7 of 22
d1d2d3dm=d1*2-1+d2*2-2+d3*2-3++dj*2-j+..+dm*2-m=R
-
8 of 22
i Covert each group of the integer and the fractional part to their equivalent Octal/hexadecimal and collect the results by adding point (.) to separate the integer part from the fractional part. Ex 1:- Covert 1010.01112 to octal Ex2:- Covert 1110101.101112 to hexadecimal
most numeral systems. When the result of an addition exceeds the value of the radix, the procedure is to "carry the one" to the left, adding it to the next positional value. Carrying works the same way in binary:
1 1 1 1 1 (carried digits) 01101 +10111 ------------=100100
In this example, two numerals are being added together: 011012 (13 decimal) and 101112 (23 decimal). The top row shows the carry bits used. Starting in the rightmost column, 1 + 1 = 102. The 1 is carried to the left, and the 0 is written at the bottom of the rightmost column. The second column from the right is added: 1 + 0 + 1 = 102 again; the 1 is carried, and 0 is written at the bottom. The third column: 1 + 1 + 1 = 112. This time, a 1 is carried, and a 1 is written in the bottom row. Proceeding like this gives the final answer 1001002 (36 decimal). Subtraction works in much the same way: 00=0 0 1 = 1 (with borrow) 10=1 11=0 One binary numeral can be subtracted from another as follows:
** * (starred columns are borrowed from) 100101 1011 ---------------=011010
The following steps are involved: First, for the least significant bit(the right most bit) , 1-1 is 0 For the next bit, 0-1 cannot be computed since the subtrahend is smaller than the minuend. Borrow 1 from the third bit to form the binary number 10 (decimal 2) and do the subtraction. The operation is 10-1=1 which in decimal number system is 2-1=1 10 of 22
For the third bit, since we borrowed 1 for the second bit, we have 0-0 that is 0 For the forth bit again, we cannot perform the subtraction. However the fifth bit in the minuend is zero, so we must borrow from the sixth bit. This makes the fifth bit 10 (decimal 2). Borrowing from the fifth bit makes it 1 and the fourth bit become 10 (decimal 2). Now the subtraction in binary is 10-1=1 which is the result of the fourth bit.
For the fifth bit, we now have 1-0=1 Since we borrowed 1 from the sixth bit for the fourth bit, so for the sixth bit, the subtraction is 0-0=0
Multiplication in binary is similar to its decimal counterpart. Two numbers A and B can be multiplied by partial products: for each digit in B, the product of that digit in A is calculated and written on a new line, shifted leftward so that its rightmost digit lines up with the digit in B that was used. The sum of all these partial products gives the final result. Since there are only two digits in binary, there are only two possible outcomes of each partial multiplication:
x x
If the digit in B is 0, the partial product is also 0 If the digit in B is 1, the partial product is equal to A 1 0 1 1 (A) 1 0 1 0 (B) --------0 0 0 0 Corresponds to a zero in B
For example, the binary numbers 1011 and 1010 are multiplied as follows:
1011
Corresponds to a one in B
+ 0000 +1011 --------------=1101110 Binary Division is again similar to its decimal counterpart:
__________ 101 |11011
11 of 22
Here, the divisor is 1012, or 5 decimal, while the dividend is 110112, or 27 decimal. The procedure is the same as that of decimal long division; here, the divisor 1012 goes into the first three digits 1102 of the dividend one time, so a "1" is written on the top line. This result is multiplied by the divisor, and subtracted from the first three digits of the dividend; the next digit (a "1") is included to obtain a new three-digit sequence:
1 __________ 101 |11011 101 ----011
The procedure is then repeated with the new sequence, continuing until the digits in the dividend have been exhausted:
101 __________ 101 |11011 101 ----011 000 ----111 101 ----10
Thus, the quotient of 110112 divided by 1012 is 1012, as shown on the top line, while the remainder, shown on the bottom line, is 102. In decimal, 27 divided by 5 is 5, with a remainder of 2.
coded as a series of equivalent arrangements of bits. In this way, every character can be represented by a combination of bits that is different from any other combination. There are different coding systems that convert one or more character sets into computer codes. Some are: EBCDIC, BCD, ASCII-7 & ASCII-8, Unicode, etc. In these encodings, binary coding schemes separate the characters, known as character set, in to zones. Zone groups characters together so as to make the coding scheme to decipher and the data easier to process. With in each zone, the individual characters are identified by digit code. EBCDIC: Pronounced as Eb-see-dick and stands for Extended Binary Coded Decimal Interchange Code. It is an 8-bit coding scheme: (00000000 11111111), i.e. it uses 8 bits to represent each character. It accommodates to code 28 or 256 different characters. This provides a unique code for each decimal value 0 to 9 , each upper and lower case English letter (for total of 52), and for a variety of special characters. Since it is an 8-bit code, each group of the eight bits makes up one alphabetic, numeric, or special character. It is a standard coding scheme for the large computers. Coding Examples EBCDIC Character 0-9 a-i j-r s-z A-I J-R S-Z zone (4 Bit) 15 8 9 10 12 13 14 digit (4 Bit) 0-9 1-9 1-9 2-9 1-9 1-9 2-9 a b A B 0 9 1000 1000 1100 1100 1111 1111 0001 0010 0001 0010 0000 1001 Character Zone Digit
BCD (Binary Coded Decimal) There were two types of BCD coding techniques used before. The 4 bit BCD, which represent any digit of decimal number by four bits of binary numbers. If you want to represent 219 using 4 bit BCD you have to say 0010 0001 1001
13 of 22
i 4 bits BCD numbers are useful whenever decimal information is transferred into or out of a digital system. Examples of BCD systems are electronic ousters, digital voltmeter, and digital clocks; their circuits can work with BCD numbers. i BCDs are easy for conversion but slower for processing than binary. And they have limited numbers because with BCD we can represent only numbers 0000 for 0 and 1001 for 9 . BCD (6-bits) It uses 6-bits to code a Character (2 for zone bit and 4 for digit bit) it can represent 26 = 64 characters (10 digits, 26 capital characters and some other special characters). Some Coding Examples Character 0-9 A-I Character A Q 8 9 ASCII-7 ASCII stands for American Standard Code for Information Interchange. ASCII-7 used widely before the introduction of ASCII-8 (the Extended ASCII). It uses 7 bits to represent a character. With the seven bits, 27( or 128) different characters can be coded (0000000-1111111). It has 3 zone and 4 digit bits positions Coding examples: Charter 0-9 A-O P-Z zone (3 bit) 3 4 5 digit(4 bit) 0-9 1-15 1-10 $ % A a b 010 010 100 110 110 0100 0101 0001 0001 0010 Zone 11 10 00 00 zone (2 Bit) 0 3 digit(4 Bit) 0-9 1-9 digits 0001 1000 1000 1001
14 of 22
Also referred as ASCII-8 or Extended ASCII. It is commonly used in the transmission of data through data communication and is used almost exclusively to represent data internally in microcomputers. ASCII uses 8-bits to represent alphanumeric characters (letters, digits and special symbols). With the 8-bits, ASCII can represent 28 or 256 different characters (00000000-11111111). It assigns 4 bits for the zone and the rest for the digit. Coding Examples: Character 0-9 A-O P-Z a-o p-z Unicode Unicode has started to replace ASCII and other coding methods at all levels. It enables users to handle not only practically any script and language used on this planet; it also supports a comprehensive set of mathematical and technical symbols to simplify scientific information exchange. Unicode provides a unique number for every character, no matter what the platform, no matter what the program, no matter what the language. Unicode was originally designed to be a 16-bit code, but it was extended so that currently code positions are expressed as integers in the hexadecimal range 0..10FFFF (decimal 0..1 114 111). zone (3 BIT) digit (4 BIT) 3 4 5 6 7 0-9 1-15 0-10 1-15 0-10 a b A B ? + 1 0110 0110 0100 0100 0011 0010 0011 0001 0010 0001 0010 1111 1011 0001
15 of 22
There are different ways of representing negative numbers in a computer. In signed binary representation, the left-most bit is used to indicate the sign of the number. Traditionally, 0 is used to denote a positive number and 1 is used to denote a negative number. But the magnitude part will be the same for the negative and positive values. For example, 11111111 represents-127 while, 01111111 represents + 127. We can now represent positive and negative numbers, but we have reduced the maximum magnitude of these numbers to 127. In a 5- bit representation we use the first bit for sign and the remaining 4- bits for the magnitude. So using this 5 bit representation the range of number that can be represented is from -15 (11111) to 15 (01111) Example 1: Represent-12 using 5-bits sign magnitude representation first we convert 12 to binary i. e 1100 Now -12 = 11100
Example 2: Represent 24 using 8-bits sign magnitude representation 24=00011000 -24 = 10011000 In general for n-bit sign magnitude representation the range of values that can be represented are (2 n-1-1 ) to (2 n-1-1). Note: In sign magnitude representation zero can be represented as 0 or -0 This representation has two problems one is it reduces the maximum size of magnitude, and the second one is speed efficiency to perform arithmetic and other operations. For sign magnitude representation, correct addition and subtraction are relatively complex, involving the comparison of signs and relative magnitude of the two numbers. The solution to this problem is called the complement representation. II. Ones Complement In ones complement representation, all positive integers are represented in their correct binary format. For example +3 is represented as usual by 00000011. However, its complement, -3, is obtained by complementing every bit in the original representation. Each 0 is transformed into a 1 and each 1 into a 0. In our example, the ones complement 16 of 22
Note that in this representation positive numbers start with a 0 on the left, and negative numbers start with a 1 on the left most bit. Example 1: add 3 and 3 with word size 4 3 = 0011 -3=1100 sum =1111 (=0) Ex2. Add -4 and +6 - 4 is 11111011 + 6 is 00000110 The sum is (1) 00000001 Where 1 indicates a carry. The correct result should be 2 or 00000010. In ones complement addition and subtraction, if there is an external carry it should be added to get the correct result. This indicates it requires additional circuitry for implementing this operation. III. Twos Complement Representation In twos complement representation, positive numbers are represented, as usual, in singed binary, just like in ones complement. The difference lies in the representation of negative numbers. A negative number represented in twos complement is obtained by first computing the ones complement and then add one. Example: +3 is represented in signed binary as 00000011 Its ones complement representation is 11111100. The twos complement is obtained by adding one. It is 11111101. Example: lets try addition. (3) 00000011 + (5) +00000101 (8) 0001000 The result is correct
17 of 22
Example : add +4 and -3(the subtraction is performed by adding the twos complement). +4 is 00000100 -3 is 111111101 The result is [1] 000000001 If we ignore the external carry the result is 00000001 ( i. e 1 In decimal). This is the correct result. In twos complement, it is possible to add or subtract signed numbers, regardless of the sign. Using the usual rules of binary addition, the result comes out correct, including the sign. The carry is ignored. Ones complement may be used, but if ones complement is used, special circuitry is required to correct the result. Carry and overflow Ex (128) 10000000 +(129) 10000001 [257]=(1) 00000001 Where 1 indicates a carry. The result requires a ninth bit (bit 8, since the right- most bit is 0). It is the carry bit. The twos complement representation has one anomaly not found with sign magnitude or ones complement. The bit pattern 1 followed by N-1 zeros is its own 2s complement. To maintain sign bit consistency, this bit pattern is assigned the value 2 for 8-bit word, -128 = 10000000 its 1s complement =01111111 +1 =100000000 = -128
N
for example,
18 of 22
The addition of large positive numbers. The addition of large negative numbers. The subtraction of a large positive number from a large negative numbers. The subtraction of a large negative number from a large positive number.
Overflow indicates that the result of an addition or subtraction requires more bits than are available in the standard 8-bit register used to contain the result. Fixed format representation: We now know how to represent signed integers: however, we have not yet resolved the problem of magnitude. If we want to represent large integers, we will need several bytes. In order to perform arithmetic operations efficiently, it is necessary to use a fixed number of bytes, rather than a variable number. Therefore, once the number of bytes is chosen, the maximum magnitude of the number that can be represented is fixed. Subtraction by Use of Complements. i Complements are mainly used for representing negative numbers and subtraction. i In performing binary subtraction or addition of negative number by use of binary complements only one procedure, addition, is needed as one can subtract by adding its complements. i To subtract any number, positive or negative, substitute the required complement for the numbers to be subtracted and then add. If the result is An (n+1)-bit number, and the arithmetic is in Ones complement the (n+1) carry. If it is in Twos complement discard the (n+1) th bit. An n-bit number and the arithmetic is in Ones complement, to read the binary value calculate the ones complement of the magnitude bits and place a minus sign in front of it. Twos complement, to read the binary value calculate the twos complement of the magnitude bits and place a minus sign in front of it.
th
bit, a
carry, is added to the right most bit of the result. This process is called an end-around
19 of 22
Example:
Perform the following in ones and twos complements in 5-bits. A. 12-6 B. 6-12 C. -12-6 A = 12 B = 6, A = 01100 B = 00110 Ones complement of -A=10011 & -B=11001 Twos complement of - A= 10100 & -B= 11010 Example c: Is wrong this is because the occurrence of overflow. Arithmetic overflow is that part of the result of an operation which is lost because of the resulting value exceeds the capacity of the intended storage location.
x
Arithmetic overflow occurs when the sign bits of A and B are the same but the sign bit of the result is different.
We have
normalized this by eliminating all the meaningless zeroes to the left of the first non-zero digit and by adjusting the exponent. Example: 22.1 is normalized as .221x102. The general form of floating point representation is rMx10
rE
and E is the exponent. It can be seen that a normalized number is characterized by a mantissa less than 1 and greater than or equal to.1 all cases when the number is not zero. To represent floating numbers in the computer system it should be normalized after converting to binary number representation system. Example: 111.01 is normalized as .11101x23. The mantissa is 11101. The exponent is 3.
20 of 22
Sign
Exponent
Mantissa (significand)
In representing a number in floating point we use 1 bit for sign, some bits for exponent and the remaining bit for mantissa. In floating point representation the exponent is represented by a biased exponent (Characteristics). Biased exponent = true exponent + excess 2 the exponent. Example: mantissa. First we have to change to normalized binary i. e 234 = 11100010 0.375= 0.011 234.375 = 11100010.011 = 0.11100010011x28 true exponent = 8 excess 2 n-1 = 2 7-1= 26= 64 Biased exponent = 8+26 =8+64 = 72 = (100 1000) 2 Therefore 234.375 is represented as 1 Sign mantissa. 34.25 = 100010.012 The normalized form of 34.25 = .10001001x 26 True exponent = 6 Excess 2 n-1 = 2 Biased exponent
7-1 n-1
Represent 234.375 in floating point using 7 bit for exponent and 16 bit for
1001000 7-bits
1110001001100000 16 bits
Example: Represent 34.25 in floating point using 7 bit for exponent and 24 bits for
= 6+2
=6+64=70
21 of 22
70 = 10001102 0 1000110
Therefore, 34.25 is represented as To represent a number in floating point: i Represent the number in normalized binary form. i Find the biased exponent i Change the biased exponent to binary i Write the sign, the exponent in the exponent part and the mantissa in the mantissa part i If there are fewer digits in the exponent add zeros to the left and for mantissa add zeros to the right.
Floating-point Arithmetic
To perform floating-point arithmetic: i First correct the numbers to binary with the same exponent (the highest) i Apply the operator on the mantissa and take one of the exponent i Normalize the result Example: Find 23.375 + 41.25 using 7-bit for exponent and 10 bit for mantissa. 23.375 = 10111.011 = 0.1011101x2 = 0.010111011x2 41.25 = 111001.01 = 0.11100101x26 23.37+41.25 = 0.01011101 x 26+0.1110010x26 = (0.010111011+0.11100101) x 26 = 0.1010000101x26
5 6
22 of 22
CHAPTER FIVE
Computer System Architecture
Objective:x To know the different layers of a computer system x To know the basic building blocks of computer and how they work
Application level
Software level
Masks details of hardware from programmer and responsible for program creation, execution, access to I/O and access to a file Machine language Basic hardware component construction and their interaction Basic component for microprogramming Transistors, capacitors & resistors
3 2 Hardware part 1 0
Machine level
Device level
2. OR gate: The OR gate is composed of two or more inputs and a single output and performs Logical addition. The logical operation of the OR gate is such that the output is HIGH (1) when any of the inputs are HIGH; otherwise it is LOW (0).A plus (+) is used to show the OR operation. In other words, the OR gate is an electronic circuit that gives a high output if one or more of its inputs are high.
X Y Z=X +Y
3. AND gate: The AND gate is composed of two or more inputs and a single output and performs logical multiplication. The logical operation of the AND gate is such that the output is HIGH (1) when all the input are HIGH, otherwise it is LOW (0). A dot (.) is used to show the AND operation. Algebraic notation: X.Y Logic symbol of AND gate: x 0 0 1 1 Combination of logic gates Using combination of logic gates, complex operation can be performed. Some basic combinations of gates include: i NAND gate i NOR gate i Exclusive-OR(XOR) i Exclusive-NOR(XNOR) Y 0 1 0 1 Z= x.y 0 0 0 1
NAND gate The NAND gate is formed by the combination of NOT-AND and implies and AND function with an inverted output. The logical operation of the NAND gate is such that the output is LOW (0) only when all the inputs are HIGH (1). Algebraic notation: (X.Y) Logic symbol of AND gate:
NOR gate The NOR gate is formed by the combination of NOT-OR implies and OR function with an inverted output. The logical operation of the NOR gate is such that the output is HIGH (1) only when all the inputs are LOW (0). Algebraic notation: (X+Y) Logic symbol of NOR gate: X Y Z= (X+Y)
Exclusive-OR (XOR) gate: This gate is usually formed from the combination of the other logic gates. The exclusive-OR is an inequality function and the output is HIGH (1), when the inputs are not equal to each other. Algebraic notation: (X + Y) Logic symbol of XOR gate: Truth table for XOR gate x 0 0 1 1 Y Z 0 1 0 1 0 1 1 0
Exclusive-NOR (XNOR) gate: This gate is usually formed from the combination of the other logic gates. The exclusive-NOR is an equality function and the output is HIGH (1), when the inputs are equal to each other. Algebraic notation: (X . Y) Logic symbol of XNOR gate
Truth table for XNOR gate x 0 0 1 1 Note: 1. X + Y= X.Y + X.Y 2. X . Y= X.Y + X.Y Y Z 0 1 0 1 1 0 0 1
Typically, not all gates are used in implementation. Design and fabrication are simpler if only one or two types of gates are used. Thus it is important to identify functionally complete set of gates. This means that Boolean function can be implemented using only the gates in the set. AND, OR and NOT gates constitute functionally complete set because they represent the three operation of Boolean algebra. If there are any functionally complete sets of gates, they should synthesize these sets of Boolean operators. List of functionally complete set of gates: AND, OR, NOT AND, NOT OR, NOT NAND NOR It is preferable to construct circuitry system using only NAND or NOR gates. EXERCISES: 1. Show that, all these are functionally complete set of gates. 2. Construct XOR gate using only NAND gate. 3. Construct XOR gate using only NOR gate.
A Boolean function with n input variables could operate on 2n possible combinations. There are 3 basic Boolean operators NOT, AND, OR (-, .,+) Complex logic circuits can be constructed using the basic logic circuits. Any logic circuit can be represented by a Boolean function and vice versa. Generally, before constructing any logical circuit, it has to be simplified based on the rules of Boolean equations in order to minimize the number of required logical gates.
To construct the logic circuit of a Boolean equation, first we have to simplify the Boolean function using the rules of the operators (theorems) Even though we have different types of gates for construction we use some basic gates, and the rest can be constructed using the basic gates. The NAND or NOR gates can be used to construct the other gates. The NOT using NAND X AND using NAND X X.Y X
The XOR can be derived from the AND, NOT and OR operations i. e x + y = x. y + x. y (draw the circuit)
1.4 Construction of Logical Circuit from Logical Function and Truth Table
Any Boolean function can be implemented in electronic form as a network of gates. If you have the truth table you can generate the Boolean function and you can also use the Boolean function to construct the logical circuit. The reverse is also possible.
Algebraic Simplification Algebraic simplification involves the application of the identities to reduce the Boolean expression to one with fewer elements. 9
Example: Simplify: 1. F = ABC + ABC + ABC Sol: F = ABC + ABC + ABC = AB(C+C) + ABC = AB(1) + ABC
= AB + ABC Distributive property Complement property Identity property Distributive property
Absorbtion property
Fig. Simplified implementation of F 2. F=ABC + ABC + ABC + ABC Soln: F= ABC + ABC + ABC + ABC = ABC + ABC + AB(C +C) = ABC + ABC + AB(1) = ABC + ABC + AB Distributive property Complement property Identity property
10
a minterm. Thus, a minterm is a logical expression of n variables that employs only the complement operator and the conjunction operator. There are 2n minterms of n variables, since a variable in the minterm expression can be in either its direct or its complemented form--two choices per n variables. In general, one assigns each minterm an index based on a conventional binary encoding of the complementation pattern of the variables. This convention assigns the value 1 to the direct form (xi) and 0 to the complemented form (x'i). For example, we assign the index 6 to the minterm abc' (110) and denote that minterm as m6. Similarly, m0 of the same three variables is a'b'c' (000), and m7 is abc (111).
x
A minterm is the product of N distinct literals which results in 1 where each literal occurs exactly once.
Maxterms For a Boolean function of n variables , a sum term in which each of the n variables appears once (in either its complemented or un-complemented form) is called a maxterm. Thus, a maxterm is a logical expression of n variables that employs only the complement operator and the disjunction operator. Instead of using ANDs and complements, we use ORs and complements and proceed similarly. For example, the following are two of the eight maxterms of three variables: a + b' + c a' + b + c There are again 2n maxterms of n variables, since a variable in the maxterm expression can also be in either its direct or its complemented form--two choices per n variables. Each maxterm is assigned an index based on the opposite conventional binary encoding used for minterms. The maxterm convention assigns the value 0 to the direct form (xi) and 1 to the complemented form (x'i). For example, we assign the index 6 to the maxterm a' + b' + c (110) and denote that maxterm as M6. Similarly M0 of these three variables is a + b + c (000) and M7 is a' + b' + c' (111).
x
A maxterm is the sum of N distinct literals results in 0 where each literal occurs exactly once.
11
For a two-variable expression, the minterms and maxterms are as follows X Y Minterm Maxterm 0 0 X'.Y' X+Y 0 1 X'.Y X+Y' 1 0 X.Y' X'+Y 1 1 X.Y X'+Y' For a three-variable expression, the minterms and maxterms are as follows X 0 0 0 0 1 1 1 1 Y 0 0 1 1 0 0 1 1 Z 0 1 0 1 0 1 0 1 Minterm X'.Y'.Z' X'.Y'.Z X'.Y.Z' X'.Y.Z X.Y'.Z' X.Y'.Z X.Y.Z' X.Y.Z Maxterm X+Y+Z X+Y+Z' X+Y'+Z X+Y'+Z' X'+Y+Z X'+Y+Z' X'+Y'+Z X'+Y'+Z'
This allows us to represent expressions in either Sum of Products or Product of Sums forms I. SOP (Sum of Product method) It expresses that the output is 1 if any of the input combinations that produce 1 is true. i.e. Insert a column for the inverse of all the variables Find the rows with functional value 1 and variable value one then use them as an input for an AND operator Connect each of them using the OR gate. II. POS (Product of Sum) It expresses that the output is 1 if none of the input combinations that produce 0 is 1. i.e. Insert a column for the inverse of all the variables Find the rows with functional value 0 and variable value 0 then use them as an input for an OR operator Connect each of them using the AND gate.
12
Example
Construct the Boolean function for the following truth table: Row# 1 2 3 4 5 6 7 8 A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 F 0 0 1 1 0 0 1 0 ABC A+B+C ABC ABC A+B+C A+B+C MinTerm MaxTerm A+B+C A+B+C
SOP considers row 3, 4, and 7 with out put equals 1 F(A,B,C) = A B C + ABC +ABC POS considers row 1, 2,5,6,8 F (A, B, C) = (A+B+C) (A+B+C) (A+B+C) (A+B+C) (A+ B+ C ) To construct the logic circuit first simplify the given Boolean function and construct the network as required using the Boolean function. Exercise: which method SOP or POS require less number of logical gate to construct logic circuit?
13
B sum output
14
Co
II. Full-Adders We are not interested in performing addition on just a single pair of bits. Rather we wish to add two n bit numbers. This can be done, by putting together a set of adders so that the carry from one adder is provided as input to the next. The circuitry that can perform complete binary addition is called full adder. It accepts three separate inputs bits, the two bits to be added and a carry in. A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 Ci 0 1 0 1 0 1 0 1 Carry 0 0 0 1 0 1 1 1 Sum 0 1 1 0 1 0 0 1
15
Construct the logic circuit for Sum and Carry of full adder
Fig. Implementation of Full Adder Exercise Construct a binary adder of 4-bits Eg. 1001 1011 10100 A3A2A1A0 B3B2B1A0 C4S3S2S1S0
16
Flip Flops
Combinational circuits implement the essential functions of a digital computer. However, except for the special case of ROM, they provide no memory or state information. To store state information, a more complex form of digital circuit is used: the sequential circuit. The current output of a sequential circuit depends not only on the current input, but also on the past history of inputs. The current output of a sequential circuit depends on the current input and the current state of that circuit. The simplest form of sequential circuit is the flip-flop. There are a variety of flip-flops, all of which share two properties: A flip-flop is a bi-stable device. It exists in one of two states, and in the absence of input remains in that state. Thus, the flip-flop can function as a 1-bit memory. The flip-flop has two outputs, which are always the complements of each other. These are generally labeled Q and Q. Flip flops are the building blocks of sequential circuits. They are used to construct memories and registers. There are different types of flip flops. The simplest flip flop is the SR-latch (S-set and R-Reset) type of the SR-latch can store 1-bit of information. The S-R Latch The figure below shows configuration known as the S-R flip-flop or S-R latch. The circuit has two inputs, S (Set) and R (Reset), and two outputs, Q and Q and consists of two NOR gates hooked together in a feedback arrangement. Set-sets to one Reset-sets to zero RS latch using NOR
17
S Q Q S Q Fig. S-R Latch Block Diagram. Table a): Characteristics table Current inputs S 0 0 0 0 1 1 1 1 R 0 0 1 1 0 0 1 1 Qn 0 1 0 1 0 1 0 1 Qn+1 0 1 0 0 1 1 Comment Previous output is stored Previous output is stored Reset Reset Set Set Must be prevented Must be prevented Current state Next State
From the truth table we can see that when R= S= 0, Q = NC .That means there will not be any change that can occur in the output. That is the circuit remains latched in the last state. When R= 0 and S = 1, the circuit sets the Q output to 1. On the other hand, if R= 1 and S= 0 the Q output resets to 0. R= S=1 is never used because it leads to unpredictable operation.
18
CHAPTER SIX
Data Communications and Computer Networks
Objective: To know basic component used in data transmission To know, what a computer network is and different protocols of networks To know what is Internet and what services the Internet has
Data Transmission
The need of information has increased from time to time. This leads to the need of sharing of information among different agents (individual), which may be at different places or locations. Data communication is the exchange of information between two agents. For exchange of information, the information should be transmitted from one point to another through a transmission media called Channel. The following figure shows the different components of data communication. Agent Input 1 device 2
Transmi tter
Receiver
Output device
1|Page
Source System 1. Input information (m) 2. Input data q or signal q(t) 3. Transmitted signal s(t) 4. Received signal r(t) 5. Output data q or signal q (t) 6. Out put information m
Destination system
Information is transmitted in a form of packets. The information is divided into packets and one packet is transmitted at a time. When a packet of information is transmitted the sender must be sure that the receiver receives the information and the receiver must check that it receives correct information. The information is transmitted successfully the receiver must send an acknowledgment to the sender.
Mode of transmission
The transmission medium may be physical (it connects the transmitter and receivers through wire) or logical (There are different mode of transmission) Simplex transmission: In this transmission, signals are transmitted in only one direction: One station is transmitter and the other is receiver. Half-duplex transmission In this transmission signals are transmitted in both directions, both stations may transmit, but only one at a time. Full-duplex transmission In this transmission signals transmitted in both directions, both stations may transmit simultaneously. The medium carries signals in both directions at the same time.
There are three types of data transmission channels:A. Narrow-band:-It is the smaller band and has slow data transmission rate. E.g. telegraph line. B. Voice- band: It is the wider band and has better data transmission rate than the narrow band. Ex telephone lines are used for voice-band channel. C. Broad-band: - It is the widest band and has used to transmit large volume of data with high speed. Ex. (Oxide cable such as TV aerial lead), circuits, communications sate bites and optical fibers are used for broad band channels. Information is transmitted in the form of analog or digital. Most communication lines are designed to carry analog signals. Digital transmissions are used for telecommunications. Therefore, technique must be used to represent a digital signal in analog carrier. The process of modifying the carrier signal to transmit digital information is called Modulation. When the transmitted signal is received, the information must be reconverted into digital data. handled by a device called a modem, an acronym for modulator and demodulator. This process is called Demodulation .These conversions between digital data and analog data are
Types of signals
In communication system, data is transmitted from one point to another by means of electrical signal. There are two types of signals that can travel over the various transmission media. 1. Analog Signal: Continuously varying electromagnetic waves that may be propagated over a variety of media. For example, Wire media, twisted pair and coaxial cable. 2. Digital Signals Normally, it comprises only two states. It uses separate ON/OFF pulses that create a square rather than a continuous wave. Are considered as sequence of voltage pulses that may be transmitted over a wire medium. Transmits data faster and more accurately than analog signals.
3|Page
For example, a constant positive voltage level may represent binary 1 and a constant negative voltage level may represent binary 0.
Computer Networks
It is a collection of computers and peripheral devices connected by communication links that allow the network components to work together.
Importance of Networking
1. Resource sharing ( To share hardware such as the server To share computer CPU and hard disk) 2. To share databases 3. To share application programs 4. To undertake parallel processing 5. High reliability by having alternative sources of supply. 6. Money saving 7. Increase system performance. 8. Powerful communication medium among widely separated people.
Cables are used to physically connect the computers on the network Types of cables i. Co-axial cables ii. Twisted Pair Cables iii. Fiber Optics
4. Modem- Modulator/Demodulator It lets computers exchange information though telephone lines. When transmitting information, the modulator changes the computers digital signal to analog signal. When receiving information, the demodulator translates the analog signal Back to a digital signal. Modulator Digital to Analog Demodulator Analog to Digital Terms used in computer networking 1. Server Computers that provide shared resources to network users. 2. Clients- Computers that access shred network resources provided by a server. 3. Media The wires that make the physical connections 4. Shared data- Files provided to clients by servers across the network. 5. Shared printers and other peripherals Additional resources provided by the server 6. Resources- Any service or device, such as files, printers or other items.
Types of Networks
Based on geographical span of coverage, computer networks are broadly classified into three major categories. 1. Local Area Network (LAN) x x x x Computers are connected close together to each other with in the same local area ( ex. building, office, school ,Lab ) computers are connected directly on-premises -usually through wiring and sometimes with infrared signals (similar to your TV remote control) or low-powered radio signals It is the basic building block of any computer network. It is confined in a limited geographical area.
5|Page
Characteristics of LAN: 1. Physically limited 2. High bandwidth 3. Inexpensive cable media (Co-axial or twisted pair) 4. Used for data and hardware sharing 2. Metropolitan Area Network (MAN) x x Covers large geographic areas Uses Fiber Optics cables For example: Colleges, Universities, banks etc. 3. Wide Area Networks (WAN) x x x x x x x Communication is established through telephone lines, microwave links and satellites etc. It has no geographical limit It is made up of a number of interconnected LANs. E.g. The internet The computers are attached spread apart geographically such as a state, the country, or the world Computers in a network are situated in a wider geographical area. It may contain a number of local area network uses external communication facilities such as phone lines, cable, television lines, or satellite transmission to carry data over longer distance
How to connect
x x x x x
On-demand connection: a phone line that has a dial tone and can be accessed as needed
Dedicated communication connection-connected at all times Internet international network of networks (WAN) that provides access to a vast array of information stored in computer systems throughout the world. world wide interconnection scheme for accessing various computer networks from other computers It is a network of networks.
Internet
Based on the architecture, networks are divided into two broad categories:
6|Page
1. Peer-to-peer Networks 2. Server based Networks The type of network you choose to implement depends on i. Size of the organization ii. Level of security required iii. Level of administrative support available iv. Amount of network traffic v. Needs of the networks use vi. Network budget
1. Peer-to-peer Networks
In the peer-to-peer configuration, only two computers are directly connected by cable and one computer can directly access the resources located in the other computer.
x x x x x x x x No dedicated server Every computer acts as both a client and a server Good for 10 or few users Less security User at each computer determines what data on that computer is shared on the network., also called work groups all computers on the network belong to users and are equal as far as the network is concerned Computers simply connect with each other in a workgroup to share files, printers and Internet access. This is most commonly found in home configurations and is only practical for workgroups of a dozen or less computers
2. Server-Based
x x x x In the workgroup configuration, more than two computers are connected but the maximum number of computers is not greater than ten. In server based, one computer can directly access the resources located in other computer provided that the other computer gives permission to use the resources. There is usually a Server Machine to which all of the computers log on This server can provide various services, including
mail (including e-mail), file sharing and printer access, ensuring security across the network.
x x x x x Supports large number of users Needs dedicated server (acts only as a server, but not as a client) Security is an issue Size is limited by a server and network hardware Requires at least one professional administrator.
Network Topology
Topology: specifies the geometric arrangement of the network. Common topologies are: bus, ring, star, mesh The physical topology of a network refers to the layout of cables, computers and other peripherals. Logical topology is the method used to pass the information between the computers
8|Page
Protocol: Specifies a common set of rules and signals the computers on the network use to communicate. Protocols define the format, timing, sequence, and error checking used on the network. Common Protocols are: TCP: Transmission Control Protocol IP: Internet Protocol UDP: User Datagram Protocol FTP: File Transfer protocol HTTP: Hyper Text Transfer Protocol
Standard Topologies
1. Bus Topology All workstations are connected directly to the main backbone that carries the data. Consists of devices connected to a common, shared cable. Traffic generated by any computer will travel across the backbone and be received by all workstations This works well in a small network of 2-5 computers As the number of computers increases so will the network traffic and this can greatly decrease the performance and available bandwidth of your network Is used for a Local Area Network Is the simplest Messages are detected by all nodes and are accepted by the nodes to which they are addressed. Relies on collision detection or token passing to regulate traffic. If one node fails, the rest of the network can continue to function normally.
9|Page
Advantages of Bus Topology - Easy to implement - Low cost Disadvantages of Bus Topology - Limited cable length and workstation - Difficult to isolate network fault. x Cable fault affects all workstations One of the most common network topologies found in most offices and home networks Becomes very popular in contrast to the bus type (which we just spoke about), because of the cost and the ease of troubleshooting. Cable segments from each computer (node) are connected to a centralized component called a hub. Hub - is a device that processes and switches the messages from one incoming line to another. - Signals are transmitted from the sending computer through the hub to all computers on the network. - Failure of one computer doesnt affect the network - Failure of the hub affects the network - Cabling cost is high 2. Star Topology
Advantage of Star Topology - Easy to add new workstations - Centralized control - Centralized network - Easy to modify
10 | P a g e
if one computer on the star topology fails, then only the failed computer is unable to send or receive data
Disadvantages of Star Topology - Hubs are expensive Each computer is connected to a central hub or switch, if this device fails, the entire network fails!
3. Ring Topology x x x x x Computers are connected on a single circle of cable. Unlike the bus topology, there are no terminated ends. signals travel around the loop in one direction and pass through each computer The method by which the data is transmitted around the ring is called token passing A token is a special series of bits that contains control information Each computer acts as a repeater to boost the signal and send it to the next computer. Failure of one computer can have an impact on the entire network. Allows signals to travel farther by regenerating signals Cable failures affect limited users. Logically, a ring topology is a circular arrangement of computers where the signals from one node travel around the ring in clockwise direction .Because the signals pass through each computer, the failure of one computer or a break in a cable could bring the entire network failure.
11 | P a g e
4. Mesh Topology
Each computer is connected to every other computer by a separate cable. Provides redundant paths through the new work
12 | P a g e
Transmission Cables
The kind of cable or other medium that is used to connect the various computers in a network Common types: Twisted-pair wire, Coaxial cable, and Fiber optic cable
1. Twisted-pair wire
Is a copper wire similar to the common telephone line each of the pair of wire are twisted It can be Shielded (STP) or Unshielded (UTP) UTP: the most popular cable around the world used not only for networking but also for the traditional telephone
13 | P a g e
2. Coaxial cable
A type of wire that consists of a center wire surrounded by insulation and then a grounded shield of braided wire. The shield minimizes electrical and radio frequency interference. more expensive than standard telephone wire much less susceptible to interference and can carry much more data
Comparison
14 | P a g e
Basically the Internet was an emergency military communications system operated by the Department of Defense's Advanced Research Project Agency (ARPA). The whole operation was referred to as ARPANET. In time, ARPANET computers were installed at every university in the United States that had defense related funding. Gradually, the Internet had gone from a military pipeline to a communications tool for scientists. As more scholars came online, the administration of the system transferred from ARPA to the National Science Foundation. Years later, businesses began using the Internet and the administrative responsibilities were once again transferred. At this time no one party "operates" the Internet, there are several entities that "oversee" the system and the protocols that are involved. The speed of the Internet has changed the way people receive information. It combines the immediacy of broadcast with the in-depth coverage of newspapers...making it a perfect source for news and weather information.
15 | P a g e
These pages, written in the hyper-text markup language, have "links" that allow the user to quickly move from one document to another...even when the documents are stored in different computers. Web browsers "read" the html text and convert it into a page like the one you see on the browser windows. Each web site has an address, or Uniform Resource Locator (URL). The URL contains a set of instructions that are read by the browser.
The beginning of the URL contains the protocol. This is usually "http" (Hypertext Transfer Protocol) or "ftp" (File Transfer Protocol). The second section of the URL reveals the domain. Directories follow the domain. Lastly is the name of the document. (If no document is named the browser will automatically open any document in the directory named "default" or "index." Internet Services: E-mail transfer USENET World Wide Web (WWW, Web, W3) File transfer/access (FTP) Remote login/ execution (Telnet) Video Conferencing
E-mails Even with the multimedia excitement of the Web, Electronic Mail (email) is the most frequently used application of the Internet. Many people who have access to the Internet at school, home, and work, use the Internet for no other purpose than to send and receive email. According to International Data Corporation (IDC), on an average day in the year 2000, 5.1 billion emails are sent in the US and 8.2 billion worldwide. By 2005, 11.5 billion emails are sent each day on average in the US and 26.1 billion worldwide. (This includes
16 | P a g e
emails sent by individuals for business and personal purposes, but not mass emails sent to large lists.) It's all very easy. You create the message, log onto the Internet, and send it. The message first goes to your Internet Service Provider's mail server, which in turn sends it to the recipient's mail server. On the way your message may go through several servers, each reading the domain name in order to route it to the appropriate server. The message then remains in the recipient's mail server until he requests it by "checking his mail." Each email address you send is made up of certain components that help route it to the proper recipient: Every user, which belongs to the network, has his/her account and computer system that provides the account. To send a message User name: identifies the sender or the recipients. Domain name: identifies the computer system on which the user has an account. Examples: haile@ethionet.et
info@aau.edu.et
User Name Domain Name
The benefits of email are obvious...mostly it's quick. Also, many people feel that the rules for regular mail don't apply to email*, making it less formal, which in turn makes email easier to compose and send. It's not just friends and coworkers that are receiving email. Wherever you look, the Web is providing email addresses. This has made communication between strangers easier than ever. When you visit a Web site, click on the Web masters email address to let them
17 | P a g e
know what you think. You can read an interesting article online and immediately send the author an email. World Wide Web (WWW) x x x x x x Is one of the newest Internet services The WWW allows you to combine text, a video, graphics, and even animation to make a document a viewed easy. Links within WWW documents can take you quickly to other related documents. WWW is a set of sites that you can go o for information. The process of sharing common information of the world by the help of the Internet services. It requires special software programs like Netscape, Internet Explorer, or others. Web Browsers For Example: http://www.cnn.com Use Net x It is one of the Internet services which allow users from any where on the Internet to participate a discussion groups (News groups). It is an organized electronic mail (e-mail) system, except there is no single user that mail is sent to. x x A world wide distributed discussion group consists of a set of newsgroups. Articles or messages are posted to news groups and the articles are then broadcasted to other interconnected computer systems. Telnet:- It is a program that lets you log into a remote computer directly through the Internet and you can work on that computer. File Transfer Protocol (FTP) x x x This enables you to examine the files of remote hosts on the Internet and to transfer files between your hosts and the others. Using FTP programs we can upload or download files. But to do this there should be an admission from the remote computer. Helps to transfer files and programs from one system to another.
18 | P a g e
Video Conferencing x The Internet is, in its raw form, communication. x Video conferencing means making a conference on the Internet by individuals who live in different locations. x The individuals speak and see each other. x It is similar to conference in a hall except they are at distant.
19 | P a g e
IT in the future:
Predicting the future is always risky business. But some things are relatively certain. In the next five to ten years the following will be some of the developments in information technology. Network convergence- TV, radio, the Internet and the telephone system into a single integrated network. Why not we use TV to watch video, switch channels and surf the Internet, switch channels again and listen to some music on an FM radio station, and then switch channel again and write a term paper? Wireless mobile computing (handheld)- a new generation of wireless digital devices that combine computing and two-way communication capabilities Inexpensive supercomputer
20 | P a g e
CHAPTER SEVEN
Computer Security
Introduction to Computer Security
Security: The prevention and protection of computer assets from unauthorized access, use, alteration, degradation, destruction, and other threats.
x
Computer systems should have a set of protection policies to restrict and control the system resources Considering: Unauthorized access Malicious modification or destruction Accidental introduction of inconsistency
Security Goals
x
Data Confidentiality It is concerned with having secret data remain secret Unauthorized users should not be able to modify any data without the owners permission Includes removing data and adding false data Means nobody can disturb the system to make it unusable Privacy - the ability to keep things private/confidential Trust - do we trust data from an individual or a host? Could they be used against us?
x
Data Integrity
System Availability
x x
Authenticity - are security credentials in order? Are we talking to whom? We think we are talking to, privately or not. Integrity - has the system been compromised/altered already?
Damage or destruction of computer systems. Damage or destruction of internal data. Loss of sensitive information to hostile parties. Use of sensitive information to steal items of monetary value. Use of sensitive information against the organization's customers, which may result in legal action by customers against the organization and loss of customers. Damage to the reputation of an organization. Monetary damage due to loss of sensitive information, destruction of data, hostile use of sensitive data, or damage to the organization's reputation. Losing the ability to use the system
x x
Security Threats
A threat is a potential violation of security. The effects of various threats vary considerably: some affect the confidentiality or integrity of data while others affect the availability of a system. A computer security threat can be any person, act, or object that poses a danger to computer security. Generally, environments can be hostile because of
x x x
Physical threats - weather, natural disaster, bombs, power failures, etc. Human threats - stealing, trickery, bribery, spying, sabotage, accidents. Software threats - viruses, Trojan horses, logic bombs, denial of service, trap door.
1. Fraud and Theft Computer systems can be exploited for both fraud and theft both by "automating" traditional methods of fraud and by using new methods. For example, individuals may use a computer to skim small amounts of money from a large number of financial accounts, assuming that small discrepancies may not be investigated. Financial systems 2
are not the only ones at risk. Systems that control access to any resource are targets (e.g., time and attendance systems, inventory systems, school grading systems, and longdistance telephone systems). Insiders or outsiders can commit computer fraud and theft. Insiders (i.e., authorized users of a system) are responsible for the majority of fraud. Since insiders have both access to and familiarity with the victim computer system (including what resources it controls and its flaws), authorized system users are in a better position to commit crimes. Insiders can be both general users (such as clerks) and technical staff members. An organization's former employees, with their knowledge of an organization's operations, may also pose a threat, particularly if their access is not terminated promptly. 2. Loss of Physical and Infrastructure Support The loss of supporting infrastructure includes power failures (outages, spikes, and brownouts), loss of communications, water outages and leaks, sewer problems, lack of transportation services, fire, flood, civil unrest, and strikes. 3. Malicious Hackers The term malicious hackers, sometimes called crackers, refer to those who break into computers without authorization. They can include both outsiders and insiders. Much of the rise of hacker activity is often attributed to increases in connectivity in both government and industry. One 1992 study of a particular Internet site (i.e., one computer system) found that hackers attempted to break in at least once every other day. The hacker threat should be considered in terms of past and potential future damage. Although current losses due to hacker attacks are significantly smaller than losses due to insider theft and sabotage, the hacker problem is widespread and serious. 4. Threats to Personal Privacy The accumulation of vast amounts of electronic information about individuals by governments, credit bureaus, and private companies, combined with the ability of computers to monitor, process, and aggregate large amounts of information about individuals have created a threat to individual privacy. The possibility that all of this information and technology may be able to be linked together has arisen as a specter of the modern information age.
5. Malicious Code Malicious code refers to viruses, worms, Trojan horses, logic bombs, and other "uninvited" software. Sometimes mistakenly associated only with personal computers, malicious code can attack other platforms.
x
Viruses A small program that replicates and hides itself inside other programs usually without your knowledge. It gets attached to some part of an operating system or any other computer program. It may attach itself to any executable code, including but not limited to boot sectors and /or partition sectors of hard and/or floppy disks. A computer virus can perform: x corrupt or destroy data x increase file size x format the hard disk x degrade system performance x manipulate the directory contents x rename all files with different name
Types of viruses
A. Multi-Partite x A virus that attempts to attack both the boot sector and the executable, or program, files at the same time. x When the virus attaches to the boot sector, it will in turn affect the systems files, and when the virus attaches to the files, it will in turn infect the boot sector. x Such viruses are highly infectious. B. Companion Virus x A virus which infects executable files by creating a companion file with the same name but an .COM extension. x Since DOS executes .COM files, followed by .EXE files, and finally .BAT files, the virus loads before the executable file. 4
C. Boot sector or MBR virus x A virus which infects the boot sector of disks Boot sector x Hard disk drives, floppy diskettes, and logical drives (partitions) all have boot sectors where critical drive information is stored. Master Boot Record x On all PC fixed disks, the first physical sector is reserved for a short bootstrap program. This sector is the master Boot (MBR). D. Stealth Virus x A computer virus that actively hides itself from antivirus software by either masking the size of the file that it hides in or temporarily removing itself from the infected file and placing a copy of itself in another location on the drive, replacing the infected file with an uninfected one that it has stored on the hard drive. x A stealth virus is one that conceals the changes it makes x A stealth virus is programmed as such that it is able to conceal itself from discovery or defends itself against attempts to analyze or remove it E. Macro Virus x A macro virus is a virus written in one of the many macro languages. x The macro viruses spread via infected files, which can be documents, spreadsheets, databases, or any computer program which allows use of a macro language. x At present these viruses can infect Microsoft Word and Lotus Ami Pro documents. x This virus attaches itself to a word processing or spreadsheet file(mainly Microsoft Word or Excel file) F. Trojan (Trojan Horse) x A Trojan (or Trojan Horse) is a program which carries out an unauthorized function while hidden inside an authorized program. x It is designed to do something other than what it claims to, and frequently is destructive in its actions 5
x Seemingly innocent program contains code to perform an expected and undesirable action x Code segment that misuses its environment x Exploits mechanisms for allowing programs written by users to be executed by other users G. Worm x An independent program that reproduces by copying itself from one computer to another x Worms are self-contained and generally use networks to spread. x Self replicating program 6. Denial of Service Blocking access from legitimate users Overload the targeted computer preventing it from doing any useful work 7. Trap door Created by code inserted into system by a system programmer to bypass some normal checks Specific user identifier or password that circumvents normal security procedures
Security Solutions
There are a number of basic ways that a computer can be made more secure.
1. Backups (redundancy)
Just about everyone who has used a computer system has experienced losing important data in some kind of accident. There are many reasons why data get lost: it might be due to carelessness or natural disaster. The purpose of a backup is to make a copy of data, which is unlikely to be lost or destroyed by the same act as the original. In older times, backups of disks were always made to tape. Tape was chosen because it is a relatively cheap medium, which is easily transported. If we want a backup to be protected from the same accident that would destroy the original, we have to store it in a different physical location. Today, the economics of backup have changed and data can often be mirrored to a disk at a different physical location, by using network copying. Tapes are relatively unreliable, so they have low security compared to disks. Operating
systems have different preferred ways of making backups, using different software and media. Some things are common to all systems however. The key principle of backups is redundancy. Redundancy means making multiple copies of data, so that we always have something to fall back on. We can have backups of data, but we can also have backup of services, in case we lose an important piece of hardware. Redundancy is like an insurance policy. Clearly, making backups of every file is a time-consuming process, and it requires a lot of storage. There are two kinds of backup
x x
Full dump: copies every file on a source medium to a backup medium. Incremental or differential dump: copies files according to the level of the dump. A level 0 dump copies everything. A level 1 dump copies everything, which has changed since the last level 0 dump. A level 2 dump copies everything which has changed since the last level 1 dump or level 0 dump and so on. (i.e. all levels which are lower)
2. Encryption
The term encryption refers to the practice of obscuring the meaning of a piece of information by encoding it in such a way that it can only be decoded, read and understood by people for whom the information is intended. It is the process of encoding data to prevent unauthorized parties from viewing or modifying it. Encryption is said to occur when data is passed through a series of mathematical operations that generate an alternate form of that data; the sequence of these operations is called an algorithm. To help distinguish between the two forms of data, the unencrypted data is referred to as the plaintext and the encrypted data as ciphertext. The security of encryption lies in the ability of an algorithm to generate ciphertext that is not easily reverted to the original plaintext. Common Uses of Encryption Authentication Authentication is the process of logging in, signing on or otherwise presenting information or oneself in a manner that proves his or her identity. The most common example of authentication is the use of a username and password to gain access to a system, network or web site. The username and password combination is often referred to 7
as a persons credentials and it is frequently sent over networks. Encryption is used to protect these credentials. If no encryption is used to protect the information as it is sent over the network, an attacker could capture those credentials and assume the identity of the originator. Validation Validation describes the ability to provide assurance that a senders identity is true and that a message, document or file has not been modified. Encryption can be used to provide validation by making a digital fingerprint of the information contained within a message. A digital fingerprint is a code that uniquely identifies a file or a message by reflecting the content of the file with tremendous specificity. Data Protection Probably the most widely used application of encryption is in the area of data protection. Encryption of files protects the data that is written to the hard disk on the computer. This information protection is vital in the event of theft of the computer itself or if an attacker successfully breaks into the system. However, file encryption becomes more difficult to use and manage if the office has multiple employees. Because each employee needs the encryption key, protection of the key becomes a more difficult task. The more people who have access to encryption keys, the less effective encryption becomes. The risk of loss, theft or compromise of information rises as the number of users increases. Files that have been encrypted are also vulnerable to employees who leave the organization or who are disgruntled and may want to cause the organization harm.
Disconnect it from the Internet or any other network Not using floppy disks, CD-ROMs or any other removable disks. Antivirus is software utility, which (upon installing on a computer) searches the hard disk for viruses and removes which are found.
Popular antivirus software programs available are Norton and McAfee Antivirus programs
Functions of anti-viruses
o o o o o o o o o
Identification of known viruses Detection of suspected viruses Blocking of possible viruses Disinfection of infected objects Deletion and overwriting of infected objects
Computer security controls/Making the system Secure Authentication Using passwords, smart card, fingerprint Anti-virus Scan the system using anti-virus software Firewall Limits network access b/n trusted and untrusted hosts Encryption Encrypt clear text to cipher text