54
Module Seven Computer Software

Module Seven

  • Upload
    cicily

  • View
    97

  • Download
    0

Embed Size (px)

DESCRIPTION

Module Seven. Computer Software. Computer Software Computer Software. How applications work. Computer Software Computer Software. A sequence of instructions to do a task is called a program . Also known as software, or sometimes a script. Computer Software Computer Software. - PowerPoint PPT Presentation

Citation preview

Page 1: Module Seven

Module Seven

Computer Software

Page 2: Module Seven

Computer Software

Computer Software• How applications work.

Page 3: Module Seven

Computer Software

Computer Software• A sequence of instructions to do a task

is called a program.– Also known as software, or sometimes a

script.

Page 4: Module Seven

Computer Software

Computer Software• Some Examples -

Page 5: Module Seven

Computer Software

Computer Software• Word

Page 6: Module Seven

Computer Software

Computer Software• Excel

Page 7: Module Seven

Computer Software

Computer Software• Outlook

Page 8: Module Seven

Computer Software

Computer Software• Internet

Explorer

Page 9: Module Seven

Computer Software

Computer Software• Internet

Explorer6

Page 10: Module Seven

Computer Software

Computer Software• Firefox

Page 11: Module Seven

Computer Software

Computer Software• Safari

Page 12: Module Seven

Computer Software

Computer Software• Adobe

Acrobat

Page 13: Module Seven

Computer Software

Computer Software• Skype

Page 14: Module Seven

Computer Software

Computer Software• World

ofWarcraft

Page 15: Module Seven

Computer Software

Computer Software• All of these use

– the execution of instructions, and– The manipulation of data

that we saw in the last section.

Page 16: Module Seven

Computer Software

Computer Software• Now, we’ll examine the concept of

computer programs in a little more detail.

Page 17: Module Seven

Machine Language

Page 18: Module Seven

Computer Software Binary Codes

• Inside the computer,every piece of information is either a 0 or a 1.

• These can be represented electrically or magnetically.

Page 19: Module Seven

Computer Software Binary Codes

• A single 0/1 value is a bit.• Every byte in memory is a group of eight bits.

– Remember, that a computer’s memory is measured as megabytes or gigabytes.

Page 20: Module Seven

Computer Software Binary Codes

• Everything in memory is encoded using collections of bits.

Page 21: Module Seven

Computer Software Binary Codes

• The letter “a” is represented in memory as 0110 0001.– This is an example of a bit string.– Note that it uses eight bits - a byte.

Page 22: Module Seven

Computer Software Binary Codes

• The number 7 is represented as 0000 0111.

Page 23: Module Seven

Computer Software Binary Codes

• Even the instructions the computer uses are bit strings. – The instruction to add two numbers for a particular

machine might be 1011 1011.

Page 24: Module Seven

Computer Software Machine Language

• To program the first computers, programmers had to enter the binary strings themselves. – Programs in this form are called machine

code.

Page 25: Module Seven

Computer Software Machine Language

• Here is a sample of machine code:

01001010010011100110011100000011111101010110101000011000100100010000111111001010001111010011110111110000011110010100011110100111101111011000000000011111101011100100100101110010000000111111010111001001001100100110011011011100111011110111110000000

Page 26: Module Seven

Computer Software Machine Language

• For anything but tiny programs, this was a terrible burden.

• It was easy to make typos• References to data in memory had to be to

the numeric address of that memory location (i.e. the piece of information in location 1001 0101 1111 0100)

Page 27: Module Seven

Assembly Language

Page 28: Module Seven

Computer Software Assembly Language

• Shortly thereafter, someone wrote a program called an assembler.

Page 29: Module Seven

Computer Software Assembly Language

• An assembler takes a file that contains names for the machine instructions.

• It then translates this into the machine code.• For example,

– Instead of 1011 1011 the programmer would write ADD for the add instruction.

– Programmers could refer to data locations by names (labels, e.g. SUM), instead of by numeric address

Page 30: Module Seven

Computer Software Assembly Language

• Here is a sample of assembly language code:

CLR SUMMOV #TAB, R4

LOOP: TST (R4)BEQ ENDADD (R4), SUMADD #2, R4BR LOOP

END: HALT

Page 31: Module Seven

Computer Software Assembly Language

• Easier than machine language, because it uses names for instructions and data locations.

Page 32: Module Seven

Computer Software Assembly Language

• But, because computers’ instructions are so simple, it takes large numbers of them to do even a simple operation.

Page 33: Module Seven

Computer Software Assembly Language

• This is especially true if they involve reading information from the keyboard or disk or writing it out to the monitor or disk.

• So, even simple assembly language programs are ridiculously long.

Page 34: Module Seven

High-level Languages

Page 35: Module Seven

Computer Software High-Level Languages

• High level languages (HLLs) were invented that substitute English-like commands for tens or even hundreds of machine instructions.

Page 36: Module Seven

Computer Software High-Level Languages

• HLLs make the computer much easier to program. – Statements can be made much more

humanly intuitive than the machine's native instructions.

Page 37: Module Seven

Computer Software High-Level Languages

• Also, the same HLL program can be used on different machines, with different machines languages.

• This is known as portability.

Page 38: Module Seven

Computer Software High-Level Languages

• There are hundreds of HLLs. – Thousands?

• Some of the first were – FORTRAN, – COBOL– LISP

All of these are still used today.

Page 39: Module Seven

Computer Software High-Level Languages

• Other popular languages include – ALICE– BASIC– Pascal– Modula– C– Prolog– Java

– C++– Perl– Python– Ruby– Macro languages – Scripting languages– And many, many more

Page 40: Module Seven

Computer Software Computer Software

• High-level languages make the programmer’s life easier.– Relatively speaking

Page 41: Module Seven

Computer Software Computer Software

• A sample HLL (Perl) program:#!/usr/bin/perl -w

# Input the valueprint "Enter a numeric value: ";$value = <>;chomp $value;

# Is it positive, negative or zero?if ($value > 0) {

print "$value is positive.\n";} elsif ($value < 0) {

print "$value is negative.\n";} else {

print "$value is zero.";}

Page 42: Module Seven

Module Eight

Attacking Software

Page 43: Module Seven

Attacking Software Attacking Software

• How applications work, and how they can be attacked.

Page 44: Module Seven

Attacking Software Attacking Software

• The fundamental point is that a malicious piece of software does the same kinds of things that a legitimate one does.

• The only difference is that its purpose is usually harmful to the computer or its user.

Page 45: Module Seven

Attacking Software

Application-Based Security Attacks

• If a malicious piece of software gets on your computer, it can use the computer’s own instructions and resources against you.

• Many familiar types of computer attacks do just this:– Trojan horses– Viruses

Page 46: Module Seven

Attacking Software Attacking Software

• How malicious software uses your own computer for its purposes can be shown in a series of examples.

Page 47: Module Seven

Search

Page 48: Module Seven

Attacking Software

Search• A helpful feature on modern computers

is the search function.• It allows you to type in a word or

phrase.• The computer can then check to see if

that word or phrase is – part of a file name, or – part of the contents inside one of your files.

Page 49: Module Seven
Page 50: Module Seven

Attacking Software

Search• How it works -• Suppose you asked the computer to

search for a specific word (e.g. iPod) in your “My Documents” folder.

• The computer will search all of the data in all of those files for values matching “iPod” and will show you all files with that word in them.

Page 51: Module Seven

Attacking Software

Search• Even though modern disk drives can

store hundreds of gigabytes of information, computers are fast enough to make even comprehensive searches of a computer’s files practical.– This is helped by the fact that computers

can keep track of (index) this information to make search even faster.

Page 52: Module Seven

Attacking Software

Search• The ability to search your own files is

definitely something positive.

Page 53: Module Seven

Attacking Software

Search• However, a malicious piece of software can

also search through your files.• It can look for pieces of information that look

like – Email addresses– Credit card numbers– passwords

• Once found, those data can then be sent back to the attackers.

Page 54: Module Seven

Attacking Software

Search• A malicious search works the same way as a

legitimate one.• There is no difference from the point of view

of the computer.

• The only difference is whether the search result is beneficial or harmful for you.