Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Computers

Similar presentations


Presentation on theme: "Introduction to Computers"— Presentation transcript:

1 Introduction to Computers

2 What is software? A set of instructions that tell a computer how to perform a specific task Written in one of many computer languages The instructions must follow a set of rules called syntax just as English must follow rules of grammar Syntax is governed by the computer language used Usually consists of many elements including instructions, forms, icons, help text, etc. Not a physical thing, you can’t touch software

3 Elements of software Consists of many types of files working together:
Programs (.exe) –a main executable file Shared modules (.dll) –executable file supporting the main executable & shared by multiple programs Data files (.dat and others) –contains data needed by the program(s) Text files (.hlp & .txt) –information for users Graphics files (.ico, gif, pcx, and others) – contains graphics used such as icons and other images Plus other types of files too numerous to mention

4 A program is installed in a folder
Note the various files required for this particular program Programs Shared Modules Data File Images Icons Sound Files

5 Programming is highly detailed
Software provides a task-related environment Word displays the document the user creates Excel displays rows and columns of a spreadsheet Internet Explorer displays web pages A programmer defines the entire environment including every icon, text box, button, and menu Must define height, width, location, and other characteristics of each element in the environment And more importantly, the actions to perform when the user clicks on an element in the environment

6 A program – Convert Farenheit to Celsius
txtFarenheit txtFarenheit Characteristics Private Sub btnConvert_Click 'Declare working variables needed Dim farenheit As Single Dim celsius As Single 'Make sure text box contains a number If IsNumeric(txtFarenheit.Text) Then 'Convert text box entry to a number farenheit = Val(txtFarenheit.Text) 'Calculate the equivalent Celsius temperature celsius = (farenheit - 32) * 5 / 9 'Place resulting celsius temp in the form lblCelsius.Text = celsius.ToString Else 'If no number in text box, display error message MessageBox.Show("Please enter a number to convert") End If End Sub lblCelsius btnConvert

7 High-level languages Previous slide an illustration of the Visual Basic programming language Visual Basic is a high-level language Most software is written in a high-level language Allows programmers to create complex instructions well above the level at which the processor operates A set of instructions in a high-level language is referred to as source code Other high-level languages include C, C++, Java, Fortran, and COBOL

8 Machine Language The processor executes instructions at a fairly simple level called machine language Processor dictates the machine language used High-level Language Instruction Equivalent Instructions In Machine Language Description of Machine Language Instruction Answer = Number1 + Number2 Move RAM Location Called Number1 into Register 1 Move RAM Location Called Number2 into Register 2 Add Register 1 and Register 2 to the Accumulator Move Accumulator to RAM Location Called Answer

9 The role of a compiler A Visual Basic program has a .vb extension
Must translate high-level language source code to the 1s and 0s of machine language A compiler does this conversion, creating a .exe program file called object code Program is then run by executing the .exe file

10 Interpreters Some high-level languages use an interpreter instead of a compiler An interpreter does not create a .exe file Instead it converts high level language instructions to machine language one instruction at a time Resulting machine language instructions are immediately sent to the processor for execution Machine language instructions are not saved Program must be re-interpreted every time it’s run

11 Interpreters versus compilers
Interpreters are simpler Convert to machine language & send to processor But the interpreter is needed on every machine that must run an interpreted program Compilers are more efficient Conversion to machine language happens one time Program can execute repeatedly with no re-compile Compiler required on programmer’s computer only No compiler needed when executing the program

12 Platform dependence Machine language programs must utilize the instruction set of the processor they will run on It’s why processor is a determining factor in compatibility between computers A compiler creates a machine language program intended for a particular family type of processor The same high-level language may be used on multiple platforms But the compiler must be changed to produce object code compatible with that platform

13 Software categories System software performs tasks dealing with the internal operations of the computer Provides a reliable platform for application software Includes the operating system, device drivers, utilities, and programming languages Application software performs tasks needed by a user Includes many types such as document production, spreadsheets, database, music, accounting, etc.


Download ppt "Introduction to Computers"

Similar presentations


Ads by Google