540 likes | 825 Views
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.
E N D
Module Seven Computer Software
Computer SoftwareComputer Software • How applications work.
Computer SoftwareComputer Software • A sequence of instructions to do a task is called a program. • Also known as software, or sometimes a script.
Computer SoftwareComputer Software • Some Examples -
Computer SoftwareComputer Software • Outlook
Computer SoftwareComputer Software • InternetExplorer
Computer SoftwareComputer Software • InternetExplorer6
Computer SoftwareComputer Software • Firefox
Computer SoftwareComputer Software • Safari
Computer SoftwareComputer Software • AdobeAcrobat
Computer SoftwareComputer Software • WorldofWarcraft
Computer SoftwareComputer Software • All of these use • the execution of instructions, and • The manipulation of data that we saw in the last section.
Computer SoftwareComputer Software • Now, we’ll examine the concept of computer programs in a little more detail.
Computer SoftwareBinary Codes • Inside the computer,every piece of information is either a 0 or a 1. • These can be represented electrically or magnetically.
Computer SoftwareBinary 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.
Computer SoftwareBinary Codes • Everything in memory is encoded using collections of bits.
Computer SoftwareBinary 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.
Computer SoftwareBinary Codes • The number 7 is represented as 0000 0111.
Computer SoftwareBinary Codes • Even the instructions the computer uses are bit strings. • The instruction to add two numbers for a particular machine might be 1011 1011.
Computer SoftwareMachine Language • To program the first computers, programmers had to enter the binary strings themselves. • Programs in this form are called machine code.
Computer SoftwareMachine Language • Here is a sample of machine code: • 01001010010011100110011100000011111101010110101000011000100100010000111111001010001111010011110111110000011110010100011110100111101111011000000000011111101011100100100101110010000000111111010111001001001100100110011011011100111011110111110000000
Computer SoftwareMachine 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)
Computer SoftwareAssembly Language • Shortly thereafter, someone wrote a program called an assembler.
Computer SoftwareAssembly 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
Computer SoftwareAssembly Language • Here is a sample of assembly language code: CLR SUM MOV #TAB, R4 LOOP: TST (R4) BEQ END ADD (R4), SUM ADD #2, R4 BR LOOP END: HALT
Computer SoftwareAssembly Language • Easier than machine language, because it uses names for instructions and data locations.
Computer SoftwareAssembly Language • But, because computers’ instructions are so simple, it takes large numbers of them to do even a simple operation.
Computer SoftwareAssembly 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.
Computer SoftwareHigh-Level Languages • High level languages (HLLs) were invented that substitute English-like commands for tens or even hundreds of machine instructions.
Computer SoftwareHigh-Level Languages • HLLs make the computer much easier to program. • Statements can be made much more humanly intuitive than the machine's native instructions.
Computer SoftwareHigh-Level Languages • Also, the same HLL program can be used on different machines, with different machines languages. • This is known as portability.
Computer SoftwareHigh-Level Languages • There are hundreds of HLLs. • Thousands? • Some of the first were • FORTRAN, • COBOL • LISP All of these are still used today.
Computer SoftwareHigh-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
Computer SoftwareComputer Software • High-level languages make the programmer’s life easier. • Relatively speaking
Computer SoftwareComputer Software • A sample HLL (Perl) program: #!/usr/bin/perl -w # Input the value print "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."; }
Module Eight Attacking Software
Attacking SoftwareAttacking Software • How applications work, and how they can be attacked.
Attacking SoftwareAttacking 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.
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
Attacking SoftwareAttacking Software • How malicious software uses your own computer for its purposes can be shown in a series of examples.
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.
Attacking SoftwareSearch • 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.