(2) Computer Structure (Rabbani)

(2) Computer Structure (Rabbani) - Basic computer and...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Basic computer and programming concepts Amir Hossein Rabbani Winter, 2009
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Winter 2009 Computing for Engineers 2 Computer Software (program) A program is a set of step-by-step instructions that directs the computer to do the tasks you want it to do and produce the results you want. In what form? – E.g., Windows XP, Microsoft Office (Word, PowerPoint, Excel), Computer Virus , Call of Duty, Adobe Photoshop, Yahoo Messenger …
Background image of page 2
Winter 2009 Computing for Engineers 3 Different natural languages How are you? Wie geht es Ihnen? Comment allez-vous? 㟬޷ ʁ And more ……
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Winter 2009 Computing for Engineers 4 Different programming languages C C++ Fortran Assembly (Intel8086, Motorola68000) Java C# And more …… Machine language
Background image of page 4
Winter 2009 Computing for Engineers 5 Choosing a language Suitable for your tasks – Satellite communication (speed) Assembly – Education Basic, Pascal – Business Cobol – Web development Javascript, Java – Scientific calculation Fortran – Real programmer in general purpose C
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Winter 2009 Computing for Engineers 6 Levels of language Machine Language (e.g., 01001110000) Assembly language (Intel: 8086, Motorola: 68000, Sun: Sparc) High level language (e.g., Fortran, C, Cobol) Very high level language (e.g., Java, C++, SQL) Natural language Speed Easiness for human , i.e., more flexibility, easier to be implemented, maintained
Background image of page 6
Winter 2009 Computing for Engineers 7 Low Level Programming Programmers in the late 1940’s had to use binary numbers to encode the instructions and the data the way the machine represented them (as switches) This was very time consuming and error prone so written mnemonic codes were created. Programs were written using these codes and then translated into binary by hand
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Winter 2009 Computing for Engineers 8 Assembler The mnemonic names for machine instructions were developed into languages called assembly language Soon programs were written to convert these mnemonic symbols to binary sequences that could be loaded into the machine memory directly These programs are called assemblers
Background image of page 8
Winter 2009 Computing for Engineers 9 Assembler Example Evaluate the expression f = (g + h) - (i + j) The first step is to use load instructions to transfer values stored in memory to registers g, h, I and j Load and Store instructions are part of the assembly language and allow transferring data values between memory and registers
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Winter 2009 Computing for Engineers 10 Assembler Example Evaluate the expression f = (g + h) - (i + j) Once the values are in registers g, h, I and j we can compute the result.
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2010 for the course COMP COMP 206 taught by Professor Vybihal during the Spring '04 term at McGill.

Page1 / 40

(2) Computer Structure (Rabbani) - Basic computer and...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online