160 likes | 280 Views
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization & Assembly Language Lecture 1 (Course Introduction). Instructor Contact. Salma Idris Room no 336 (2 nd floor)
E N D
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization & Assembly Language Lecture 1 (Course Introduction)
Instructor Contact SalmaIdris Room no 336 (2nd floor) E-mail: sidris@pscw.psu.edu.sa Course Website: http://www.cs251.yolasite.com Course Introduction
Outline • Course Structure • Part I: Computer Organization • Part II: Assembly Language • Textbooks • Course Policy Course Introduction
Text Books • Computer Organization: • S.Tanenbaum (2010). Structured Computer Organization, 5th edition, Prentice Hall. • Assembly Language: • Ytha Yu and Charles Marut (1992). Assembly Language Programming and Organization of the IBM PC, International edition, McGraw-Hill publishing company. • Other Resource Materials: • Kip R. Irvine. Assembly language for Intel based computers, 4th edition, Prentice Hall. Course Introduction
Course Structure • Split into two parts • I. Computer Organization: Introduce the main hardware components and their relation with software. • II. Assembly Language: Introduce the machine language of the computer with some practical programming applications. Course Introduction
Part I: Computer Organization • Topics to be covered: • I. Introduction to Computer Organization • II. Processors • III. Primary Memory • IV. Secondary Memory • V. Input/output Processor Course Introduction
Part I: Basic Computer Components • A computer is a hierarchic system composed of interrelated subsystems • Basic components of the computer • CPU: Central Processing Unit • Main Memory: Storage medium • I/O: Input & Output devices • System Interconnection: Buses System Inter-connection Main Memory Input / Output Computer System Central Processing Unit Course Introduction
Part I: Central Processing Unit • It is the brain of the computer • Its function is to execute programs stored in main memory by fetching instructions, decoding them, and executing them. Main Memory • It consists of 3 main components • Arithmetic Logic Unit (ALU) • Control Unit • Registers CPU ALU Control Unit Registers I-D (IOP) O-D Course Introduction
Part I: CPU (Cont.) • Internal components of the CPU: • I. ALU: Arithmetic & Logic Unit responsible for manipulating data • II. Control Unit: Directs the flow of information. It controls where every bit of data goes • III. Registers: High speed memory locations used to store temporary results & certain control information MDR PC R0 CPU R1 MAR Control Unit IR : : : ALU Rn-1 Course Introduction
Part I: Main Memory • It’s a storage unit for instructions and data. • It stores data temporary • All programs which are running will be in Main Memory • Faster then secondary storage Course Introduction
Part I: Secondary Memory • It stores data and information • When programs are downloaded or installed they are stored in secondary storage for example hard disk. • Slow in working • Have high capacity to store data Course Introduction
Part I: Input/Output Processor (IOP) I-D (IOP) O-D • It contains electronic circuits for communicating and controlling the transfer of information between the CPU and its external environment. • Examples of I/O devices: • Keyboards • Printers • Monitors Course Introduction
Part II: Assembly Language • An Alternative view of the computer system, its components, & their interrelation Course Introduction
Part II: Language Levels s[i] = temp s[i] = s[i+1] s[i+1] = temp High Level Language Program (e.g. Java) Compiler Machine Language Program (i.e. bits) Assembly Language Program (e.g. MIPS) lw $t0, 0($2) lw $t1, 4($2) sw $t1, 0($2) sw $t0, 4($2) Assembler 0000 1010 1000 0100 1110 1111 1010 1111 1001 1010 1101 0010 0100 0010 1011 0110 1100 0001 1011 1101 1100 0011 1011 1110 Machine Interpretation Control Signal Specification Course Introduction
Part II: Advantages of High Level Language (HLL) • HLL program generally contains less instructions than equivalent ASM programs = less time is required to code the HLL program. • HLL program can be executed on any machine that has a compiler for that language ASM program is limited to one type of machine. • It is easier to convert a natural language algorithm to a HLL program • It is easier to read & understand HLL program than ASM program. Course Introduction
Part II: Advantages of Assembly Language (HLL) • Performance • A well-written Assembly language program produces a faster, shorter machine language program. • For Some applications speed and size is critical • Access to hardware: • Some operations, such as reading or writing to specific memory locations & I/O ports can be done easily in Assembly but may be impossible by a higher level language. • Studying ASM language gain a feeling of the way the computer thinks and the way things happen inside the computer. Course Introduction