Chapter 1 (C-programming)Block diagram of computer
RhishavPoudyal
116 views
82 slides
Jul 08, 2024
Slide 1 of 82
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
About This Presentation
Basic introduction of Computer
Size: 1.61 MB
Language: en
Added: Jul 08, 2024
Slides: 82 pages
Slide Content
A Computer is A programmable machine. It can execute or run a pre-recorded list of instructions which follow certain rules (a program). Modern computers are electronic and digital. The actual machinery -- wires, transistors , and circuits -- is called hardware ; the instructions and data are called software. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 1
All computer perform the following basic operations for converting raw input data into useful information and presenting it to the user. Five basic operations performed by computer are Inputting Storing Processing Outputting controlling Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 2
A computer consists of five functionally independent main parts Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 4
Components of a Computer System Computer hardware provides the physical mechanisms to process, store, and input /output data. Includes CPU, memory, I/O devices Software provides instructions to tell the hardware what tasks to perform. It includes system ( eg Windows XP) and application ( eg Excel) software Data in the computer may be representing numbers, characters, graphics etc but is always kept in a form that the hardware and software can manipulate. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 5
central processing unit primary memory secondary storage input devices output devices communications devices I/O cards System Bus What are the major Hardware components of the computer ? Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 6
Block Diagram of a Computer Main Memory IOD IOD IOD IO Modules CPU Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 7
Block Diagram for a Simple Computer Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 8
1 Hardware- the CPU CPU performs actual processing of data, according to instructions from programs. Data and programs are stored in primary and secondary memory, and moved to and from CPU as required. Signals representing data and instructions travel between system components along electronic pathways, called buses . Capacity of bus is critical to system performance. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 10
Central Processing Unit ( CPU) Acting as the brain of the computer’ Currently the Intel-Pentium microprocessor is the most common CPU though there are many types Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 11
Hardware - The Processor The CPU is a general purpose processor that performs data manipulation and/or transformation functions including computations, comparisons and data movement. The CPU consists of 3 main parts: ALU - where arithmetic and logical operations performed Control Unit - controls data movement and execution of instructions Registers - small high speed storage areas Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 12
Central Processing Unit The control unit and ALU of the computer are together known as the Central Processing Unit (CPU). The CPU is like brain performs the following functions: • It performs all calculations. • It takes all decisions. • It controls all units of the computer. A PC may have CPU-IC such as Intel 8088, 80286, 80386, 80486, Celeron, Pentium, Pentium Pro, Pentium II, Pentium III, Pentium IV, Dual Core, and AMD etc . Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 13
Components of a computer system Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 14
Arithmetic Logical Unit All calculations are performed in the Arithmetic Logic Unit (ALU) of the computer. It also does comparison and takes decision. The ALU can perform basic operations such as addition, subtraction, multiplication, division, etc and does logic operations like, >, <, =, ‘etc. Whenever calculations are required, the control unit transfers the data from storage unit to ALU, once the computations are done, the results are transferred to the storage unit by the control unit and then it is send to the output unit for displaying results. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 15
Control Unit It controls all other units in the computer. The control unit instructs the input unit, where to store the data after receiving it from the user. It controls the flow of data and instructions from the storage unit to ALU. It also controls the flow of results from the ALU to the storage unit. The control unit is generally referred as the central nervous system of the computer that control and synchronizes its working. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 16
Registers It is a special temporary storage location within the CPU. Registers quickly, accept, store and transfer data and instructions that are being used immediately (main memory hold data that will be used shortly, secondary storage holds data that will be used later). To execute an instruction, the control unit of the CPU retrieves it from main memory and places it onto a register. The instruction cycle refers to the retrieval of the instruction from main memory and its subsequence at decoding. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 17
2 Hardware - memory Memory - Purpose of memory is data storage. Two major types of memory Primary memory - to hold data and instructions during processing eg RAM. Relatively limited capacity and volatile Secondary memory - to provide permanent long term storage eg hard disk. High capacity and non-volatile Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 18
The storage unit of the computer holds data and instructions that are entered through the input unit, before they are processed. It preserves the intermediate and final results before these are sent to the output devices. It also saves the data for the later use. 1. Primary Storage: Stores and provides very fast. This memory is generally used to hold the program being currently executed in the computer, the data being received from the input unit, the intermediate and final results of the program. The primary memory is temporary in nature. The data is lost, when the computer is switched off. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 19
Secondary Storage : It stores several programs, documents, data bases etc. The programs that you run on the computer are first transferred to the primary memory before it is actually run. Whenever the results are saved, again they get stored in the secondary memory. The secondary memory is slower and cheaper than the primary memory. Some of the commonly used secondary memory devices are Hard disk, CD, etc., Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 20
Hardware - memory Memory is commonly measured in multiples of bits and bytes. 1 bit = 1 binary digit (0 or 1). 1 byte = 8 bits 1KB = 1024 bytes = 2 10 1MB = 1024 KB= 2 20 1GB = 1024 MB = 2 30 1TB = 1024 GB = 2 40 Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 21
ROM and RAM The main internal memory in a computer can be split into two types: ROM (Read Only Memory) RAM (Random Access Memory) 22 Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal
ROM As the name (Read Only Memory) suggests, this memory that cannot be changed by a program or user. It is used to store the instructions for the computer to start up when it is turned on again. The data in the ROM is saved even if the computer is switched off and this is known as “ non-volatile ” data. 23 Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal
RAM RAM is much faster than ROM and is used as a temporary memory in which programs, applications and data are stored whilst they are being used. If a computer loses power, all data stored in its RAM is lost, this is known as “ Volatile ” data. 24 Secondary Storage RAM Cache Memory CPU Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal
Flash Memory ROM uses a similar group of transistors wired together to make a circuit that are programmed with the instructions to boot up the machine at the point of manufacture. These circuits trap electrons in the transistors using a large “flash” of electrical charge. This is where it gets its name from. It is the same technology used in removable storage devices such as a USB memory stick. 25 Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal
Flash Memory Remember: ROM stands for Read Only Memory and is used for the instructions used to boot up the computer. Flash memory sticks are used to write and re-write files time and time again and this writing and re-writing can cause the circuits to deteriorate over time so flash memory sticks should not be used in critical systems. 26 Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal
Virtual Memory Virtual memory is a feature of an operating system (OS) that allows a computer to compensate for shortages of physical memory by temporarily transferring pages of data from random access memory (RAM) to disk storage. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 27
Virtual Memory Primary memory has a limit i.e how many RAM chips you have in the computer. But there is a trick that the memory manager can use to fool the operating system into thinking that there is more primary memory than is actually physically present. This trick is called virtual memory. When the computer is running short of physical primary memory e.g. too many applications open, the memory manager has a choice. It can either shut down applications (very inconvenient) or it can try and scrounge some more memory from somewhere else. This is where virtual memory comes in. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 28
3 Hardware – I/O Input Devices collect & translate raw data into form useable by computer. e.g keyboard accepts letters and numbers and converts them to a binary. Output devices produce results in useable form for user (or another device). e.g. monitor converts binary codes to characters and images, whilst modem converts digital data to analog form for transmission over telephone lines. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 29
Computers need to receive data and instruction in order to solve any problem. Therefore we need to input the data and instructions into the computers. The input unit consists of one or more input devices. Keyboard is the one of the most commonly used input device. Other commonly used input devices are the mouse, floppy disk drive, magnetic tape , etc. All the input devices perform the following functions . Accept the data and instructions from the outside world. Convert it to a form that the computer can understand. Supply the converted data to the computer system for further processing. INPUT UNIT Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 30
Output Unit The output unit of a computer provides the information and results of a computation to outside world. Printers, Visual Display Unit (VDU) are the commonly used output devices. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 31
Buses The term Bus refers to an electrical pathway through which bits are transmitted between the various computer components. Depending on the design of the system, several types of buses may be present. The most important one is the data bus, which carries the data through out the central processing unit. The wider data bus, the more data it can carry at one time and thus the greater the processing speed of the computer. Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 33
Computer Main Memory Input Output Systems Interconnection Peripherals Communication lines Central Processing Unit Computer Structure - Top Level Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 34
Structure - The CPU Computer Arithmetic and Login Unit Control Unit Internal CPU Interconnection Registers CPU I/O Memory System Bus CPU Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal 35
Networking C omputer network A collection of computing devices that are connected in various ways in order to communicate and share resources Usually, the connections between computers in a network are made using physical wires or cables However, some connections are wireless , using radio waves or infrared signals Chapter 1: Introduction to computer 36 Prepeared by: Er. Rhishav Poudyal
Networking The generic term node or host refers to any device on a network Data transfer rate The speed with which data is moved from one place on a network to another Data transfer rate is a key issue in computer networks Chapter 1: Introduction to computer 37 Prepeared by: Er. Rhishav Poudyal
Networking Computer networks have opened up an entire frontier in the world of computing called the client/server model Figure 1 Client/Server interaction Chapter 1: Introduction to computer 38 Prepeared by: Er. Rhishav Poudyal
The Internet The simplest definition of the Internet is that it's a network of computer networks Chapter 1: Introduction to computer 39 Prepeared by: Er. Rhishav Poudyal
The Internet How Information Travel Through the Internet A page on the Internet—whether it's full of words, images or both—doesn't come to you in one shipment. It's translated into digital information, chopped into 1500 byte pieces called PACKETS, and sent to you like a puzzle that needs to be reassembled. Each part of the packet has a specific function: Header Provides the complete destination address for the packet Data Block The portion of the overall information carried by the packet Sequence ID ID’s where the information belongs in relation to the rest of the information End of Message ID’s the end of the packet Chapter 1: Introduction to computer 40 Prepeared by: Er. Rhishav Poudyal
The Internet How Information Travel Through the Internet When you connect to a Web site through an ISP and start exchanging information, there isn't a fixed connection between your computer and the Web server computer hosting the Web site. Instead, information is exchanged using the best possible path at that particular time. Special computers called routers determine these paths, avoiding slow links and favoring fast ones. Your Computer ISP Routers Web Servers Chapter 1: Introduction to computer 41 Prepeared by: Er. Rhishav Poudyal
Web Servers IP Addresses “IP” stands for Internet Protocol. IP Addresses serve as the location of websites on the Internet as well as the workstations that are connected to the web. IP addresses are made up of four sets of numbers called “Octets”. There are two types of IP Addresses: Static and Temporary. Chapter 1: Introduction to computer 42 Prepeared by: Er. Rhishav Poudyal
The Computer Network Arguably, the greatest advancement in technology and communication over the past 30 years has been the development and advancement of the computer network. From emailing a friend to on-line bill paying to downloading data off the Internet to e-commerce, networking has made our world much smaller and changed the way we communicate forever. Chapter 1: Introduction to computer 43 Prepeared by: Er. Rhishav Poudyal
The Computer Network What is a Computer Network net·work : [ net - wurk ] – noun , a system containing any combination of computers, computer terminals, printers, audio or visual display devices, or telephones interconnected by telecommunication equipment or cables: used to transmit or receive information. Chapter 1: Introduction to computer 44 Prepeared by: Er. Rhishav Poudyal
The Network Diagram The Internet Other LANS Firewall Router Fiber Optic Network Cable Server PC Wireless Network Wired Network Switch Chapter 1: Introduction to computer 45 Prepeared by: Er. Rhishav Poudyal
The Three Types of Networks PEER TO PEER WIDE AREA LOCAL AREA Chapter 1: Introduction to computer 46 Prepeared by: Er. Rhishav Poudyal
Local Area Network A Local Area Network spans a relatively small area LAN are usually confined to one building or a group of buildings Data travel between network devices via network cables. The most common type of Local Area Network is called Ethernet Chapter 1: Introduction to computer 47 Prepeared by: Er. Rhishav Poudyal
LAN (Local Area Network) A network of computers that are in the same physical location, such as home or building Usually connected using Ethernet A standard on how computers communicate over a shared media (cable) Old: BNC connector for coaxial cable New: RJ45 for twisted pair cable Chapter 1: Introduction to computer 48 Prepeared by: Er. Rhishav Poudyal
LAN (Local Area Network) Ethernet Standard 10BaseT 10Mbps (Mega bits per second) 100BaseT 100Mbps 1000BaseT 1000Mbps or 1Gbps Chapter 1: Introduction to computer 49 Prepeared by: Er. Rhishav Poudyal
Wide Area Network A Wide Area Network exist over a large area Data travels through telephone or cable lines Usually requires a Modem The world’s largest Wide Area Network in the Internet Chapter 1: Introduction to computer 50 Prepeared by: Er. Rhishav Poudyal
Figure :- Local-area networks connected across a distance to create a wide-area network Chapter 1: Introduction to computer 51 Prepeared by: Er. Rhishav Poudyal
WAN (Wide Area Network) A LAN spans a large geographic area, such as connections between cities Usually connected using leased line T1 (1.5Mbps) T3 (45Mbps) OC3 (155Mbps) OC12 (622Mbps) OC48 (2.4Gbps) Fiber optic lines Telecommunication lines Chapter 1: Introduction to computer 52 Prepeared by: Er. Rhishav Poudyal
Peer to Peer Network Usually very small networks Each workstation has equivalent capabilities and responsibilities Does not require a switch or a hub. These types of networks do not perform well under heavy data loads. Chapter 1: Introduction to computer 53 Prepeared by: Er. Rhishav Poudyal
WLAN (Wireless LAN) Wi-Fi (Wireless Fidelity) A wireless technology that connects computers without cables Access Point (AP) A device (base station) that connects wireless devices together Usually connected to a wired-network ESSID (Extended Service Set ID) A “name” for the AP, eg. mobilenet Hotspot The area covered by wireless access points Chapter 1: Introduction to computer 54 Prepeared by: Er. Rhishav Poudyal
Types of Networks Various configurations, called topologies, have been used to administer LANs Ring topology A configuration that connects all nodes in a closed loop on which messages travel in one direction Star topology A configuration that centers around one node to which all others are connected and through which all messages are sent Bus topology All nodes are connected to a single communication line that carries messages in both directions Chapter 1: Introduction to computer 55 Prepeared by: Er. Rhishav Poudyal
Network Topologies Network Topology refers to the shape of a network, or the network's layout. How different nodes in a network are connected to each other and how they communicate are determined by the network's topology. There are three basic topologies: Star Ring Bus Chapter 1: Introduction to computer 56 Prepeared by: Er. Rhishav Poudyal
Star Topology All devices are connected to a central hub. Nodes communicate across the network by passing data through the hub or switch. Chapter 1: Introduction to computer 57 Prepeared by: Er. Rhishav Poudyal
Ring Topology All devices are connected to one another in the shape of a closed loop. Each device is connected directly to two other devices, one on either side of it. Chapter 1: Introduction to computer 58 Prepeared by: Er. Rhishav Poudyal
Bus Topology T T All devices are connected to a central cable, called the bus or backbone. There are terminators at each end of the bus that stops the signal and keeps it from traveling backwards. Chapter 1: Introduction to computer 59 Prepeared by: Er. Rhishav Poudyal
Internet Connections There are various technologies available that you can use to connect a home computer to the Internet A phone modem converts computer data into an analog audio signal for transfer over a telephone line, and then a modem at the destination converts it back again into data A digital subscriber line (DSL) uses regular copper phone lines to transfer digital data to and from the phone company’s central office A cable modem uses the same line that your cable TV signals come in on to transfer the data back and forth Chapter 1: Introduction to computer 60 Prepeared by: Er. Rhishav Poudyal
Bandwidth Data rate measured in bits (not bytes) per seconds Kbps (Kilobits per seconds) 125 chars/sec Mbps (Megabits per seconds) 1,250 chars/sec Gbps (Gigabits per seconds) 12,500 chars/sec Chapter 1: Introduction to computer 61 Prepeared by: Er. Rhishav Poudyal
Home Network (single machine) USB/Ethernet Cable DSL/Cable Modem Wall Jack Chapter 1: Introduction to computer 62 Prepeared by: Er. Rhishav Poudyal
Home Network (multiple machines) USB/Ethernet Cable DSL/Cable Modem Wall Jack Hub/Switch/Router Chapter 1: Introduction to computer 63 Prepeared by: Er. Rhishav Poudyal
Home Network (multiple machines) Ethernet Cable DSL/Cable Modem Wall Jack Hub/Switch/Router Chapter 1: Introduction to computer 64 Prepeared by: Er. Rhishav Poudyal
Home Wireless Network Ethernet Cable DSL/Cable Modem Wall Jack Hub/Switch/Router Chapter 1: Introduction to computer 65 Prepeared by: Er. Rhishav Poudyal
Hub/Switch/Router To connect multiple segments of networks into a larger one Hub A multiport repeater to enhance signal within the same LAN Switch Like hub but with intelligent Better performance Router Forward packets from one LAN to another Chapter 1: Introduction to computer 66 Prepeared by: Er. Rhishav Poudyal
Intranet vs. Internet Intranet A private network that is contained within an enterprise Could be LANs and WANs Internet A public network of networks Both are using TCP/IP Chapter 1: Introduction to computer 67 Prepeared by: Er. Rhishav Poudyal
TCP/IP A family of protocols that makes the Internet works Application Layer Eg . WWW, FTP, IRC, Email, telnet, … Transport Layer Eg . TCP, UDP Network Layer Eg . IP Link Layer Eg. Ethernet, WiFi Physical Layer Eg. Ethernet Cable, fiber-optics Segments Packets Frames Bits Data Chapter 1: Introduction to computer 68 Prepeared by: Er. Rhishav Poudyal
Packets A small chunk of data transmitted over the Internet X… The Internet Y… 69 Chapter 1: Introduction to computer Prepeared by: Er. Rhishav Poudyal
Packet Switching To improve the efficiency of transferring information over a shared communication line, messages are divided into fixed-sized, numbered packets Network devices called routers are used to direct packets between networks 15-18 Chapter 1: Introduction to computer 70 Prepeared by: Er. Rhishav Poudyal
Firewalls Firewall A machine and its software that serve as a special gateway to a network, protecting it from inappropriate access Filters the network traffic that comes in, checking the validity of the messages as much as possible and perhaps denying some messages altogether Enforces an organization’s access control policy Chapter 1: Introduction to computer 71 Prepeared by: Er. Rhishav Poudyal
Firewalls Figure A firewall protecting a LAN Chapter 1: Introduction to computer 72 Prepeared by: Er. Rhishav Poudyal
Knowledge Generation DATA INFORMATION Chapter 1: Introduction to computer 73 Prepeared by: Er. Rhishav Poudyal
Data and Information DATA: Facts concerning people, objects, vents or other entities. Databases store data. INFORMATION: Data presented in a form suitable for interpretation. Data is converted into information by programs and queries. Data may be stored in files or in databases. Neither one stores information. KNOWLEDGE: Insights into appropriate actions based on interpreted data. Chapter 1: Introduction to computer 74 Prepeared by: Er. Rhishav Poudyal
Files and Databases Metadata “Data about data” Description of fields Display and format instructions Structure of files and tables Security and access rules Triggers and operational rules Chapter 1: Introduction to computer 75 Prepeared by: Er. Rhishav Poudyal
Basic Principles DATABASE: A shared collection of interrelated data designed to meet the varied information needs of an organization. DATABASE MANAGEMENT SYSTEM: A collection of programs to create and maintain a database. Define Construct Manipulate Chapter 1: Introduction to computer 76 Prepeared by: Er. Rhishav Poudyal
Database Access DATABASE PROGRAM USER INTERFACE Chapter 1: Introduction to computer 77 Prepeared by: Er. Rhishav Poudyal
Advantages of Database Processing More information from same data Shared data Balancing conflicts among users Controlled redundancy Consistency Integrity Security Increased productivity Data independence Chapter 1: Introduction to computer 78 Prepeared by: Er. Rhishav Poudyal
Disadvantages of Database Processing Increased size Increased complexity More expensive personnel Increased impact of failure Difficulty of recovery Cost Especially server and mainframe systems Chapter 1: Introduction to computer 79 Prepeared by: Er. Rhishav Poudyal
STUDENT SECTION INSTRUCTOR Hierarchy COLLEGE COLLEGE Each file can have only one parent. To implement a second “parent” (COLLEGE) we have to implement a shadow copy. Chapter 1: Introduction to computer 80 Prepeared by: Er. Rhishav Poudyal
STUDENT SECTION INSTRUCTOR Network COLLEGE Each file can have several parents. Both SECTION and COLLEGE are “parent” files.. Chapter 1: Introduction to computer 81 Prepeared by: Er. Rhishav Poudyal
Data Management Designing and managing information in a data base environment requires: Understanding the principles of data modeling in system design. Using SQL for data manipulation. Understanding the concepts of managing data in a database environment. Chapter 1: Introduction to computer 82 Prepeared by: Er. Rhishav Poudyal