Table of Contents Chapter One 7 1. Overview of Computer science 7 1.1. Introduction to Information and Communication Technology (ICT) 7 1.2. Data versus Information 7 1.3. Definition of Computer and Computer Science 8 1.4. Characteristics of computers 9 1.5. Types of computers 10 Uses of Mainframes 18 1. Desktop Computers 22 Single Unit Systems 23 Net top Systems 23 Single Board Computers 24 Thin Clients 25 2. Mobile Computers 26 Laptops 27 Ultra books 27 Chrome books 27 Net books 28 Tablets 28 Smart phones Chapter 2: Development of Computers 2.1 History of Computers 29 32 32 Mainframes to PCs The 1960s saw large mainframe computers become much more common in large industries and with the US military and space program. IBM became the unquestioned market leader in selling these large, expensive, error-prone, and very hard to use machines. 40 2.2 Generation of Computers 41 2.3. Current trends 46 Chapter Five 48 3. ORGANIZATION OF COMPUTER SYSTEMS 48 3.1. Introduction to Computer Systems 48 3.2. Computer hardware 48 How the CPU Executes Program Instructions 60 3.3. Computer software 61 Chapter Four 64 4.Data Representation in Computers 64 4.1. Units of Data Representation 64 4.2. Concept of Number Systems and Binary Arithmetic 65 4.2.1 The Decimal Number System 65 4.2.2. The Binary number system 66 4.2.3 Octal number system 66 4.2.4. Hexadecimal number system 66 4.3. Conversion between Number Systems 66 4.3.1 Binary to Decimal 68 Binary (base2) to Octal (base 8) or hexadecimal (base16) and vice versa 69 4.3.2. Octal to hexadecimal and Vise versa 70 4.3.3. Converting Decimal Number with Fractions to Binary 70 4.3.4. Converting Binary with Fraction to Decimal 70 4.3.5. Conversion from Binary with Fraction to Octal/Hexadecimal 71 4.3.6 Conversion from Octal or Hexadecimal with Fraction to Binary 71 4.3.7. Conversion from Octal with Fraction to Hexadecimal 71 4.3.8. Conversion from Hexadecimal with Fraction to Octal 72 4.3.9. Conversion from Octal/Hexadecimal with Fraction to Decimal. 72 4.4. Binary Arithmetic 72 4.5. CODING METHODS 74 4.6. Unicode 79 4.7. Representation of Negative Numbers and Arithmetic 79 Chapter Five 87 5.Data Communications and Computer Networks 87 5.1. Basics of Data Communication 87 5.2. Data Transmission 88 5.3 Mode of transmission 89 5.4. Data Transmission Protocols 91 5.6. Computer Networks 92 5.6.1 Basic of Networking 92 5.7. Types of Networks 94 5.8. Network Topology 99 • 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. 99 Advantages of Bus Topology 100 Disadvantages of Bus Topology 100 Advantage of Star Topology 101 Disadvantages of Star Topology 101 Figure. 5.10. Ring topology 102 4. Mesh Topology 103 Transmission Cables 104 • The kind of cable or other medium that is used to connect the various computers in a network 104 • Common types: 104 – Twisted-pair cable, 104 – Coaxial cable, and 104 – Fiber optic cable 104 1. Twisted-pair wire 104 2. Coaxial cable 104 3. Fiber Optic Cables 104 – 2km without the use of repeaters. 104 – one fiber could replace hundreds of copper cables 104 5.9. Brief Introduction to Internet 105 About the Web 105 E-mails 107 Chapter Six 109 5. Computer Security 109 5.1 Introduction to Computer Security 109 6.2. Why Computer Security 110 6.3. Security Threats 110 1. Fraud and Theft 111 2. Loss of Physical and Infrastructure Support 111 3. Malicious Hackers 111 4. Threats to Personal Privacy 112 5. Malicious Code 112 Viruses 112 Virus is self-duplicating computer program that interferes with a computer's hardware or operating system (the basic software that runs the computer). Viruses are designed to duplicate or replicate them to avoid detection. Like any other computer program, a virus must be executed for it to function—that is, it must be located in the computer's memory, and the computer must then follow the virus's instructions. These instructions are called the payload of the virus. The payload may disrupt or change data files, display an irrelevant or unwanted message, or cause the operating system to malfunction. 112 There are five categories (types) of viruses, they are: parasitic or file viruses, bootstrap sector, multi-partite, macro, and script viruses. 112 Worms 113 Worm is a program that propagates itself across computers, usually by spawning copies of itself in each computer's memory. A worm might duplicate itself in one computer so often that it causes the computer to crash. Sometimes written in separate “segments,” a worm is introduced surreptitiously into a host system either for “fun” or with intent to damage or destroy information. The term comes from a sciencefiction novel and has generally been superseded by the term virus. Worms can form segments across a network and damage the network by using its resources (memory space) highly. The segments of worms across a network can communicate strengthen their damage. 113 Trojan Horses 114 There are other harmful computer programs that can be part of a virus but are not considered viruses because they do not have the ability to replicate. These programs fall into three categories: Trojan horses, logic bombs, and deliberately harmful or malicious software programs that run within Web browsers, an application program such as Internet Explorer and Netscape that displays Web sites. 114 A Trojan horse is a program that pretends to be something else. A Trojan horse may appear to be something interesting and harmless, such as a game, but when it runs it may have harmful effects. The term comes from the classic Greek story of the Trojan horse found in Homer’s Iliad. 114 Bombs 114 A bomb infects a computer’s memory, but unlike a virus, it does not replicate itself. A logic bomb delivers its instructions when it is triggered by a specific condition, such as when a particular date or time is reached or when a combination of letters is typed on a keyboard. A logic bomb has the ability to erase a hard drive or delete certain files. 114 6.4. Techniques to Reduce Security problems Virus Detection 114 117 Chapter One 1. Overview of Computer science 1.1. Introduction to Information and Communication Technology (ICT) 1.2. Data versus Information Data: Simple facts and figures It is raw and unprocessed and therefore meaningless to us. Usually it is the result of experience , observation or experiment Numbers, characters, symbols, images etc., which can be processed by a computer. Data must be interpreted, by a human or machine, to derive meaning Information: is data that has been processed for use is a human interpretation of knowledge It is processed and selected so that it is useful and applicable has meaning in some context for its receiver When information is entered into and stored in a computer, it is generally referred to as data. After processing (such as formatting and printing), output data can again be perceived as information. When information is packaged or used for understanding or doing something, it is known as knowledge. For example, there are a plenty of items listed on a MenuCard, in a hotel (data). You don't order everything, you just order the dish you want to eat, (information). Technology Is a way of solving problems by the application of knowledge from multiple disciplines. An ICT is a set-up consisting of hardware, software, data and the people who use them. It commonly includes communications technology, such as the Internet. ICT and computers is not the same thing. Computers are the hardware that is often part of an ICT system. ICT Systems are used in a number of environments, such as: offices, shops, factories, aircraft, and ships. They're also used in fields such as: communications, medicine, and farming. The importance of ICT systems are: more productive - we can complete a greater number of tasks in the same time at reduced Cost by using computers than we could prior to their invention able to deal with vast amounts of information and process it quickly able to transmit and receive information rapidly The three main types of ICT systems Information systems (are focused on managing data and information.) Control systems (mainly control machines). Communications systems (transport data from one place to another). 1.3. Definition of Computer and Computer Science A computer is a programmable machine designed to perform arithmetic and logical operations automatically and sequentially on the input given by the user and gives the desired output after processing. Computer components are divided into two major categories namely hardware and software. Hardware is the machine itself and its connected devices such as monitor, keyboard, mouse etc. Software is the set of programs that make use of hardware for performing various functions. What is computer Science? Computer Science is the study of computers and computational systems. Unlike electrical and computer engineers, computer scientists deal mostly with software and software systems; this includes their theory, design, development, and application. Principal areas of study within Computer Science include artificial intelligence, computer systems and networks, security, database systems, human computer interaction, vision and graphics, numerical analysis, programming languages, software engineering, bioinformatics and theory of computing. Although knowing how to program is essential to the study of computer science, it is only one element of the field. Computer scientists design and analyze algorithms to solve programs and study the performance of computer hardware and software. The problems that computer scientists encounter range from the abstract-- determining what problems can be solved with computers and the complexity of the algorithms that solve them – to the tangible – designing applications that perform well on handheld devices, that are easy to use, and that uphold security measures. 1.4. Characteristics of computers The characteristics of computers that have made them so powerful and universally useful are speed, accuracy, diligence, versatility and storage capacity. Let us discuss them briefly. Speed Computers work at an incredible speed. A powerful computer is capable of performing about 3-4 million simple instructions per second. Accuracy In addition to being fast, computers are also accurate. Errors that may occur can almost always be attributed to human error (inaccurate data, poorly designed system or faulty instructions/programs written by the programmer) Diligence Unlike human beings, computers are highly consistent. They do not suffer from human traits of boredom and tiredness resulting in lack of concentration. Computers, therefore, are better than human beings in performing voluminous and repetitive jobs. Versatility Computers are versatile machines and are capable of performing any task as long as it can be broken down into a series of logical steps. The presence of computers can be seen in almost every sphere – Railway/Air reservation, Banks, Hotels, Weather forecasting and many more. Storage Capacity Today’s computers can store large volumes of data. A piece of information once recorded (or stored) in the computer, can never be forgotten and can be retrieved almost instantaneously. 1.5. Types of computers These days, computers are available in many sizes and types. You can have a computer that can fit in the palm of your hand to those that can occupy the entire room; single user computers can be used by hundreds of users simultaneously. Computers also differ on their data processing abilities. Hence, computers can be classified according to purpose, Basis of Work (processing), and Size. Figure 1.1 Types of computer Classification Basis of Work Different types of computers process the data in a different manner. According to the basic data handling principles, computers can be classified into three categories: analog, digital, and hybrid. 1. Analog Computer: The computer that work with natural phenomena and physical values like earthquake measurement, speed of the wind, weight light etc is known as Analog computers. It is especially used in scientific work, medical and industrial field. These are special purpose computers. It measures physical values such as temperature or pressure that fall along a continuous scale in temperature or pressure. For example, you can see a system on petrol pump that contains an analog processor and analog device that converts flow of petrol into quantity. Speedometer in cars and your watch are other examples of analog computer. Examples: Thermometer Voltmeter Speedometer Gasoline pomp Features of Analog computer It is specific to the particular task so we cannot use it works for multiple applications. It works on continuous data and gives continuous output. It works on real time and no storage capacity. It gives in the form of a graph, signals, table etc Figure 1.2 Analog Computers 2. Digital Computer: A computer that work with digital value 0 and 1. Where 0 is OFF and 1 is ON. It works with discrete data. Digital computer does not measure the continuous data for continuous output. Most of the electronic system is based on the digital system. Digital computers are very popular for actual computers are very popular for actual computer works like preparation of the report, documentation, billing and other graphical work etc. The entire PC (Personal Computer) used today on different fields are digital computers. Examples: Abacus Desk top & pocket computers The general purpose computers Features of Digital computer It works on the discontinuous or discrete data. It is applicable for the general purpose so this is very versatile for the application. It is based on the digits 0 and 1. It is faster. It has storage section also. It is highly accurate and reliable than an analog system. Figure 1.3 Digital Computer 3. Hybrid computer: It is the combination of analog and digital computer system. It works with continuous and discrete value. The good qualities of analog and digital computers are combined on this computer and made the hybrid computer. These are used in ICU (Intensive Care Unit) of the hospital, jet planes, and other data analysis terminals. Hybrid computer transfers the data from analog to digital and digital to analog and vice-versa. Example: Intensive Care Unit (ICU) section, in the hospital, uses analog devices to measure the patient’s heart function, temperature and other vital signs. These measurements may then be converted into numbers and supplied to a digital component in the system. This component is used to monitor the patient’s vital signs and to send an immediate signal to the nurse’s station if any abnormal readings are detected. Features of hybrid computer It is an expensive system. It is designed for a special purpose so it is not versatile. It works on discrete and continuous value. It has limited storage. It is complex than other computer systems. Figure 1.4 Hybrid Computers Classification According to Purpose Computers can be applied or used for different purposes. They can be used either for special 1. Special Purpose Computers 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. These computes cannot be used for other applications unless their circuits are redesigned, that is, they lacked versatility. However, being designed for specific tasks, they can provide the result very quickly and efficiently. Example: The public telephone box Traffic control system Ticket machines (used in grocery, super market etc.) Pocket calculators etc. Counters Most analog computers are special purpose computers. 2. General-purpose computers They are designed to solve a range of problems through the use of “store program concept”. These machines can be used for various applications, ranging from scientific as well as business purpose applications. Though such computers are versatile and flexible, they generally lack in speed and efficiency. Examples: Micro, Mini Mainframe and Super computers Classification Based on Size The different types of computers can be grouped into six major categories according to size. Each category excels at specific functions. Supercomputers Mainframes Mini-computers Servers Personal computers Embedded systems Generally, sizes of computers determine the processing abilities. Larger computers have higher processing speeds while smaller ones offer the better experience for personal computing. 1. Supercomputers These are arguably the most powerful in terms of speed and accuracy. They are types of computers used in solving complex mathematical computations. They are capable of executing trillions of instructions per second, which is calculated in floating point operations per second (FLOPS). The typical personal computer used at home and the office is only capable of calculating millions of instructions per second (MIPS). Supercomputers can go even faster with the rate of peta FLOPS (or PFLOPS). This could bring up their processing numbers up to the quadrillion. Supercomputers were made popular in the 1960s by Seymore Cray. They soon became the choice for complex projects. They have evolved from the grid to cluster systems of massively parallel computing. Cluster system computing means that machines use multiple processors in one system, rather than arrays of separate computers in a grid. The operating systems that run in supercomputers vary depending on the manufacturer but are generally based on the Linux Kernel. A few popular ones include, CNK OS used in Blue Gene from IBM Cray Linux Environment used in Titan Sunway Raise OS in Sunway TaihuLight These computers are the largest in terms of size. They can occupy anything from a few feet to hundreds of feet. They also don’t come cheap as they can be priced between $200,000 to over $100 million. Year Name of Supercomputer Manufacturer Speed in PFLOPS 2008 Roadrunner IBM - USA 1.105 2009 Jaguar Cray - USA 1.759 2010 Tianhe - 1A NUDT - China 2.566 Year Name of Supercomputer Manufacturer Speed in PFLOPS 2011 K Computer Fugitsu - Japan 10.51 2012 Titan Cray - USA 17.59 2013 Tianhe – 2 NUDT - China 33.86 2014 Tianhe – 2 NUDT - China 33.86 2015 Tianhe – 2 NUDT - China 33.86 2016 Sunway TaihuLight NSC -China 93.01 2017 Sunway TaihuLight NSC -China 93.01 Table 1.1 the Top Supercomputers Since 2008 Figure 2.5 Tianhe-2 was the fastest supercomputer in 2013 - 2015 Uses of Supercomputers Because of their superiority, supercomputers are not intended for your everyday tasks. They handle exhaustive scientific applications that require complex and real-time processing. In the field of science, researchers use these machines to compute and model properties of biological compounds like protein and human blood. They are also used to interpret new diseases and strains, and predict illness behavior and treatment. The military use supercomputers to test new aircraft, tanks, and a host of weaponry and camouflage. They also use them to understand the effects they will have on soldiers and wars. These machines are also used to help encrypt and decrypt sensitive data. In entertainment, supercomputers are used to help make a flawless online gaming experience. Games like World of Warcraft demand intense processing. When thousands of gamers around the world are playing, supercomputers help stabilize the game performance. Meteorologists use them to simulate weather behavior. They can also be used to predict earthquakes. Scientists use them to simulate and test the effects of nuclear weapon detonation. Scientists also use them to simulate the events of the Big Bang and other space related projects. Hollywood uses supercomputers to create realistic animations. The famous supercomputers Deep Blue and Watson defeated chess Grandmaster Gary Kasparov and quiz expert Ken Jennings respectively. Mainframes Mainframe computers are large sized computer types. They are equally powerful but fall short in terms of the computation ability in supercomputers. They are like big file servers, enabling multiple users from nearby and remote locations to access resources at the same time. Also known as big iron, these systems can handle massive amounts of data going in and out simultaneously. This makes them popular with businesses. They are also resilient as they are capable of operating for over 10 years without failing. Users access the mainframe using terminals or personal computers. This can happen within the same building or via wide area network (WAN). Most of these systems run the z/OS (operating system) on 64bit architecture. Figure 2.6-IBM System z9 mainframe is a large size computer type Uses of Mainframes They are used in large organizations where thousands of clients have to access data simultaneously. For examples: Performing ATM cash withdrawals and deposits. During the process, communication between the mainframe and remote computer will help accomplish the financial transactions at hand. Business transactions that use credit cards or pre-paid cards. Online electronic transactions. Cloud storage. Handling of patient records in major hospitals. Making reservations and travel schedules for airline companies. Manipulation and tallying of data for census and electoral purposes. The prices of mainframe computers, especially from IBM, start at $75,000 and can go up to $1 million. System z9, Fujitsu-ICL VME and Hitachi’s Z800 are examples of Mainframes. Minicomputers Minicomputers are general purpose devices without the monumental expenses associated with a larger system. Their processing power is below that of mainframe systems but above the capabilities of personal computers. Also known as mid-range computers, these became popular in the late 1960s but have become almost extinct because of the popularity of personal computers. The latter can now perform most of the tasks reserved for minis. The first minicomputer was unveiled in 1967 by Digital Equipment Corporation and was followed later by designs from IBM and other companies. They became popular for control related functions as opposed to computing prowess. Over the years, their usage was limited to dedicated control assignments in mid-range organizations. Figure 2.7- Prototyp 1990, MicroVAX II Clone Minicomputer is a mid-sized computer Minicomputers were intended for a number of activities listed below: Switchboard control. Dedicated applications for graphics and computer design. Time-sharing, to allow multiple users to interact concurrently on a single system. Control and monitoring of manufacturing activities. Monitoring and control of laboratory equipment. Texas Instrument TI-990, K-202 and MicroVAX II are examples of minicomputers. Servers These are types of computers used to provide resources, services, and functionality to client computers in a server-client network model. Resources provided are based on the functions of a particular server, which may fall under these categories: File server Database server Print server FTP servers Application server Web server Their sizes will depend on purpose and tasks in the network. Of course bigger and more multitasking installations will require multiple system and storage installation. A common errant is that desktop systems can be used as servers. Far from it, true server systems are specialized computers with abilities far beyond what personal computers can deliver. Servers are optimized to run 24 hours and are capable of hot swapping of storage and other hardware without having to shut down the system. Figure 2.8- Hot swap disk drive bay in a server system Microcomputers/Personal Computers Microcomputers are the smallest, least expensive and the most used types of computers. They have a small memory, less processing power, are physically smaller, and permit fewer peripherals compared to super and mainframe computers. They are more commonly known as personal computers or simply PCs. The term was initially used to refer to IBM compatible computers. They became popular in the 70s and 80s, at the dawn of the microprocessor chips. These chips meant that a machine used by one individual was now feasible. The advent of PCs meant cheaper alternatives to more expensive and centralized systems. They were more affordable for office use and created cheaper networking environments. By the mid-1990s, they became the de facto computer of choice for offices and homes. The last 20 years have seen the proliferation of even smaller systems. This signaled the start of the mobile age, which continued to go with the trend of smaller devices as the new century progressed. This ultimately gave birth to wearable computers and gadgets. The operating system used in personal computers vary, but the common ones include, Windows Mac OS X Linux IOS Android Categories of personal computers include: Desktop computers Mobile computers Wearable computers 1. Desktop Computers Desktop computers are made up of separate components such as: The system unit; a rectangular case that contains important parts like the motherboard, microprocessor, memory modules, disk drive, and optical drive. The monitor. A mouse. A keyboard. Figure 2.9- A typical desktop computer fall under the small size computer that sit on desk Single Unit Systems Single unit computers, also known as all-in-one PCs, are a sub-type of desktop computers. They integrate the monitor and system unit within a single unit. They also have connectivity to a mouse, keyboard, and other peripherals, usually through USB ports. Figure 2.10- All in one single unit computer Net top Systems Net top, which are sometimes called mini PCs, are small and cheap system units. They use less power and perform less processing. Common features of Nettops include the Intel Atom microprocessor, 1-2 GB memory, and Wi-Fi connectivity. Just like any other desktop, they attach to peripheral accessories via USB ports and the monitor via VGA or DVI ports. Figure 2.11-A net top computer Single Board Computers These are the smallest possible computers which mimic the shape and functionality of full-size desktop motherboards. They fit on miniature circuit boards, the size of an ATM card and spot numerous input/output ports for connectivity to external peripherals. Standouts are USB ports for a keyboard and mouse, HDMI output to monitors, Ethernet ports, and Bluetooth/wireless capability. A single board computer (SBC) is an integrated piece of hardware which is called so because it only spots one board, unlike the desktop computer which features additional circuitry like memory chips and processor. It is also a low power, fan-less circuitry, low-cost system, and popular with hobbyists and developers. An SBC can easily be confused with an embedded system because of its size but is not, because it permits general purpose functionalities synonymous with microcomputers. Raspberry Pi3, Arduino and BeagleBone Blue are popular examples of SBC Figure 2.12- Raspberry Pi2 Single Board Computer (SPB) Thin Clients These are low-cost computer types which rely on server systems in order to provide computing services to attached monitors. They communicate to the server via the remote desktop protocol and are part of the networking implementation setup known as client/server model. While a thin client depends entirely on the availability of a server, a desktop based client (the typical desktop computer), sometimes called fat client, can operate independently of a server in case of transmission downtime. A typical thin client features most input/output ports for connectivity to peripherals. Stand out are VGA or DVI ports to the monitor, PS/2 or USB ports for keyboard and mouse, and audio input/output ports. Figure 2.13 -Ncomputing thin client 2. Mobile Computers Mobile devices have become the norm in recent years. Most users opt for laptops and tablets due to ease of use on the go, and battery power. Particular features that make mobile systems a favorite include: Extended battery use. Wi-Fi capabilities. Mobility. The most common types of mobile computers include: Laptop computers. Tablets. Smartphones. Personal Digital Assistants (PDA). Figure 2.14 A 17 inch laptop and 10 inch netbook side by side. Laptops Laptops are lightweight mobile PCs with a thin screen. They were initially called notebook computers because of their small size. They operate on batteries. Unlike desktops, these systems combine the microprocessor, screen, and keyboard in a single case. The screen folds down onto the keyboard when not in use. Ultra books Ultra books are special laptops specifically designed to be thin and lightweight. They usually have longer lasting batteries (5 hours minimum) and have strong hardware and processing power to run any software around. Ultra books also ship with the faster SSD storage in place of the slower hard disk drives that are commonly used. Chrome books Chrome books are low-end laptops that only runs the web-based Chrome operating system. After the installation of Chrome OS, additional software can only be installed via the Chrome Web Store. The OS allows you to achieve traditional PC functionality online. You can type documents, edit them, implement group discussions, have teleconferencing, and use basic online tools like search engines and e-mail. These devices are increasingly targeted for users that spend most of their time online for social activities. Their hardware includes the Intel Atom microprocessor, Wi-Fi and wired network connectivity, solid state disks (SSD), and an average of five hours of battery life. They usually do not have optical drives. Net books Net books can be thought of as mini laptops. They are smaller in size, price, and processing power. Just like Chrome books, they are primarily designed for web browsing, electronic communication, and cloud computing. They are catered to users who require less powerful client computers. Their specs are similar to Chrome books. The biggest difference is that they can run the lightweight Linux operating system. Tablets A tablet is a mobile computer equipped with a touch screen or hybrid screen, which allows the user to operate it by use of a digital pen or fingertip. Most tablets today are both multi-touch and multi-tasking, making it possible to manipulate them using multiple fingers and accomplishing multiple tasks simultaneously. Tablets are handy, especially when normal notebooks and laptops are simply too bulky for the mobile user. Figure-2.15 Tablet Smart phones Back in 1996, a company called Palm Computing developed a gadget called Palm 1000. It was revolutionary in conception but did not actually build consumer excitement. While the idea of a miniaturized computer was not new, the fact that someone had actually been able to make a device with an operating system that could work within its limitations was a huge leap forward. It was one of the biggest innovations in the tech industry. The iPhone, released in 2007, was the first true smartphone. It became an instant hit with consumers worldwide. It started the smartphone industry that still persists today. Most smartphones today use an operating system such as IOS and Android. They often have the ability to add applications. This is in contrast to regular cellular phones which only support sandboxed applications like Java games. In terms of features, smartphones support full email capabilities as well as multiple functions to serve as a complete personal organizer. Depending on the manufacturer, other functions might include additional interfaces such as miniature QWERTY keyboards, touch screens, built-in cameras, contact management, built-in navigation software, ability to read office documents in PDF and Word file formats, media software for playing music, browsing photos, and viewing video clips. Embedded Systems These are computer-based systems which are standalone electronic hardware designed to perform dedicated computing tasks. They are not general purpose installations like the personal computer. Actually, they are computers which may not always seem to be computers! They include a combination of the outer hardware, microprocessor chip, and software. The core of such systems is the microprocessor or micro-controller which execute the assigned task. The embedded software, usually firmware, is but not always fixed onto volatile memory which may not always require post-installation configurations. In any case, the hardware does repetitive assignments. The old cell phones used well before the smartphones became a phenomenon, could easily fall under the category of embedded systems since their sole purpose was to make and receive calls. Smartphones today, however, have evolved into general purpose mobile computers. Firmware on these systems is written in the read-only memory (ROM) or flash memory chips. Despite the seemingly persistent firmware which is deemed unaltered, they can be re-programmed to suit evolving demands. Popular devices that may be categorized under embedded systems are listed below: Set-top boxes MP3 players DVD players Drones Printers Antilock braking systems USB devices like internet dongles Streaming players like Google Chromecast and Roku Thermostats Calculators Toys Digital cameras ATM machines Video game consoles Routers and network peripherals Computer add-on cards and peripherals Digital watches Some useful technical terms 1. The computer which possess continuous data. (Analog computer) 2. The computers which are used in offices for general purpose. (Personal computer) 3. The fastest and most expensive computer system. (Super computer) 4. The computers that use the microprocessor as their CPU. (Microcomputer) 5. A computer that uses analog and digital device. (Hybrid computer) 6. Picture element on the monitor. (Pixel) 7. The computer that uses discrete on/off system. (Digital computer) 8. The portable computer which can be used where these is on direct electricity. (Laptop computer) 9. The original computers developed by IBM Company. (IBM PC) 10. The device which converts analog signal to digital and vice-versa. (Modem) Chapter 2: Development of Computers 2.1 History of Computers We have all heard stories of primitive peoples counting their sheep by moving sticks or stones. Our base-ten number system undoubtedly grew from the use of 10 fingers as counting objects. Together with the development of people, the need to calculate and keep track of information had become popular issue. So they soon develop a simple computing device and had a power of storing small information. However, many thousands of years elapsed before developing mechanical calculator. Some of the calculating devises are mentioned bellow: a) The Abacus: - It is one of the earliest mechanical computational devices. It was in use in the Middle East as early as 2500 BC. The familiar Chinese abacus (dating approximately 1200 AD ) is composed of a frame and a number of wires. The wires correspond to position of digits in decimal number units: tens, hundreds, and so onand the beads represent digits. Beads above the cross bar represent 5 and that bellow represent 1. The abacus shows zero, if all the bead bellow the cross bar are at the lower frame and above are at the upper frame. Addition of two numbers on the abacus can be performed by representing the first number and the second number without resetting the first. On any wire showing 10 or more, the two beads above the cross bar are moved back, and an extra 1 (the Cary) is added two the wire on the left. This process can be easily generalized to addition and subtraction of more than two numbers. Figure 2.2. Abacus Parts b) Pascal’s Calculator: - It is the first true mechanical calculator. In 1642, at the age of 19, the French philosopher and mathematician Blaise Pascal developed a rotating wheel calculator, the predecessor of the latter popular desktop calculator. He built largely to assist his father, who was a tax collector in the town of Rouen, Pascal’s calculator has one wheel corresponding to each power of 10; each wheel has 10 position, one for each of the digits (0,..9). Although, Pascal’s calculator could only add and subtract, it could be used indirectly for multiplication (by successive addition) and division (by successive subtraction) as well. Figure 2.3. Pascal’s Calculator c) 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 today’s computer was the developer of the difference engine and designer of the analytical engine. The difference engine also based on the rotating wheels principle and it was operated by means of a single crank. This devise has a power of calculation and print the output without human intervention. He finally designed significantly improved version of the difference engine (but not built) called Analytic engine. It has different key components - The store: A memory wheel consisting of set of counter wheels - 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. - Operation cards: These cards selected one of the four arithmetic operations by activating the mill to perform the selected function. - 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). - Out put: 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. Figure 2.4. Proposed Difference Engine d) Herman Hollerith’s 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 data and tabulated by using his machine. This machine processes the 1890 American census data within 3 years. It was really a great development. He finally began the tabulating Machine Company, which later becomes the International Business Machine Corporation (IBM). Figure. 2.5. Herman Hollerith’s Tabulating Machine e) Mark I: - Developed by Howard Aiken at Harvard University (1944) which was the first electromechanical computer. Instruction was provided by means of punched paper tape, which combined the functions of Babbage’s operation cards and variable cards. Each instruction had the format A1 A2 OP where A1 and A2 are registers storing the operand, 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. Figure. 2.6. Mark I Howard Aiken at Harvard University (1944) f) 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 KWPH of power. It had a capability of performing 5,000 additions 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. ENIAC did not use internally stored programs. Programs were wired on boards similar to a telephone switch board. One of the major drawbacks of ENIAC was that it had to be programmed manually by setting switches and plugging and unplugging cables. Figure 2.7. ENIAC Computer The first substantial computer was the giant ENIAC machine by John W. Mauchly and J. Presper Eckert at the University of Pennsylvania. ENIAC (Electrical Numerical Integrator and Calculator) used a word of 10 decimal digits instead of binary ones like previous automated calculators/computers. ENIAC was also the first machine to use more than 2,000 vacuum tubes, using nearly 18,000 vacuum tubes. Storage of all those vacuum tubes and the machinery required to keep the cool took up over 167 square meters (1800 square feet) of floor space. Nonetheless, it had punched-card input and output and arithmetically had 1 multiplier, 1 divider-square rooter, and 20 adders employing decimal "ring counters," which served as adders and also as quick-access (0.0002 seconds) readwrite register storage. The executable instructions composing a program were embodied in the separate units of ENIAC, which were plugged together to form a route through the machine for the flow of computations. These connections had to be redone for each different problem, together with presetting function tables and switches. This "wire-your-own" instruction technique was inconvenient, and only with some license could ENIAC be considered programmable; it was, however, efficient in handling the particular programs for which it had been designed. ENIAC is generally acknowledged to be the first successful highspeed electronic digital computer (EDC) and was productively used from 1946 to 1955. A controversy developed in 1971, however, over the patentability of ENIAC's basic digital concepts, the claim being made that another U.S. physicist, John V. Atan as off, had already used the same ideas in a simpler vacuum-tube device he built in the 1930s while at Iowa State College. In 1973, the court found in favor of the company using Atan as off claim and Atan as off received the acclaim he rightly deserved. g) 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 Automatic Computer) and EDSAC (Electronic Delay Storage Automatic Computer). Figure.2.12. Von Neumann Machine Architecture h) Commercial 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 commercial computer called UNIVAC I (Universal Automatic 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. Figure.2.13. Commercial computers Progression of Hardware In the 1950's two devices would be invented that would improve the computer field and set in motion the beginning of the computer revolution. The first of these two devices was the transistor. Invented in 1947 by William Shockley, John Bardeen, and Walter Brattain of Bell Labs, the transistor was fated to oust the days of vacuum tubes in computers, radios, and other electronics. The vacuum tube, used up to this time in almost all the computers and calculating machines, had been invented by American physicist Lee De Forest in 1906. The vacuum tube, which is about the size of a human thumb, worked by using large amounts of electricity to heat a filament inside the tube until it was cherry red. One result of heating this filament up was the release of electrons into the tube, which could be controlled by other Vaccum Tubes Figure 2.11.vacum tubes elements within the tube. De Forest's original device was a triode, which could control the flow of electrons to a positively charged plate inside the tube. A zero could then be represented by the absence of an electron current to the plate; the presence of a small but detectable current to the plate represented a one. Transistors Vacuum tubes were highly inefficient, required a great deal of space, and needed to be replaced often. Computers of the 1940s and 50s had 18,000 tubes in them and housing all these tubes and cooling the rooms from the heat produced by 18,000 tubes was not cheap. The transistor promised to solve all of these problems and it did so. Transistors, however, had their problems too. The main problem was that transistors, like other electronic components, needed to be soldered together. As a result, Figure. 2.12. Transistors the more complex the circuits became, the more complicated and numerous the connections between the individual transistors and the likelihood of faulty wiring increased. In 1958, this problem too was solved by Jack St. Clair Kilby of Texas Instruments. He manufactured the first integrated circuit or chip. A chip is really a collection of tiny transistors which are connected together when the transistor is manufactured. Thus, the need for soldering together large numbers of transistors was practically nullified; now only connections were needed to other electronic components. In addition to saving space, the speed of the machine was now Increased since there was a diminished distance that the electrons had to follow. Mainframes to PCs The 1960s saw large mainframe computers become much more common in large industries and with the US military and space program. IBM became the unquestioned market leader in selling these large, expensive, error-prone, and very hard to use machines. A veritable explosion of personal computers occurred in the early 1970s, starting with Steve Jobs and Steve Wozniak exhibiting the first Apple II at the First West Coast Computer Faire in San Francisco. The Apple II boasted built-in BASIC programming language, color graphics, and a 4100 character memory for only $1298. Programs and data could be stored on an everyday audio-cassette recorder. Before the end of the fair, Wozniak and Jobs had secured 300 orders for the Apple II and from there Apple just took off. Also introduced in 1977 was the TRS-80. This was a home computer manufactured by Tandy Radio Shack. In its second incarnation, the TRS-80 Model II, came complete with a 64,000 character memory and a disk drive to store programs and data on. At this time, only Apple and TRS had machines with disk drives. With the introduction of the disk drive, personal computer applications took off as a floppy disk was a most convenient publishing medium for distribution of software. IBM, which up to this time had been producing mainframes and minicomputers for medium to large-sized businesses, decided that it had to get into the act and started working on the Acorn, which would later be called the IBM PC. The PC was the first computer designed for the home market which would feature modular design so that pieces could easily be added to the architecture. Most of the components, surprisingly, came from outside of IBM, since building it with IBM parts would have cost too much for the home computer market. When it was introduced, the PC came with a 16,000 character memory, keyboard from an IBM electric typewriter, and a connection for tape cassette player for $1265. By 1984, Apple and IBM had come out with new models. Apple released the first generation Macintosh, which was the first computer to come with a graphical user interface(GUI) and a mouse. The GUI made the machine much more attractive to home computer users because it was easy to use. Sales of the Macintosh soared like nothing ever seen before. IBM was hot on Apple's tail and released the 286AT, which with applications like Lotus 1-2-3, a spreadsheet, and Microsoft Word, quickly became the favourite of business concerns. That brings us up to about ten years ago. Now people have their own personal graphics workstations and powerful home computers. The average computer a person might have in their home is more powerful by several orders of magnitude than a machine like ENIAC. The computer revolution has been the fastest growing technology in man's history. 2.2 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: Dominant type of electronic circuit elements used. Major secondary storage media used. Computer language used. Types or characteristic of operating system used. 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. First generation (1950s) Used vacuum tubes as components for the electronic circuit. Punched cards were the main source of inputs, and magnetic grams were used for internal storage. Operate in a speed of milliseconds (thousands of a second) and could handle more than 10,000 additions each second. Most applications were scientific calculations. Figure.2.14. First Generation Computers Second generations (early 1960s) 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.) Invented by Bell Labs. Magnetic tapes (similar with home tape caste), used for main storage, Operate in microseconds (millionths of a second) with more than 200,000 additions possible each second. Business applications become more commonplace, with large data files stored on magnetic tape and disk. (Magnetic disk: is a circular platter constructed of metal or plastic materials coated with magnetizable substance.) High-level languages COBOL and FORTRAN were introduced during this period. Batch operating systems are used that permitted rapid processing of magnetic tape files. Figure. 2.15. Second Generation of computers Third generation (late 1960s, early 1970s) Characterized by solid-state logic and integrated circuit (IC). (A single, selfcontained transistor is called discrete component. In early 1960 electronic equipment composed of discrete components transistors, capacitors, resistors, They are: manufactured separately 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. Computer storage switched from magnetic cores to integrated circuit boards that provide modularity (expandable storage) and compatibility (interchangeable equipment New input/output methods such as optical scanning and plotters. Software become more important with sophisticated operating systems, improved programming languages, Figure.2.15. Third Generation Of computers Fourth generation (late 1970s, early 1989s) Greatly expanded storage capabilities and improved circuitry. Has a large-scale integrated circuits (LSI) which has several hundred thousand transistors placed on one tiny silicon chip. Computer memory operates at speeds of nano seconds (billionths of a second) with large computers capable of adding 15 million numbers per second. Figure .2.16.Fourth Generation of computers 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. Figure. 2.17.Five generation of computers Summary of generation of computers Generation 1st 3rd 2nd 4th Circuit element Vacuum tube Transistor IC LSI and VLSI SSD Punched card Magnetic Tape Magnetic disk Mass storage device Language Machine & assembly Fortran, COBOL etc Structured language Application oriented Operating system Operator control Batch system Application oriented Time sharing Memory Access time 1ms 10μs 10ns 1ns Approx. date 1946-57 1958-64 1965-71 From 1971 above examples ENIAC, UNIVAC, UDVAC IBM7090, 7094 IBM system Late IBM product 2.3. Current trends in hardware and software include the increasing use of reduced instruction-set computing, migration to the UNIX operating system, the development of large software libraries, microprocessor-based smart terminals that allow remote validation of data, speech synthesis and recognition, application. The most advance trends in computer science is Machine learning, cloud computing and Artificial Intelligence. There are so many multi-disciplinary courses emerge as bioinformatics, biomedical computing and data analytics, obviously statistics and theoretical computer science play a big role in it. A current trend in computing is for sure the Computer Data Security and this is because computers are not only used in the office or at home but in almost every field. Computers control telephones, information on the Internet, distribution of electrical power, monitors operations in nuclear power plants among other very important applications; as it is mentioned by David Salomon in his “Elements of Computer Security”. A huge cybercrime started in 2009 and was discovered in 2010 by Net witness Corporation, a Virginia based network Security Company. “More than 75,000 computers belonging to about 2500 companies around the world (374 in the United States) have been compromised. The list of victims includes Fortune500 companies, US local, state, and federal government agencies, energy companies, ISPs, and educational institutions. The perpetrators lured company employees by free (infected) software and baited them into opening infected email attachments. Once compromised, computer was searched for sensitive corporate documents, login information, IPs and URLs of friends and colleagues, and passwords. The computer was then added to a botnet (dubbed Kneber), and employed to spread its“message” to other machines.” Salomon, D. (2010). Elements of computer security. New York: Springer-Verlag. The Kneber botnet was named like this because of the username linking the affected machines around the globe. The names of the companies affected were never revealed but “the Wall Street Journal listed Merck & Co., Cardinal Health Inc., Paramount Pictures and Juniper Networks Inc. as four companies that had been affected.” (Network World – 2015). It was also mentioned that federal companies were also part of the attack. This was one of many other cyber-attacks that make us think about the importance of Computer S ecuri t y. C om put er ex perts predi ct t hat c yber securit y wi ll concent rat e i n t he near fut ure in Smart phones, tablets, and many other personal devices that are now part of our lives and that have replaced personal computers; and this is because we do not use them only for social networks or to chat (which also covers the fact of sending sensitive personal information) but to make banking transactions, make shopping etc. Chapter Five 3. ORGANIZATION OF COMPUTER SYSTEMS 3.1. Introduction to Computer Systems System is a group of components, consisting of subsystems or procedures that work in a coordination fashion to achieve some objective. A computer system composed of components that are classified either as Computer hardware or Computer software. 3.2. Computer hardware When you go near computer, you see that different devices like the monitor, CPU, mouse, printer etc. Are connected to each other through wires. These devices are the physical parts of computer. So we can say that the Computer is a collection of many physical parts which are connected to each other with the help of wires and cables. All these physical parts of a computer are computer hardware. Some parts are used to give input, some are used to get output, some are for processing and storing data etc. According to these uses, we group the parts as: Input Devices, Output devices, Storage Devices, Processing device Processing Device(CPU ) Input Device Output Device Storage Device Figure: 3.1 Hardware Basic When we see the computer from inside, we can find that there are many parts. The figure below shows the inside of the computer. We can categorize these parts in a more detailed way. 1) Input Devices 2) Output Devices 3) Processing Device -CPU 4)Storage Devices -Primary Memory (RAM & ROM)) -Secondary Storage(floppy Disk, Hard Disk, CD-ROM) Ports are used for connecting hardware from outside like input and output devices. Buses are used for moving the information from one part to another part inside computer Input Devices Output Devices PORTS RAM BUS Mother Board Processor HARD DRIVE (CPU) ROM FLOPPY CD_ROM DRIVE Figure 3.2: Computer from Inside Now we will discuss each part in detail. 1) Input Devices: The data and instructions that a computer receives are called input. An input device is used to give instructions to the computer. It works like our sense organs (nose, eyes, ears etc) which takes in information (by smelling, seeing, listening etc) and send it to our brain. Without the input devices we cannot do anything with computer. There are many input devices like keyboard, mouse, scanner, touch-screen, joystick, light pen, MICR, OCR and OMR. We can group these input units into following types. Text input devices: Keyboard Pointing devices: Mouse, touch screen, light pen Gaming devices: Joystick Image video input devices: scanner, web cam, OCR, MICR, OMR Audio input devices: microphones Keyboard: Keyboard is the way to enter data or instruction into a computer. It has different keys for letters of alphabet, numbers, function keys, other keys which move cursor on the screen and special keys. The standard keyboard has 104 keys. Keyboard can be used to type documents and to send instructions to the CPU. Mouse: It is another common input device. It is also known as pointing device. It can be used to move cursor (a pointer) around the screen, to draw shapes or to make a choice from the menu. It is made up of small plastic box with buttons on top. On the bottom, some of the mouse have small rubber ball which rolls and control the direction of the pointer on the screen. Another type of mouse uses an optical system to track the movement of the mouse. As the mouse is dragged on the surface, the movement is converted into data which is sent to the CPU. The CPU uses this data to plot the direction of the mouse’s movement. It sends the signals to the cursor on the monitor screen, which follows the movement of the mouse exactly. The functions of the two buttons on the top of mouse are different. Left one is used to select objects and text and the right one is used to access menus. Light Pen: It is a pointing device like mouse. Its shape is like a pen. With a light pen, we can move the pointer and select the object by directly touching the object by pen on the screen. It has a light sensitive element on the tip of pen, which detects the location of the pen on the screen. We can also draw on the screen using light pens. Joystick: Joysticks are similar to mouse. They are mainly used in computer games. They are sometimes used in CAD/CAM systems and other applications. It has a stick that pivots on a base and reports its angle or direction to the device it is controlling. It has one or more buttons which are called trigger and are used to trigger the action. Scanners: Scanners are like eyes. They see the images or printed text and translate them into binary code. To do this, scanner sends a beam of light to the page and then measures how much light has reflected back. Then the digital code is generated according to the light or dark image and is given to the amount of light for each portion. This code is sent to the CPU, which then creates an image. They are used to input pictures or small portion of a page. Touch Screen : A touch screen is becoming very popular input device these days. By using touch screen monitors, user can operate a computer by simply touching the monitor. Touch input is suitable for a wide variety of computing applications. We can select options and give commands by pressing different areas on the screen. A touch screen are sensitive to the touch of a finger. A touch-screen system is made up of a touch sensor, a controller card, and a software driver. When we touch the screen area, the touch screen panel registers this touch events and passes these signals to the controller. Then the controller processes the signals and sends the data to the processor. The software driver translates touch events into mouse events. OCR (Optical Character Reader) : This device is used for the data entry purposes. It uses one of the two following methods:Matrix matching method and feature extraction method. In matrix matching method, When the OCR scanner reads data, Matrix matching takes the data as a character and compares this character with a set of stored character matrices or templates. When an image matches one of these prescribed matrices of dots within a given level of similarity, the computer labels that image as the corresponding ASCII character. In Feature extraction method, When the OCR scans the letters, scanned letters are condensed into their basic features. Then the basic features of a letter are compared to a list of features stored in a program's code. If the features matches, the letter is recognized. For example: the letter "a" is made from a circle, a line on the right side and an arc over the middle. The arc over the middle is optional. So, if a scanned letter had these "features" it would be correctly identified as the letter "a" by the OCR program. MICR: It stand for Magnetic Ink Character Recognition. It is pronounced as my-ker. It is character recognition technology used mainly by the banks to facilitate the processing of cheques. You must have seen a cheque having a number at the bottom. That number uses special magnetic ink. Writing style is also different. Magnetic ink is used so that character can be read into the system even when they are overprinted by the other marks like cancellation stamp. Characters in magnetic ink are read by a special machine. This machine changes these characters into code, so that the computer can verify the characters for its duplication. OMR: It stands for Optical Mark Recognition. It reads different marks, codes, and then convert them into computer readable code. The most common application of this device is the use of 2 HB pencil and bubble optical answer sheet in multiple choice question examinations. Students mark their answers, or other personal information, by darkening circles marked on a sheet. Afterwards the sheet is automatically graded by OMR scanning machines. Web Cam: It is a small camera, which gives an image as an input. Micro phone: It is used to give voice input to the computer. It is connected to the sound card in the computer It provides input by converting the sound into electrical signal. Output Devices: Anything that provides us with information is output device. In a computer, the Output is an information that it produces. In the computer, the output is in the form of binary code. Output devices, such as printer, monitor and speaker displays it in a way that we can understand. Output can be displayed on the screen or printed on a paper or can be heard on the speaker. Printed output is called hard copy. Output on the screen is called soft copy. Output devices can be categorize into following types: Image/video output devices: Printer, Monitor Audio output devices: Speaker, headphones Printer: Its an output device It takes what you see on the computer and prints it on the paper or transparency. Printed output is also called a hard copy . Printer uses ink to put data on paper or transparency. There are many types of printers. 1)Dot Matrix Printer 2)Ink Jet Printer 3)Daisy Wheel Printer 4) Laser Printer Speed of the printer is measured in cps(character per second),lpm(line per minute),ppm(pages per minute). The quality of the print is measured in dpi(dots per inch). Some printers can print in color also. Dot matrix, ink jet and laser printers are most commonly used printers. Printer can be classified into two categories according to the technologies used in them. Impact printer and non-impact printer. An impact printer uses a device to press/strike something against the ribbon to put a character on the page. Dot matrix, daisy and line printer are impact printers. Non-impact printers print without having a mechanism to strike against a sheet of paper. Ink jet, laser and thermal printer are non-impact printer. Dot Matrix Printer: It uses dots to form a characters on a paper. Dots are made by pins. Dot matrix printer is made up of steel pins which strike the paper through a inked ribbon to create a pattern of tiny dots. The quality of print depends upon the number of steel pins in the machine. Daisy Wheel printer: In this type of printer, the part that puts the characters looks like a wheel. Numbers and letters are arranged in a wheel. And the daisy wheel spins until the correct letter is in position. Then hammer strikes the character against the ribbon, printing it on the paper. Line Printer: It prints a complete line of text at a time. It uses drum or chain with all the characters in the character set on it. The drum or chain moves and prints the necessary characters in the right place. Ink jet printer: It prints the character using fine jet of ink which comes out from the tiny nozzles onto the paper. The ink is kept in reservoir and fed into the firing chambers just below each nozzle. Laser Printer: It uses a beam of light (laser beam) to convert binary data into print. The laser puts an electric charge in the shape of a character on the rotating drum. The dry ink or toner stick only to the drum where it has been charged. These printers are very fast. They can print a whole page at once. Thermal Printer: It uses heat to put the characters on the paper. The paper has a special coating on it. The printer uses heated wires to turn the paper black. It is basically used for taking ECG in hospital or lab. Plotter: Plotter is a special type of output device designed to produce high quality graphics in a variety of colors. Monitor: It is a visual display unit (VDU), often called a monitor. Computer generates data or output which can be displayed on the monitor. It is an electrical device and looks like a television screen. There are two types of monitors: CRT monitor and LCD Monitors. CRT Monitor uses picture tubes also called cathode ray tube ( picture tube is used in television) to display information or image on the screen. Generally these monitors are large and bulky due to this picture tube. It also require relatively high voltage power supply. Because of the high voltage requirement and bulky size, A newer monitors have been developed and used these days with new technology. They use flat panel LCD (liquid crystal display) display in place of cathode ray tube. They are very thin and light weight. Speaker: Speakers are output devices which produce sound. They are just like a stereo speakers. Storage Devices The most important feature of computer is its storing capacity. Memory is the place in the computer where information can be stored. Every computer has two kinds of memory. Primary memory and secondary memory. When we use any program, the computer loads the program from hard disk (secondary memory)to faster memory RAM (Primary memory). We perform the operations while the program is in RAM. The data gets written back to hard disk(secondary memory) when we save or quit the program, Primary memory: Primary storage, or memory, is directly accessible to the CPU. The CPU continuously reads instructions stored in the memory and executes them. It has two parts: Read Only Memory(ROM) and Random Access Memory(RAM). RAM: When we enter data from keyboard, the data is first read by the RAM. The output is also stored in RAM. But the information will be stored in it as long as computer is on. When the computer is switched off, all the data stored in it is lost. That is why it is called temporary or volatile memory. It is called Random Access Memory because the computer can pick out or access any piece of data from any location of memory. ROM: This memory is used to store things which are never going to change. In ROM data or program cannot be written or stored but only can be read. The instructions cannot be changed, and they won't be wiped out when the computer is turned off. That is why this memory is called permanent or nonvolatile memory. This memory is used to store the program like operating systems . When the computer is switched on and it is starting up, the instructions stored in ROM tells the CPU how to go ahead. Secondary Memory: Primary memory or memory is a temporary memory and when we turn off the computer, programs and data present in the memory get erased. When we are sharing the computer, we must yield the memory to someone else to run the program. Also, we want to store data and programs we have processed in computer. So we need to have some permanent storage.To store the data permanently, secondary memory is used. Secondary memory is used to store large amount of data permanently as compared to primary memory. There are various types of secondary storage devices available like, floppy disk, hard disk, CD-ROM, pen drive etc. Floppy Disk: Floppy disk is a circular thin plastic jacket coated with magnetic material. It is covered with a hard plastic cover to protect this disk. It stores information magnetically on one or both sides. This is very useful in transferring data from one computer to another. Most floppy disks are 3.5 inches in size. Floppy disk drive should be present in computer for reading or writing data in floppy disk. These days, floppy disks are not used much. Hard Disk: Hard disk is a solid, rounded disk made up of magnetic material and placed inside the computer. They do exactly the same thing as floppy disk, except that its storing capacity is more. The information stored in hard disk is permanent until we erase it. Optical Disk Storage: Optical disk technology is categorized by its read/write capability. It uses the following technology: In these kind of disks, a metallic material is spread over the surface of the disk. A laser heats the surface and when the data is entered, due to the laser heat, tiny spots are created on the surface of disk. To read the data from disk, laser scans the disks, and the lens picks up different light reflections from the various spot. CDs( compact Disk) come into this category. CD-ROMs are one type of CD, in which we can't write or change anything. We can only read. CD-ROM is recorded on by the manufacturer. Such a disk cannot be used for our files, but manufacturer’s supply the software’s in CD-ROM. It is like a compact disk we buy from music store and tt is a read-only disk. It means that it can't be erased or written by the user. It can store much more information than floppy disk. We need to have a CD-drive installed on computer to read from CD-ROM. In CD drive, we get write CD drive or CD-RW as an option. CD-RW is a write once and read many times media. With a CD-RW drive, we can store our data. This is an convenient, inexpensive and safe way to store large volume of data. DVDs: Digital Versatile disk(DVD) are now widely used in computers. Data are stored just like in CDs. DVD disks are read by laser beam of shorter wave length than used by the CD-ROM, which allows increased storage capacity in DVDs. USB Pen Drive: It is a flash memory data storage device integrated with USB( Universal serial port) interface. It is removable and rewritable, much smaller than a floppy disk (size:1 to 4 inches or 2.5 to 10 cm), and weighs less than 2 ounces (60 g). Its storage capacity ranges from 64 MB to 32 GB. It is compact, faster, and holds much more data. Its design is more durable. To access the data stored in a flash (pen) drive, the drive must be connected to a USB port built into a computer. Processor: Secondary memory Programsecondary memory Central Processing Unit output Input Control Arithmetic Unit Logic Unit Memory Figure: 3.3. Central Processing Unit Central Processing Unit (CPU): There is a main part of computer that takes input, processes the data and gives output. This part is called central processing unit (CPU). It is a highly complex electronic circuitry. All the computers have a central processing unit. CPU has direct relationship with Primary memory. The CPU interacts closely with primary storage, or main memory, for instructions and data. Data is stored in main memory temporarily, while the CPU is executing a program. But, memory is not part of the CPU. CPU has two parts: The control unit and the arithmetic/logic unit. Each part has a specific function. Control Unit: They are the in charge of computer. The control unit directs the flow of information to entire computer system or to execute the instructions. Control unit is like a leader of the music concert. In the music concert, leader does not plays the music but controls and instruct the group to perform. Similarly, the control unit does not execute program instructions; it directs the other parts of the system to do so. The control unit communicates with both the arithmetic/logic unit and memory. Arithmetic/Logic unit (ALU):The arithmetic/logic unit executes all the arithmetic and logical operations. The arithmetic/logic unit can do all the mathematical calculations: addition, subtraction, multiplication, and division. It also performs logical operations. A logical operation is basically a comparison of values. It can compare numbers, letters, or special characters. some common logic comparison symbols are = equal to < less than > greater than <= less than or equal to >= greater than or equal to <> not equal The computer can take action based on the result of the comparison. This is a very important capability. By comparing computer can tell, for instance, whether there are seats available on Train to go to particular place, whether person has exceeded the quota of issued books in library. How the CPU Executes Program Instructions Before the execution of a program, the program data and instructions are moved into the memory from input device or from secondary storage device. Then the CPU performs the following steps. 1. The control unit first gets the instructions from memory. It checks what the instruction means and accordingly sends the necessary data from memory to arithmetic/logic unit. 2. The arithmetic/logic unit then performs the actual operation on data and stores the result back in the memory. When the results are in memory, then the control unit tells the memory to send the result to an output device or a secondary storage device. The above process is shown in the figure 3.4. Control Unit Arithmetic/Logic 2) Decode and send to ALU 1)Get the instruction Memory Figure: 3.4 Executions in CPU Unit 3)execute 4)store 3.3. Computer software Computer software is the set of programs that makes the hardware perform a set of tasks in Particular order. Hardware and software are complimentary to each other. Both have to work Together to produce result Computer software is classified into two broad categories; system software and application software System Software: System software consists of a group of programs that control the operations of a computer Equipment including functions likes managing memory, managing peripherals, loading, Storing, and is an interface between the application programs and the computer. MS DOS (Microsoft’s Disk Operating System), UNIX is examples of system software. Application software: Software that can perform a specific task for the user, such as word processing, accounting, Budgeting or payroll, fall under the category of application software. Word processors, spreadsheets, database management systems are all examples of general purpose application software. Types of application software are: Word processing software: The main purpose of this software is to produce documents. MS-Word, Word Pad, Notepad and some other text editors are some of the examples of word processing software. Database software: Database is a collection of related data. The purpose of this software is to organize and manage data. The advantage of this software is that you can change the way data is stored and displayed. MS access, dBase, FoxPro, Paradox, and Oracle are some of the examples of database software. Spread sheet software: The spread sheet software is used to maintain budget, financial statements, grade sheets, and sales records. The purpose of this software is organizing numbers. It also allows the users to perform Simple or complex calculations on the numbers entered in rows and columns. MS-Excel is one of the examples of spreadsheet software. Presentation software: This software is used to display the information in the form of slide show. The three main functions of presentation software is editing that allows insertion and formatting of text, including graphics in the text and executing the slide shows. The best example for this type of application software is Microsoft PowerPoint. Multimedia software: Media players and real players are the examples of multimedia software. This software will allow the user to create audio and videos. The different forms of multimedia software are audio converters, players, burners, video encoders and decoders. 63 of 118 Chapter Four 4.Data Representation in Computers We enter data into a computer or review (see) output data from a computer using the letter of alphabet, various special symbols, and the numerals in the decimal number system. But since computer is an electronic device, which understands electrical flow (signal), there is no letter, symbol or number inside the computer. Computer works with binary numbers. 4.1. Units of Data Representation When data is stored, processed or communicated within the computer system, it is packed in units. Arranged from the smallest to the largest, the units are called bit, byte, and word; these units are based on the binary number system. BIT: Bits are the smallest units and can convey only two possible states 0 or 1; Bit stands for Binary digits; A bit is a single element in the computer, on a disk that stands for either “ON” indicating 1 or “OFF” indicating 0; 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 disk’s surface. BYTE: Bits can be organized into large units to make them represent more and 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. 64 of 118 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. - 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 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, four or eight 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 A number system defines a set of values used to represent quantity. There are various number systems e.g. decimal, binary, octal, hexadecimal, etc each differs one another by the number of symbols used in the system. Each numbering system used different symbols to represent a given quantity.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) 65 of 118 (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. 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 4.2.3 Octal number system The octal number system with its eight symbols (0, 1, 2, 3, 4, 5, 6, and 7) is a base 8 system. For example: (322)8, (10.25)8, etc 4.2.4. Hexadecimal 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.3. 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 Decimal 0 0 01 1 66 of 118 10 2 101 5 11 3 110 6 100 4 111 7 1000 8 1001 9 Binary Decimal 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) - 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 44 2 22 0 LSB (List Significant Bit) 2 11 0 2 5 1 2 2 1 2 1 0 1 1 Remainder MSB (Most Significant Bit) Taking the remainder in reverse order we have 101100. Thus the binary equivalent of (44)10 is (101100)2 67 of 118 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 4.3.1 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 Therefore, the decimal equivalent of (100100)2 is 36 In general to convert a number X consists of digits X1 X2 X3 …Xn in base m to decimal; simply expand the number with base m. That is (X1X2X3…Xn) m =X1*mn-1+X2*mn-2 +X3*mn-3+...+ Xi*mn-i+… Xn-1m1+Xn*m0 =Y10 Example: convert (234)8 to decimal =2*82 + 3*81 + 4*80 = 128+24+4 = 156 Example: convert (A1B) 16 to decimal =A*162 + 1*161 + B*160 = 2587 68 of 118 Binary (base2) to Octal (base 8) or hexadecimal (base16) and vice versa To convert a number in binary to octal group three binary digits together starting from the last digit (right) and if there are no enough digits add zeros to the front end (left) and find the corresponding Octal of each group. Example: Convert 1001001 to octal Convert 101101001 to octal 1001001=001,001,001 101101001 = 1118 =101,101,001 =5518 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: Convert 111100100 hexadecimal to Convert 111001111 to Hexadecimal 111001111 =0001 1100 1111 111100100 =0001 1110 0100 =1 14 4 =1 E 4 =1 12 15 =1 B F =(1BF)16 = (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 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 69 of 118 = 10001101002 2AC16 =0010 1010 1100 Convert 2AC to binary =10101011002 4.3.2. Octal to hexadecimal and Vise versa To convert from Octal to hexadecimal, first we have to convert to binary and the binary to hexadecimal. To convert from hexadecimal to Octal, first we have to convert to binary and then the binary to Octal. Example: Convert 2358 to hexadecimal Convert (1A)16 to Octal 2388=010 011 101 1A=0001 1010 =0000 1001 1101 =000 011 010 =0 = 0 9 13 =9D16 3 2 =328 4.3.3. Converting Decimal Number with Fractions to Binary - First change the integer part to its equivalent binary. - Multiply the fractional part by 2 and take out the integer value, and again multiply the fractional part of the result by 2 and take out the integer part, continue this until the product is 0. - Collect the integer values from top to bottom & concatenate with the integer part. Example. A) Convert 12.2510 to binary B) Convert3.1875 to binary 1100.01 11.0011 4.3.4. Converting Binary with Fraction to Decimal To convert a binary number Y1Y2Y3Y4Yn.d1d2d3…dm to decimal - first convert the integer part to decimal by using y1 y2 y3 y4…yn=y1*2n-1+y2*2n-2+….yj*2n-j+….+yn-1*21+yn*20=Q and - Convert the fractional part to decimal by using 70 of 118 d1d2d3…dm=d1*2-1+d2*2-2+d3*2-3+…+dj*2-j+..+dm*2-m=R - Then decimal equivalence of y1 y2 y3 y4…..yn.d1d2…dm will be Q+R where Q is the integer part and R is the fractional part. Ex1 : Convert 11001.0101 to decimal 11001 = 1x24 + 1x23 Ex 2: Convert 1000.1 to decimal 1000 = 1+23 +0+0+0=8 +0x22+0x21+1x20= 16+8+1= 25= Q 1= 1x2-1=½ = 0.5 0101 =0x2-1+1x2-2+0x2-3+1x2-4 1000.1 = 8.510 = 0+¼+0+1/16 = 0.3125 = R =>11001.0101 = 25.3125. 4.3.5. Conversion from Binary with Fraction to Octal/Hexadecimal Group three/four digits together starting from the last digit of the integer part, and if there is less number of digits add some zeros in the beginning. Group three/ four digits together starting from the first digit of the fractional part, and if there is less number of digits add some zeros to the end. 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 4.3.6 Conversion from Octal or Hexadecimal with Fraction to Binary Convert each Octal/hexadecimal digit to its equivalent 3/4-bit binary digit. Collect the binary sequences by separating the integer part binaries from the fractional part binaries with point (.) 4.3.7. Conversion from Octal with Fraction to Hexadecimal To convert from Octal to hexadecimal, first convert the Octal to binary and then the binary to hexadecimal 71 of 118 4.3.8. Conversion from Hexadecimal with Fraction to Octal To convert from hexadecimal to Octal, first convert the hexadecimal to binary and then the binary to Octal. 4.3.9. Conversion from Octal/Hexadecimal with Fraction to Decimal. To convert from Octal/hexadecimal to decimal, first convert to binary and –then the binary to decimal. 4.4. Binary Arithmetic Arithmetic in binary is much like arithmetic in other numeral systems. Addition, subtraction, multiplication, and division can be performed on binary numerals. The simplest arithmetic operation in binary is addition. Adding two single-digit binary numbers is relatively simple: 0+0=0 0+1=1 1+0=1 1 + 1 = 10 (carry:1) 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 Subtraction works in much the same way: 0−0=0 0 − 1 = 1 (with borrow) 1−0=1 72 of 118 1−1=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 - 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. For example, the binary numbers 1011 and 1010 are multiplied as follows: 1 0 1 1 (A) × 1 0 1 0 (B) --------0 0 0 0 ← Corresponds to a zero in B 73 of 118 + 1011 ← Corresponds to a one in B + 0000 +1011 --------------=1101110 Binary Division is again similar to its decimal counterpart: __________ 101 |11011 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: 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. 4.5. CODING METHODS In today’s technology, the binary number system is used by the computer system to represent the data in the computer in understandable format. There are a lot of ways to represent, numeric, alphabetic, and special characters in computer’s internal storage area. It is possible to represent any of the character in our language in a way as a series of electrical switches in arranged manner. These switch arrangements can therefore be 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. 74 of 118 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. Coding Examples Character zone (4 Bit) digit (4 Bit) Character Zone 0-9 15 0-9 a 1000 0001 a-i 8 1-9 b 1000 0010 j-r 9 1-9 A 1100 0001 s-z 10 2-9 B 1100 0010 A-I 12 1-9 0 1111 0000 J-R 13 1-9 9 1111 1001 S-Z 14 2-9 Digit 75 of 118 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 001000011001 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. BCD’s 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 zone (2 Bit) 0-9 0 0-9 A-I 3 1-9 Character Zone A 110001 Q 101000 8 001000 9 digit (4 Bit) digits 00 1001 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 76 of 118 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 zone (3 bit) digit(4 bit) $ 010 0100 0-9 3 0-9 % 010 0101 A-O 4 1-15 A 100 0001 P-Z 5 1-10 a 110 0001 b 110 0010 The ASCII System 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 zone (3 BIT) digit (4 BIT) 0-9 3 0-9 a 0110 0001 A-O 4 1-15 b 0110 0010 P-Z 5 0-10 A 0100 0001 a-o 6 1-15 B 0100 0010 p-z 7 0-10 ? 0011 1111 77 of 118 + 0010 1011 1 0011 0001 78 of 118 4.6. 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). 4.7. Representation of Negative Numbers and Arithmetic There are different ways of representing negative numbers in a computer. I. Sign- magnitude representation. 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 79 | P a g e 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. One’s Complement In one’s 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 one’s complement representation of -3 is 11111100. Example: +2 is 00000010 -2 is 11111101 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 one’s 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. 80 | P a g e III. Two’s Complement Representation In two’s complement representation, positive numbers are represented, as usual, in singed binary, just like in one’s complement. The difference lies in the representation of negative numbers. A negative number represented in two’s complement is obtained by first computing the one’s complement and then add one. Example: +3 is represented in signed binary as 00000011 Its one’s complement representation is 11111100. The two’s complement is obtained by adding one. It is 11111101. Example: let’s try addition. (3) 00000011 + (5) +00000101 (8) 0001000 The result is correct Example: Let’s try subtraction (3) 00000011 (-5) + 111111011 11111110 Example : add +4 and -3(the subtraction is performed by adding the two’s 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 two’s 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. One’s complement may be used, but if one’s complement is used, special circuitry is required to “correct the result”. Carry and overflow 81 | P a g e 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 two’s complement representation has one anomaly not found with sign magnitude or one’s complement. The bit pattern 1 followed by N-1 zeros is its own 2’s complement. To maintain sign bit consistency, this bit pattern is assigned the value –2Nfor example, for 8-bit word, -128 = 10000000 its 1’s complement =01111111 +1 =100000000 = -128 Overflow will occur in four situations, including: 1. The addition of large positive numbers. 2. The addition of large negative numbers. 3. The subtraction of a large positive number from a large negative numbers. 4. 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. 82 | P a g e Subtraction by Use of Complements. Complements are mainly used for representing negative numbers and subtraction. In performing binary subtraction or addition of negative number by use of complements only one procedure, binary addition, is needed as one can subtract by adding its complements. 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) th bit, a carry, is added to the right most bit of the result. This process is called an end-around carry. If it is in Two’s 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. - Two’s complement, to read the binary value calculate the two’s complement of the magnitude bits and place a minus sign in front of it. Example: Perform the following in ones and two’s 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 Two’s 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. Arithmetic overflow occurs when the sign bits of A and B are the same but the sign bit of the result is different. 83 | P a g e Floating-point representation In this representation decimal numbers are represented with a fixed length format. In order not to waste bits, the representation will normalize all the numbers. For example, 0.000123 wastes three zeroes on the left before non -zero digits. These zeroes have no meaning except to indicate the position of the Decimal point. Normalizing this number result in .123x10-3.123 is the normalized mantissa; -3 is the exponent. 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 Mx10E where M is the mantissa, 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. The general structure of floating point is 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 2n-1, where n is the number of bits reserved for the exponent. Example: Represent –234.375 in floating point using 7 bit for exponent and 16 bit for mantissa. First we have to change to normalized binary i. e 234 = 11100010 84 | P a g e 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 1001000 Sign 1110001001100000 7-bits 16 bits Example: Represent 34.25 in floating point using 7 bit for exponent and 24 bits for mantissa. 34.25 = 100010.012 The normalized form of 34.25 = .10001001x 26 True exponent = 6 Excess 2 n-1 = 2 7-1= 6+26 Biased exponent =6+64=70 70 = 10001102 Therefore, 34.25 is represented as 0 1000110 100010010000…..0 To represent a number in floating point: Represent the number in normalized binary form. Find the biased exponent Change the biased exponent to binary Write the sign, the exponent in the exponent part and the mantissa in the mantissa part 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: First correct the numbers to binary with the same exponent (the highest) Apply the operator on the mantissa and take one of the exponent Normalize the result 85 | P a g e Example: Find 23.375 + 41.25 using 7-bit for exponent and 10 bit for mantissa. 23.375 = 10111.011 = 0.1011101x25 = 0.010111011x26 41.25 = 111001.01 = 0.11100101x26 23.37+41.25 = 0.01011101 x 26+0.1110010x26 = (0.010111011+0.11100101) x 26 = 0.1010000101x26 86 | P a g e Chapter Five 5.Data Communications and Computer Networks 5.1. Basics of Data Communication Data communication: is the process of sharing ideas, information and messages with others in a particular time and place. It is exchange of data between two or more parties. For data communications to occur, the communicating devices must be part of a communication system made up of a combination of hardware (physical equipment) and software (programs). The effectiveness of a data communications system depends on four fundamental characteristics: delivery, accuracy, timeliness, and jitter. 1. Delivery. The system must deliver data to the correct destination. Data must be received by the intended device or user and only by that device or user. 2. Accuracy. The system must deliver the data accurately. Data that have been altered in transmission and left uncorrected are unusable. 3. Timeliness. The system must deliver data in a timely manner. Data delivered late are useless. In the case of video and audio, timely delivery means delivering data as they are produced, in the same order that they are produced, and without significant delay. This kind of delivery is called real-time transmission. 4. Jitter. Jitter refers to the variation in the packet arrival time. It is the uneven delay in the delivery of audio or video packets. Components Figure 5.1. Components of data communication 1. Message. The message is the information (data) to be communicated. Popular forms of information include text, numbers, pictures, audio, and video. 2. Sender. The sender is the device that sends the data message. It can be a computer, workstation, telephone handset, video camera, and so on. 3. Receiver. The receiver is the device that receives the message. It can be a computer, workstation, telephone handset, television, and so on. 87 | P a g e 4. Transmission medium. The transmission medium is the physical path by which a message travels from sender to receiver. Some examples of transmission media include twisted-pair wire, coaxial cable, fiber-optic cable, and radio waves 5. Protocol. A protocol is a set of rules that govern data communications. It represents an agreement between the communicating devices. 5.2. 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 1 Input device 2 Transm itter 3 Source System Transmis sion medium Receiver 4 5 Output device 6 Destination 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 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. 88 | P a g e 5.3 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. In simplex mode, the communication is unidirectional, as on a one-way street. Only one of the two devices on a link can transmit; the other can only receive. Keyboards and traditional monitors are examples of simplex devices. The keyboard can only introduce input; the monitor can only accept output. The simplex mode can use the entire capacity of the channel to send data in one direction. Half-duplex transmission In this transmission signals are transmitted in both directions, both stations may transmit, but only one at a time. In half-duplex mode, each station can both transmit and receive, but not at the same time. When one device is sending, the other can only receive, and vice versa. In a half-duplex transmission, the entire capacity of a channel is taken over by whichever of the two devices is transmitting at the time. Walkie-talkies and CB (citizens band) radios are both half-duplex systems. The halfduplex mode is used in cases where there is no need for communication in both directions at the same time; the entire capacity of the channel can be utilized for each direction. Full-duplex transmission In this transmission signals transmitted in both directions, The medium carries signals in both directions at the same time. In full-duplex both stations can transmit and receive simultaneously. The full-duplex mode is like a two way street with traffic flowing in both directions at the same time. In full-duplex mode, signals going in one direction share the capacity of the link: with signals going in the other direction. One common example of full-duplex communication is the telephone network. When two people are communicating by a telephone line, both can talk and listen at the same time. The full-duplex mode is used when communication in both directions is required all the time. The capacity of the channel, however, must be divided between the two directions. 89 | P a g e Figure 5.2. Data flow Data Transmission Channels A channel is a medium that carries a signal from the transmitter to the receiver. The range of frequencies that can be transmitted over a transmission medium is called band Width of a channel. The rate of data transmission is directly proportional to the band width. 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. 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. 90 | P a g e 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. This process is called “Demodulation” .These conversions between digital data and analog data are handled by a device called a modem, an acronym for modulator and demodulator. 5.4. Data Transmission Protocols Two different methods are used for transmitting data, namely, asynchronous and synchronous. 1. Asynchronous data transmission protocol - Data is transmitted character by character. Data is transmitted at irregular time interval - A start bit is transmitted directly before each character. - To signify the end of the transmission, 1 or 2 stop bits are transmitted directly after each character. - The start bit and stop bit are always of opposite polarity. - Usually, 0 is the start bit and 1 is the stop bit. - Between the start bit and the stop bits, the data bits are transmitted at uniformly spaced time interval. 2. Synchronous Data Transmission Protocol - The transmission occurs at fixed intervals and fixed rates. - The need for start and stop bits is eliminated in synchronous transmission. - Allows for continues sending of characters - Each character is combined with others into a data packet. - The data packet is prefixed with a header field, and suffixed with a trailer field. Which includes a checksum value (used by the receiver to check for errors in sending) - The header field: used to address information (sender and receiver), packet type and control data. - The data field – contains checksum information 91 | P a g e 5.6. Computer Networks The purpose of the networking guidelines are as follows: to assist students in understanding the benefits of networking to help students place in context their current stage of networking Development in their school. to assist students in planning the next stage of network development in their school. to provide standard networking ‘models’ and best practice to students That will assist students in their network planning. 5.6.1 Basic of Networking A computer network consists of a collection of computers, printers and other Equipment that is connected together so that they can communicate with each other. 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. Hardware requirements to establish simple computer network 1. Computers - A minimum of two computers is required to establish a computer network. 2. Network Interface Card/Network Adapter Card - It is an expansion card that physically connects a computer to the network. - Each computer in the network must have a network card. 92 | P a g e - It takes the data from the computer’s internal bus and converts it into standard packets of information that it then sends along the cable. - It takes the data from the computer and adds header. - When receiving data, it looks at each packet and checks the destination address in the header. - If it recognizes its own address, it checks that it has no errors and signals the CPU that there is data to be processed. Figure 5.3.Network Interface Cards (NICs) 3. Cables - 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 93 | P a g e 5.7. Types of Networks Based on geographical span of coverage, computer networks are broadly classified into three major categories. 1. Local Area Network (LAN) 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. 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 Advantages of LAN Speed Cost Security E-mail Resource Sharing Disadvantages of LAN 94 | P a g e Expensive To Install Requires Administrative Time File Server May Fail Cables May Break Figure 5.4. Local Area Network (LAN) 2. Metropolitan Area Network (MAN) o A MAN is optimized for a larger geographical area than a LAN, ranging from several blocks of buildings to entire cities. o A MAN might be owned and operated by a single organization, but it usually will be used by many individuals and organizations , Uses Fiber Optics cables For example: Colleges, Universities, banks etc. A MAN often acts as a high speed network to Allow sharing of regional resources. o A MAN typically covers an area of between 5 and 50 km diameter. Examples of MAN: Telephone Company o network that provides a high speed DSL to o Customers and cable TV network. Metropolitan Area Network (MAN) 95 | P a g e Figure 5.5. Metropolitan Area Network 3. Wide Area Networks (WAN) 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. Figure 5.6. Wide Area Network 96 | P a g e Personal Area Network (PAN) A PAN is a network that is used for communicating among computers and computer Devices (including telephones) in close proximity of around a few meters within a room • It can be used for communicating between the devices themselves, or for connecting to a larger Network such as the internet. • PAN’s can be wired or wireless is a computer network used for communication among computer devices, including telephones and personal digital assistants, in proximity to an Individual’s body. • The devices may or may not belong to the person in question. The reach of a PAN is Typically a few meters. Figure 5.7.Personel Area Network Based on the architecture, networks are divided into two broad categories : 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 97 | P a g e 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. 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 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 – centrally routed Internet Access, – mail (including e-mail), – file sharing and printer access, – Ensuring security across the network. Supports large number of users Needs dedicated server (acts only as a server, but not as a client) Security is an issue 98 | P a g e Size is limited by a server and network hardware Requires at least one professional administrator. 5.8. 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 • 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. 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 99 | P a g e • 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. Figure. 5.8. Bus topology Advantages of Bus Topology - Easy to implement Low cost Disadvantages of Bus Topology - Limited cable length and workstation Difficult to isolate network fault. Cable fault affects all workstations 2. Star Topology • • One of the most common network topologies found in most offices and home networks. 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 doesn’t affect the network - Failure of the hub affects the network 100 | P a g e - Cabling cost is high Figure: 5.9. Star topology Advantage of Star Topology - Easy to add new workstations Centralized control Centralized network Easy to modify - 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 • 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. 101 | P a g e 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. Figure. 5.10. Ring topology 102 | 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 Hybrid Topology Types 103 | 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 cable, – 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 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 3. Fiber Optic Cables • can be used over greater distances – 2km without the use of repeaters. – one fiber could replace hundreds of copper cables • high bandwidth • Low loss of signals • The diameter could be millionths of a meter. 104 | P a g e 5.9. Brief Introduction to Internet Sometime in the mid 1960's, during the Cold War, it became apparent that there was a need for a bombproof communications system. A concept was devised to link computers together throughout the country. With such a system in place large sections of the country could be linked and messages could still get through. 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. About the Web Each web site has an address, or Uniform Resource Locator (URL). The URL contains a set of instructions that are read by the browser. 105 | P a g e 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 106 | P a g e 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. 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: Xamza120@gmail.com 107 | P a g e World Wide Web (WWW) 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. Use Net 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. 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) 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. Video Conferencing The internet is, in its raw form, communication. Video conferencing means making a conference on the internet by individuals who live in different locations. The individuals speak and see each other. It is similar to conference in a hall except they are at distant. 108 | P a g e Chapter Six 5. Computer Security 5.1 Introduction to Computer Security Security: The prevention and protection of computer assets from unauthorized access, use, alteration, degradation, destruction, and other threats. Computer systems should have a set of protection policies to restrict and control the system resources. Considering: o Unauthorized access o Malicious modification or destruction o Accidental introduction of inconsistency Security Goals Data Confidentiality o It is concerned with having secret data remain secret Data Integrity o Unauthorized users should not be able to modify any data without the owner’s permission o Includes removing data and adding false data System Availability o Means nobody can disturb the system to make it unusable Security is thus based on the following independent issues: 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? 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? 109 | P a g e 6.2. Why Computer Security Computer security is required because computer systems are vulnerable to many threats that can inflict various types of damage resulting in significant losses. This damage can range from errors harming database integrity to fires destroying entire computer centers. There may be several forms of damage, which are obviously interrelated. These include: 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 6.3. 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 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, trapdoor. 110 | P a g e 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 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. 111 | P a g e 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. Viruses Virus is self-duplicating computer program that interferes with a computer's hardware or operating system (the basic software that runs the computer). Viruses are designed to duplicate or replicate them to avoid detection. Like any other computer program, a virus must be executed for it to function—that is, it must be located in the computer's memory, and the computer must then follow the virus's instructions. These instructions are called the payload of the virus. The payload may disrupt or change data files, display an irrelevant or unwanted message, or cause the operating system to malfunction. There are five categories (types) of viruses, they are: parasitic or file viruses, bootstrap sector, multi-partite, macro, and script viruses. 112 | P a g e Worms Worm is a program that propagates itself across computers, usually by spawning copies of itself in each computer's memory. A worm might duplicate itself in one computer so often that it causes the computer to crash. Sometimes written in separate “segments,” a worm is introduced surreptitiously into a host system either for “fun” or with intent to damage or destroy information. The term comes from a science-fiction novel and has generally been superseded by the term virus. Worms can form segments across a network and damage the network by using its resources (memory space) highly. The segments of worms across a network can communicate strengthen their damage. 113 | P a g e Trojan Horses There are other harmful computer programs that can be part of a virus but are not considered viruses because they do not have the ability to replicate. These programs fall into three categories: Trojan horses, logic bombs, and deliberately harmful or malicious software programs that run within Web browsers, an application program such as Internet Explorer and Netscape that displays Web sites. A Trojan horse is a program that pretends to be something else. A Trojan horse may appear to be something interesting and harmless, such as a game, but when it runs it may have harmful effects. The term comes from the classic Greek story of the Trojan horse found in Homer’s Iliad. Bombs A bomb infects a computer’s memory, but unlike a virus, it does not replicate itself. A logic bomb delivers its instructions when it is triggered by a specific condition, such as when a particular date or time is reached or when a combination of letters is typed on a keyboard. A logic bomb has the ability to erase a hard drive or delete certain files. 6.4. Techniques to Reduce Security problems Backup Storing backup copies of software and data and having backup computer and communication capabilities are important basic safeguards because the data can then be restored if it was altered or destroyed by a computer crime or accident. Computer data should be backed up frequently and should be stored nearby in secure locations in case of damage at the primary site. Transporting sensitive data to storage locations should also be done securely. 114 | P a g e Encryption Another technique to protect confidential information is encryption (Encryption, process of converting messages or data into a form that cannot be read without decrypting or deciphering it. The root of the word encryption—crypt—comes from the Greek word kryptos, meaning “hidden” or “secret.”) Computer users can scramble information to prevent unauthorized users from accessing it. Authorized users can unscramble the information when needed by using a secret code called a key. Without the key the scrambled information would be impossible or very difficult to unscramble. Approved users Another technique to help prevent abuse and misuse of computer data is to limit the use of computers and data files to approved persons. Security software can verify the identity of computer users and limit their privileges to use, view, and alter files. The software also securely records their actions to establish accountability. Military organizations give access rights to classified, confidential, secret, or top-secret information according to the corresponding security clearance level of the user. Other types of organizations also classify information and specify different degrees of protection. Passwords Passwords are confidential sequences of characters that allow approved persons to make use of specified computers, software, or information. To be effective, passwords must be difficult to guess and should not be found in dictionaries. Effective passwords contain a variety of characters and symbols that are not part of the alphabet. To thwart imposters, computer systems usually limit the number of attempts and restrict the time it takes to enter the correct password. A more secure method is to require possession and use of tamper-resistant plastic cards with microprocessor chips, known as “smart cards,” which contain a stored password that automatically changes after each use. When a user logs on, the computer reads the card's 115 | P a g e password, as well as another password entered by the user, and matches these two respectively to an identical card password generated by the computer and the user's password stored in the computer in encrypted form. Use of passwords and "smart cards" is beginning to be reinforced by biometrics, identification methods that use unique personal characteristics, such as fingerprints, retinal patterns, facial characteristics, or voice recordings. Firewalls Computers connected to communication networks, such as the Internet, are particularly vulnerable to electronic attack because so many people have access to them. Using firewall computers or software placed between the networked computers and the network can protect these computers. The firewall examines, filters, and reports on all information passing through the network to ensure its appropriateness. These functions help prevent saturation of input capabilities that otherwise might deny usage to legitimate users, and they ensure that information received from an outside source is expected and does not contain computer viruses. Disaster Recovery Plans Organizations and businesses that rely on computers need to institute disaster recovery plans that are periodically tested and upgraded. This is because computers and storage components such as diskettes or hard disks are easy to damage. A computer's memory can be erased or flooding, fire, or other forms of destruction can damage the computer’s hardware. Computers, computer data, and components should be installed in safe and locked facilities. Anti-viral Tactics Preparation and Prevention Computer users can prepare for a viral infection by creating backups of legitimate original software and data files regularly so that the computer system can be restored if necessary. Viral infection can be prevented by obtaining software from legitimate sources 116 | P a g e or by using a quarantined computer to test new software—that is, a computer not connected to any network. However, the best prevention may be the installation of current and well-designed antiviral software. Such software can prevent a viral infection and thereby help stop its spread. Virus Detection Several types of antiviral software can be used to detect the presence of a virus. Scanning software can recognize the characteristics of a virus's computer code and look for these characteristics in the computer's files. Because new viruses must be analyzed as they appear, scanning software must be updated periodically to be effective. Other scanners search for common features of viral programs and are usually less reliable. Most antiviral software uses both on-demand and on-access scanners. On-demand scanners are launched only when the user activates them. On-access scanners, on the other hand, are constantly monitoring the computer for viruses but are always in the background and are not visible to the user. The on-access scanners are seen as the proactive part of an antivirus package and the on-demand scanners are seen as reactive. On-demand scanners usually detect a virus only after the infection has occurred and that is why they are considered reactive. 117 | P a g e 118 | P a g e