Summary

This document provides an overview of computer systems, including hardware and software components. It describes input and output devices, the central processing unit (CPU), primary and auxiliary storage, and different types of computer software (system and application).

Full Transcript

Computer Systems: A computer is a system made of two major components: hardware and software. The computer hardware is the physical equipment. The software is the collection of programs (instructions) that allow the hardware to do its job. Computer...

Computer Systems: A computer is a system made of two major components: hardware and software. The computer hardware is the physical equipment. The software is the collection of programs (instructions) that allow the hardware to do its job. Computer System Hardware Software Computer Hardware The hardware component of the computer system consists of five parts: input devices, central processing unit (CPU) ,primary storage, output devices, and auxiliary storage devices. The input device is usually a keyboard where programs and data are entered into the computers. Examples of other input devices include a mouse, a pen or stylus, a touch screen, or an audio input unit. The central processing unit (CPU) is responsible for executing instructions such as arithmetic calculations, comparisons among data, and movement of data inside the system. Today’s computers may have one ,two, or more CPUs.Primary storage ,also known as main memory, is a place where the programs and data are stored temporarily during processing. The data in primary storage are erased when we turn off a personal computer or when we log off from a time-sharing system. The output device is usually a monitor or a printer to show output. If the output is shown on the monitor, we say we have a soft copy. If it is printed on the printer, we say we have a hard copy. Auxiliary storage, also known as secondary storage, is used for both input and output. It is the place where the programs and data are stored permanently. When we turn off the computer, or programs and data remain in the secondary storage, ready for the next time we need them. Computer Software Computer software is divided in to two broad categories: system software and application software.System software manages the computer resources.It provides the interface between the hardware and the users. Application software, on the other hand is directly responsible for helping users solve their problems. Software System Application software software System System General Application Operating support Development Purpose Specific Systems Fig: Types of software System Software: System software consists of programs that manage the hardware resources of a computer and perform required information processing tasks. These programs are divided into three classes: the operating system, system support, and system development. The operating system provides services such as a user interface, file and database access, and interfaces to communication systems such as Internet protocols. The primary purpose of this software is to keep the system operating in an efficient manner while allowing the users access to the system. System support software provides system utilities and other operating services. Examples of system utilities are sort programs and disk format programs. Operating services consists of programs that provide performance statistics for the operational staff and security monitors to protect the system and data. The last system software category ,system development software, includes the language translators that convert programs into machine language for execution ,debugging tools to ensure that the programs are error free and computer –assisted software engineering(CASE) systems. Application software Application software is broken in to two classes :general-purpose software and application – specific software. General purpose software is purchased from a software developer and can be used for more than one application. Examples of general purpose software include word processors ,database management systems ,and computer aided design systems. They are labeled general purpose because they can solve a variety of user computing problems. Application –specific software can be used only for its intended purpose. A general ledger system used by accountants and a material requirements planning system used by a manufacturing organization are examples of application-specific software. They can be used only for the task for which they were designed they cannot be used for other generalized tasks. The relationship between system and application software is shown in fig-2.In this figure, each circle represents an interface point. The inner core is hard ware. The user is represented by the out layer. To work with the system, the typical user uses some form of application software. The application software in turn interacts with the operating system, which is apart of the system software layer. The system software provides the direct interaction with the hard ware. The opening at the bottom of the figure is the path followed by the user who interacts directly with the operating system when necessary. Computer Languages: To write a program for a computer, we must use a computer language. Over the years computer languages have evolved from machine languages to natural languages. 1940’s Machine level Languages 1950’s Symbolic Languages 1960’s High-Level Languages Machine Languages In the earliest days of computers, the only programming languages available were machine languages. Each computer has its own machine language, which is made of streams of 0’s and 1’s. Instructions in machine language must be in streams of 0’s and 1’s because the internal circuits of a computer are made of switches transistors and other electronic devices that can be in one of two states: off or on. The off state is represented by 0 , the on state is represented by 1. The only language understood by computer hardware is machine language. Symbolic Languages: In early 1950’s Admiral Grace Hopper, A mathematician and naval officer developed the concept of a special computer program that would convert programs into machine language. The early programming languages simply mirror to the machine languages using symbols of mnemonics to represent the various machine language instructions because they used symbols, these languages were known as symbolic languages. Computer does not understand symbolic language it must be translated to the machine language. A special program called assembler translates symbolic code into machine language. Because symbolic languages had to be assembled into machine language they soon became known as assembly languages. Symbolic language uses symbols or mnemonics to represent the various ,machine language instructions. High Level Languages: Symbolic languages greatly improved programming effificiency; they still required programmers to concentrate on the hardware that they were using. Working with symbolic languages was also very tedious because each machine instruction has to be individually coded. The desire to improve programmer efficiency and to change the focus from the computer to the problem being solved led to the development of high-level language. High level languages are portable to many different computers, allowing the programmer to concentrate on the application problem at hand rather than the intricacies of the computer. High-level languages are designed to relieve the programmer from the details of the assembly language. High level languages share one thing with symbolic languages, They must be converted into machine language. The process of converting them is known as compilation. The first widely used high-level languages, FORTRAN (FORmula TRANslation)was created by John Backus and an IBM team in 1957;it is still widely used today in scientific and engineering applications. After FORTRAN was COBOL(Common Business-Oriented Language). Admiral Hopper was played a key role in the development of the COBOL Business language. C is a high-level language used for system software and new application code. ALGORITHM: Algorithms was developed by an Arab mathematician. It is chalked out step-by-step approach to solve a given problem. It is represented in an English like language and has some mathematical symbols like ->, >, is greater than = is greater than or equal to == is equal to != is not equal to It is the form of ae-1 relational operator ae-2 3. LOGICAL OPERATORS : An expression of this kind which combines two or more relational expressions is termed as a logical expressions or a compound relational expression. The operators and truth values are op-1 op-2 op-1 && op-2 op-1 || op-2 non-zero non-zero 1 1 non-zero 0 0 1 0 non-zero 0 1 0 0 0 0 op-1 !op-1 non-zero zero zero non-zero 5. ASSIGNMENT OPERATORS : They are used to assign the result of an expression to a variable. The assignment operator is '='. v op=exp v is variable op binary operator exp expression op= short hand assignment operator short hand assignment operators use of simple assignment operators use of short hand assignment operators a=a+1 a+=1 a=a-1 a-=1 a=a%b a%=b 6. INCREMENT AND DECREMENT OPERATORS : ++ and == are called increment and decrement operators used to add or subtract. Both are unary and as follows ++m or m++ --m or m-- The difference between ++m and m++ is if m=5; y=++m then it is equal to m=5;m++;y=m; if m=5; y=m++ then it is equal to m=5;y=m;m++; 7. CONDITIONAL OPERATOR : A ternary operator pair "?:" is available in C to construct conditional expressions of the form exp1 ? exp2 : exp3; It work as if exp1 is true then exp2 else exp3 8. BIT WISE OPERATORS : C supports special operators known as bit wise operators for manipulation of data at bit level. They are not applied to float or double. operator meaning & Bitwise AND | Bitwise OR ^ Bitwise exclusive OR > right shift ~ one's complement 9. SPECIAL OPERATORS : These operators which do not fit in any of the above classification are ,(comma), sizeof, Pointer operators(& and *) and member selection operators (. and ->). The comma operator is used to link related expressions together. sizeof operator is used to know the sizeof operand. #include main() { int sum, mul, modu; float sub, divi; int i,j; float l, m; printf("Enter two integers "); scanf("%d%d",&i,&j); printf("Enter two real numbers"); scanf("%f%f",&l,&m); sum=i+j; mul=i*j; modu=i%j; sub=l-m; divi=l/m; printf("sum is %d", sum); printf("mul is %d", mul); printf("Remainder is %d", modu); printf("subtraction of float is %f", sub); printf("division of float is %f", divi); } #include main() { int i, j, k; printf("Enter any three numbers "); scanf("%d%d%d", &i, &j, &k); if((i

Use Quizgecko on...
Browser
Browser