Documents

195 pages
195 views

Complete C & Data Structure Notes

Please download to get full document.

View again

of 195
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Share
Description
Complete C & Data Structure Notes
Transcript
   1 Complete C & Data Structure Notes UNIT-I:   Overview of Computers and Programming  –   Electronic computers then and now, Computer hardware, Computer Software, Algorithm, Flowcharts, Software Development Method, Applying the software development method. COMPUTER   Computer is an electronic device that takes data as input from input devices, process the instructions, and produces information as output on output devices. (Data) (Information) Input Devices Output Devices (Input) (Output) FUNCTIONAL PARTS OF THE COMPUTER The main functional parts of the computer are: 1. Input Devices 2. Output Devices 3. Central Processing Unit 4. Memory Unit CPU MEMORY UNIT Input Devices: Input devices are used to submit data to the computer for processing the instructions. Examples: Keyboard, Mouse, Touch pad, Scanner etc., Output Devices:   Computer INPUT DEVICES OUTPUT DEVICES ALU CU RU RAM ROM   2 Output devices are used to display information after processing the instructions by the computer. Examples: Monitor, Speaker, Printer etc., Central Processing Unit: Central processing unit (CPU) is main heart of the computer. Since, entire  processing instructions are carried out by the CPU. CPU contains three important  parts. Those are Arithmetic and Logical Unit (ALU) Control Unit (CU) Register Unit (RU)  Entire arithmetic and logical calculations are performed inside the arithmetic and logical unit. Control unit is responsible for to follow up all the signals carried out by the com  puter. CPU’s current instructions and data values are stored temporarily inside a high-speed memory location called register unit.  Memory Unit: Memory unit is used to store the data. Memory unit contains an ordered sequence of storage locations called memory cells and each memory cell has a unique address that indicates relative position in memory. Address Contents 0   -27.2 1   543 2   X . . . . 99   75.62 The data stored in a memory cell are called the contents of the cell. A memory cell is actually a grouping of smaller units called bytes. Each byte is formed with the combinations of 8 bits.  Each bit is a binary digit either 0 or 1. Main memory: Main memory stores programs, data and results. Most common types of main memory ( primary memory)  are: RAM (Random Access Memory) and ROM (Read-only-Memory). RAM offers temporary storage of programs and data. It allows both read and write operations. RAM is a volatile memory. Since, every thing in RAM will be lost when the computer is switched off.   3 ROM stores programs or data permanently. It allows only read operation. ROM is a non-volatile memory. Since, the data stored there do not disappear when the computer is switched off. RAM is very expensive in cost and has limited storage capacity. So those large amounts of programs are inefficient to store in RAM. For storing huge amount of data, it is better to select secondary storages devices. Secondary storage devices are less expensive in cost and have large storage capacity. Information stored in secondary storage devices are organized in terms of files . Examples for secondary storage devices are: Hard disks Floppy disks Zip disks Compact disks (CD) Digital video disks (DVD) etc., Primary storage devices and secondary storage devices are available in different storage capacities like Bytes, Kilobytes, Megabytes, Gigabytes and Terabytes. TERM ABBREVIATION EQUIVALENT TO Byte B 8 bits Kilobyte KB 1,024 (2) bytes Megabyte MB 1,048,576 (2) bytes Gigabyte GB 1,073,741,824 (2) bytes Terabyte TB 1,099,511,627,776 (2) bytes The program must first be transferred from secondary storage devices to main memory before it can be executed. Programmer submits input data from input devices to process the instructions. Those values are stored in the computer‟s main memory, where they can be accessed and manipulated by the central processing unit. The result of this manipulation are then stored back in main memory. Finally, the information in main memory can be displayed through an output device. COMPONENTS OF COMPUTER Elements or components of a computer system fall into two major categories: Hardware and Software. COMPUTER HARDWARE Hardware is physical parts of the computers. The parts are possible to touch and visible. Examples: Keyboard, Mouse, Monitor, Speakers, RAM etch.,   4 COMPUTER SOFTWARE Software is a collection of programs. A program contains set of instructions to initiate the computer to perform some action. Main components of computer software are: Operating system and Application software. Operating System: The collection of computer programs that control the interaction of the user and the computer hardware is called the operating system (OS). Examples: DOS, Windows, Unix etc., Main responsibilities of the operating system are:    Communicating with the computer user    Managing allocation of memory, processor time, and other resources    Collecting input from input devices    Conveying the output on output devices    Accessing data from secondary storage devices    Writing data to secondary storage devices. Application Software: The collection of programs used to solve the given problem statement is called the application software. Programs are designed based on the computer languages. Examples: Pascal, Fortran, Cobol, C, C++, Java etc., Generally computer languages are classified into three types as:    Machine languages    Assembly languages    High-level languages  Machine languages  are formed with the combination of machine codes  which are binary numbers either 0  or 1 .  Assembly languages  are formed with the combination of mnemonic codes, which contains simple English words like ADD, SUB, MUL etc., High-level languages  are formed with the combination of simple English  sentences . Most of the users are interested to design programming language in high-level language. But a computer can understood only binary language which contains  binary number either 0 or 1. So, that a mediator is required to convert the given  programming language into machine codes and vice-versa. Such mediators are translators.
Related Documents
View more...
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x