2.04k likes | 2.15k Views
Introduction To Computer. Abd El-Aziz Ahmed Abd El-Aziz Lecturer Institute of Statistical Studies and Research, Dept. of Computer and Information Sciences, Cairo University. Outline. Introduction. Lecture 1. Lecture 2. Lecture 3. Lecture 4. Lecture 5. Lecture 6. Lecture 7.
E N D
Introduction To Computer Abd El-Aziz Ahmed Abd El-Aziz Lecturer Institute of Statistical Studies and Research, Dept. of Computer and Information Sciences, Cairo University
Outline • Introduction. • Lecture 1. • Lecture 2. • Lecture 3. • Lecture 4. • Lecture 5. • Lecture 6. • Lecture 7. • Lecture 8. • Lecture 9. • Lecture 10.
Outline • Introduction. • Lecture 1. • Lecture 2. • Lecture 3. • Lecture 4. • Lecture 5. • Lecture 6. • Lecture 7. • Lecture 8. • Lecture 9. • Lecture 10.
Introduction • The objective of this course is to learn the students what computer science is about, especially data representations, algorithms, encodings, forms of programming. • The references are: • “Computer Science an Overview”, J. Glenn Brookshear. • “ Introduction to Computer Sciences” , Hesham A. Hefny.
Introduction • The slides are available on scholar.cu.edu.eg/zizo. • The grades are distributed as follows: • 70 marks for final exam. • 10 marks for quiz 1. • 20 marks for assignments.
Outline • Introduction. • Lecture 1. • Lecture 2. • Lecture 3. • Lecture 4. • Lecture 5. • Lecture 6. • Lecture 7. • Lecture 8. • Lecture 9. • Lecture 10.
Lecture 1 • Computer: is an algorithms machine which can be used for solving algorithmic problem. • Algorithm: is a finite set of ordered, unambiguous, and executable instructions that directs a terminating activity. The algorithm is determined by a flow chart or pseudo code. (Assignment 1: the difference bet. Flow chart and pseudo code with example.) • Computer Science: is the science which deals with all issues related to computing machines.
Lecture 1(Cont.) • Developments of Modern Digital Computers: • First Generation (1946-1959): Vacuum tubes in place of mechanical relays and Controlling the operations of the computer using stored programs. • Second Generation (1959-1965): transistors in place of vacuum tubes, magnetic cores for memory storage, and the operating system is appeared. • Third Generation (1965-1970): Integrated circuit technology allowed to group thousands of transistors, Improved mass storage, visual display unit appeared, and the multiprocessor concept is appeared.
Lecture 1(Cont.) • Developments of Modern Digital Computers: • Fourth Generation (1979-1980): multiprocessors appeared with capacity of 4-8 bits, improved mass storage, and improved input / output devices. • Fifth Generation (1980- ): improved mass storage and input / output devices, and computer network. • The features of obtained a new machine are: • Smaller size. • Lower power consumption. • Higher computational power. • Easier for handling. • More user friendly.
Lecture 1(Cont.) • Architecture of Modern Computer Machine: • Central Processing Unit (CPU): is the main unit of the computer which is responsible for executing programs stored in the internal memory. It consists of Arithmetic and Logic Unit (ALU) and Control Unit (CU). • Arithmetic and Logic Unit (ALU): performs all the arithmetic and logical operations. • Control Unit (CU): It controls all the operations of the CPU, such as decoding the instruction of programs stored in the internal memory, and controlling the flow of information through the ALU, I/O, and internal memory.
Lecture 1(Cont.) • Architecture of Modern Computer Machine: • Internal Memory: It’s composed of chips of integrated circuits which are capable of quickly storing and retrieving data. There are two types of internal memory: Read Only Memory (ROM) and Random Access Memory (RAM). • Read Only Memory (ROM): it is nonvolatile memory. It’s a chip contains built in programs that are needed by the computer to start operation when powered on. Theses programs are stored permanently during the manufacturing and can’t be lost when power is turned off. The CPU can only read the ROM.
Lecture 1(Cont.) • Architecture of Modern Computer Machine: • Random Access Memory (RAM): It’s the main memory. The CPU executes programs stored in it. The CPU can read and write to RAM . When the power is off, all the stored data in RAM are lost. • External Storage (auxiliary memory): It’s nonvolatile storage (secondary memory). It’s a memory that holds the data permanently, such as magnetic tapes, magnetic disks, compact disks (CDs), Digital versatile ( تنوع) disks (DVDs), and flash memories.
Lecture 1(Cont.) • Architecture of Modern Computer Machine: • Input Devices: are devices that allow a user to enter data to a computer, and convert it into digital signals to be suitable for processing, such as keyboard, mouse, light pen, scanners, and digitizers. • Output Devices: are devices that convert the electric signals resulted from the CPU into letters, numbers, or images on the screen, such as printers, plotters (computer printers for printing vector graphics), and screens.
Outline • Introduction. • Lecture 1. • Lecture 2. • Lecture 3. • Lecture 4. • Lecture 5. • Lecture 6. • Lecture 7. • Lecture 8. • Lecture 9. • Lecture 10.
Lecture 2 • Categories of Modern Computers: they are categorized by: • Technology • Analog computers: which process and deliver data in a continuous time-varying forms. They are suitable for processing physical quantities, such as temperature, voltages, and pressure. • Digital computers: which can only process and express data using a system of pre-set of values. Usually such a system works with two possible stated for data; i.e., on-off or 0-1, such as the traditional on-off light switch. • Hybrid computers: which are a combination of digital and analog, such as the hospital intensive care devices.
Lecture 2 (Cont.) • Categories of Modern Computers: they are categorized by: • Usage • Special-purpose computers: which are manufactured to perform special tasks, such as controlling factories production-lines or tracking military missiles. A special purpose computer usually runs only one application software. • General-purpose computers: which are manufactured to perform several tasks. A general-purpose computer is able to run wide-range of application software.
Lecture 2 (Cont.) • Categories of Modern Computers: they are categorized by: • Size and computational capabilities • Super computers: they are the highest in speed and the most expensive type of computers. They are used in defense and military applications, breaking codes , weather forecasting, and complex scientific applications. They cost as much as twenty million dollars. • Mainframes computers: they are large and stationary computers that require space in an air conditioned room. Such machines are able to store massive amounts of data, support hundreds or thousands of users simultaneously, and run a wide variety of applications all at one time. They cost from several hundred thousands dollars up to 10 million dollars. They are usually used in banks, airlines, and insurance companies.
Lecture 2 (Cont.) • Categories of Modern Computers: they are categorized by: • Size and computational capabilities • Minicomputers: they are similar to mainframes but on a smaller scale and less power. They cost as much as ten thousand up to several hundred thousand of dollars. • Microcomputers: they are computers in which the CPU is manufactured as a single chip called “microprocessor”. They are less in power and cost compared with the above types. Today, almost all computers are microprocessor-based machines. In other words, microcomputers become the main player in computer manufacturing technology.
Lecture 2 (Cont.) • Types of Microcomputer Machines • There are different types of microcomputer machines available for different applications: • Personal computers. • Handheld computers. • Workstations. • Videogames consoles.
Lecture 2 (Cont.) • Types of Microcomputer Machines • Personal computer: which are designed to meet computing needs of an individuals with applications, such as word processing, spreadsheets, internet access. They are available in different forms, such as Desktop and Portable (or mobile).
Lecture 2 (Cont.) • Types of Microcomputer Machines • Desktop: which fits on a desk and runs on power from an electrical wall outlet. Its system unit can be housed in horizontal or vertical cases. Vertical cases are also called “tower” or “min-tower”.
Lecture 2 (Cont.) • Types of Microcomputer Machines • Portable (or mobile): which is a small, lightweight PC that can be carried and used outdoors. It runs on power supplied by an electrical outlet or a battery. Portable (or mobile) computers are available in different forms, such as Notebooks (or laptops), Tablets, and Ultra-mobiles.
Lecture 2 (Cont.) • Types of Microcomputer Machines • Tablet: which has a touch-sensitive screen that can be used as a writing or Drawing pad. Tablet computer is suitable for applications with handwritten inputs.
Lecture 2 (Cont.) • Types of Microcomputer Machines • Ultra-mobile: Ultra-mobile PC (UMPC) is a small tablet designed to run most of the software available for portable computers. It has a size of a paperback book and weighting in at 2 pounds. UMPC usually has a wireless internet access and may also be equipped with GPS. It can be used to listen to music, watch videos and play games.
Lecture 2 (Cont.) • Types of Microcomputer Machines • Ultra-mobile: Ultra-mobile PC (UMPC) is a small tablet designed to run most of the software available for portable computers. It has a size of a paperback book and weighting in at 2 pounds. UMPC usually has a wireless internet access and may also be equipped with GPS. It can be used to listen to music, watch videos and play games.
Lecture 2 (Cont.) • Types of Microcomputer Machines • Handheld computer : It is also called “Personal digital assistant” (PDA). It is designed to fit into pocket. As for examples: Apple iPhone, BlackBerry . • It has either small keyboard or touch-sensitive screen. Such a type of computers is usually used as an electronic appointment book, address book, calculator, internet access, or make calls as a cellular phone. • Since it is not powerful as personal computers, it is usually needed to update information stored in it using the feature of “synchronize information” with a personal computer.
Lecture 2 (Cont.) • Types of Microcomputer Machines • Workstations: They are usually powerful desktop computers with one or more microprocessors. They are suitable for tasks which require high processing speed, such as medical imaging and computer-aided design. • A Workstation may be used as a standalone computer or as a network computer when connected with other computers through a network. • Videogames consoles: today’s videogames consoles contain microprocessors, keyboards, DVD-players and internet access. They are considered microcomputers but can not replace personal computers. Examples include: Sony’s playstation, and Microsoft’s Xbox.
Lecture 2 (Cont.) • Data Representation In Modern Computers • Today’s algorithmic machines can generally be termed “Digital Computers”. • The main characteristics of digital computers is its manipulation of discrete elements of information. Such discrete elements are represented physically by “electrical signals” such as voltages and currents. • The main memory of digital computers consists of millions of electrical devices called transistors, each of which can only have two possible states: on or off, quite similar to a mechanical switch. • The transistor circuit in main memory acts as an electronic switch with two states according to its output voltage.
Lecture 2 (Cont.) • Data Representation In Modern Computers • Since main memory can only store data in the form of 0 and 1, therefore, digital computers can only deal with information represented as binary values. • All information entered to the digital computers , (regardless of being numbers, characters or symbols), should be represented as a sequence of binary digits. • Binary digit is usually abbreviated as bit.
Lecture 2 (Cont.) • Data Representation In Modern Computers • Bit is quite little piece of information to be handled in digital computer’s main memory during the execution of an algorithm. Therefore, for practical reasons, main memory is usually divided into large number of cells (called words), with typical cell sizes being: 8, 16, or 32 bits. Each collection of 8 bits is usually termed as byte.
Lecture 2 (Cont.) • Numbering System • In general, the decimal equivalent value for any real number of a positional numbering system with base R can be calculated using the following “expanded notation” formula:
Lecture 2 (Cont.) • Numbering System
Lecture 2 (Cont.) • Numbering System
Lecture 2 (Cont.) • Numbering System
Lecture 3 • Conversions In Numbering Systems: • Conversion From Decimal To Binary System (0,1): • Example 1: convert 174.390625 to binary system:
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Therefore, the number (10101110.011001)2 is the exact binary equivalent to the decimal number (174.390625)10. • Example 2: getthe equivalent binary number of the decimal number 47.763 with a precision of 7-binary digits.
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Therefore, the number (10111.1100001)2 is the approximate binary equivalent to the decimal number (47.763)10.
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Conversion From Decimal To Ternary System (0-2): • Example 3: Convert the decimal number 124.33 to its equivalent ternary number with precision of 5 ternary digits.
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Example 4: .
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Conversion From Decimal To Octal System (0-7): • Example 5: Convert the decimal number 167.390625 to its equivalent octal number.
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Conversion From Decimal To Octal System (0-7): • Example 6: Convert the decimal number 95.236 to its equivalent octal number with a precision up to 4 octal digits.
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Conversion From Decimal To Hexadecimal System (0-F): • Example 7: Convert the decimal 247.390625 to its equivalent hexadecimal number.
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Conversion From Binary To Octal System and vice versa: • There are two ways: • Indirect conversion:
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Direct conversion: each 3-binary digits are replaced by one octal digit , and vice versa , using the following table: • Example 8: using the indirect way, convert the binary number 1001101.1011 to octal
Lecture 3 (Cont.) • Conversions In Numbering Systems:
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Direct conversion: • Example 9: Using the direct way, convert the binary number 1001101.1011 to octal
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Conversion From Binary To Hexadecimal System and vice versa: • There are two ways: • Indirect conversion:
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Direct conversion: each 4-binary digits are replaced by one hexadecimal digit , and vice versa , using the following table: • Example 10: convert the hexadecimal 3BC. 2E directly to its equivalent binary number.
Lecture 3 (Cont.) • Conversions In Numbering Systems:
Lecture 3 (Cont.) • Conversions In Numbering Systems: • Example11: Convert the binary number 111010.11011 directly to its equivalent hexadecimal number. • Solution: start from the binary point and move to the right (for fraction part) and to the left (for the integral part) grouping each 4- binary digits as one hexadecimal digit. Adding 0’s to the extreme right (or left) is allowed. Thus, we have: • You should download (scholar.cu.edu.eg/zizo), answer, and submit Assignment 1.