1 / 29

POS 370 Computer Concepts

POS 370 Computer Concepts. Emilio Yanine. Welcome. Syllabus Course overview Attendance Policy Review OLN newsgroups (Flexnet) Participation expectations Grading Breaks/Hours Laptops for class activities Web site Books New Perspective: Computer Concepts (Informational)

efrat
Télécharger la présentation

POS 370 Computer Concepts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. POS 370Computer Concepts Emilio Yanine

  2. Welcome • Syllabus • Course overview • Attendance Policy • Review OLN newsgroups (Flexnet) • Participation expectations • Grading • Breaks/Hours • Laptops for class activities • Web site • Books • New Perspective: Computer Concepts (Informational) • C Programming for the Absolute Beginner (Reference) • Ignore the Unix topics, focus on the C examples • I will use my own examples but are similar to the book’s examples • Miracle C compiler • Team formation/team charter

  3. POS370/CSS561 Reading Assignments • E-resource weekly article readings • bring questions or points of interest for class discussion • Book readings • C Programming for the Absolute Beginner

  4. First Computer • ENIAC (electronic numerical integrator and computer) • The world's first electronic digital computer was developed by Army Ordnance to compute World War II ballistic firing tables. • ENIAC patent (No. 3,120,606), filed 26 June 1947. • See: http://ftp.arl.mil/~mike/comphist/eniac-story.html for full article

  5. Computer System Components • Central proc. unit (CPU) • executes instructions. • Memory (RAM): • stores processor instructions, data and programs. • Mass storage devices • hard disk drives and tape drives. Store programs and data permanently • Input devices • keyboard and mouse • Output devices • display screen, printer • Applications programs *The Operating system ties together these elements into a “Computer System”

  6. Operating Systems “Paramount to any software development project, it is important to “acquire a broader understanding of operating system concepts, memory management, and other high-level languages” (Vine, 2004, p. 1).” • To be a good programmer you must have a good understanding of the operating system your application will run under. • The OS is the primary interface to the application to access resources

  7. The most important program that runs on a computer. Every general-purpose computer must have an operating system to run other programs. Operating systems perform basic tasks, such as recognizing input from the keyboard, sending output to the display screen, keeping track of files and directories on the disk, and controlling peripheral devices such as disk drives and printers. OS: What Is It?

  8. OS’s as Platforms for Applications • Operating systems provide a software platform on top of which other programs, called applicationprograms, can run. • The application programs must be written to run on top of a particular operating system. • Your choice of operating system, therefore, determines to a great extent the applications you can run. For PCs, the most popular operating systems are DOS, OS/2, and Windows, but others are available, such as Linux.

  9. Operating System Classification • multi-user: Allows two or more users to run programs at the same time. Some operating systems permit hundreds or even thousands of concurrent users. • multiprocessing: Supports running a program on more than one CPU. • multitasking: Allows more than one program to run concurrently. • multithreading: Allows different parts of a single program to run concurrently. • real time: Responds to input instantly. General-purpose operating systems, such as DOS, Windows and UNIX, are not real-time.

  10. Central Processing Unit (CPU) • The CPU is the brains of the computer, it is where calculations take place. • In terms of computing power, the CPU is the most important element of a computer system. • The CPU is divided into: • The arithmetic logic unit(ALU), which performs arithmetic and logical operations. • The logic control unit (LCU), which extracts instructions from memory and decodes and executes them, calling on the ALU when necessary

  11. Memory Classification • RAM(random-access memory): • Read and write memory found in most computer systems. RAM is volatile, which means that it requires a steady flow of electricity to maintain its contents. As soon as the power is turned off, whatever data was in RAM is lost. • ROM (read-only memory): • Computers almost always contain a small amount of read-only memory that holds instructions for starting up the computer (BIOS). Unlike RAM, ROM cannot be written to.

  12. Memory Classification • Other types: • PROM(programmable read-only memory): A PROM is a memory chip on which you can store a program. But once the PROM has been used, you cannot wipe it clean and use it to store something else. Like ROMs, PROMs are non-volatile. • EPROM(erasable programmable read-only memory): An EPROM is a special type of PROM that can be erased by exposing it to ultraviolet light. • EEPROM(electrically erasable programmable read-only memory): An EEPROM is a special type of PROM that can be erased by exposing it to an electrical charge.

  13. Programming Languages

  14. Programming Languages • Why do we need to program? • What problems are suitable for a programmatic solution? • What problems are not suitable to a programmatic solution

  15. History of Programming Languages • First Generation (Machine Language) • Late 1940’s (after WWII) • Second Generation (Assembly) • Early 1950’s • Third Generation (High level/structured) • Late 1950’s • Ex: FORTRAN (1957), COBOL (1959) • Fourth Generation (Object Oriented) • Mid 1980’s • Ex: C++ (1985), Java (1995), VBasic (1992)

  16. 1GL Characteristics • 100% machine dependent (not portable) • Very tedious to program • Very difficult to debug • Complete control of hardware (fast/efficient)

  17. 2GL Characteristics • Easier to read • Uses instructions mnemonics • Very fast (compared to high level lang’s.) • High performance drivers still written in assembly • Unsuitable for large programs • No structure or advanced constructs • Machine/cpu dependent

  18. 3GL Characteristics • Easier to program large projects • Added code structure added (functions, loops, conditional statements and branching. • Cornerstone is the procedure (function) • Known as “procedural” languages • Data is secondary and separate from code • Portable code • independent of cpu

  19. 4GL Characteristics • More intuitive approach to programming • Idea is to model problems using “Objects” • Code and data “encapsulated” into Objects • Supports advanced OOP constructs • Classes, inheritance, aggregation, etc.

  20. 3GL “Hello” Program #include "stdafx.h" int main() { printf("Hello World!\n"); return 0; }

  21. 2GL “Hello” Program 8: printf("Hello World!\n"); 00401028 push offset string "Hello World!\n" (0042001c) 0040102D call printf (00401060) 00401032 add esp,4 9: return 0; 00401035 xor eax,eax 10: } 00401037 pop edi 00401038 pop esi 00401039 pop ebx 0040103A add esp,40h 0040103D cmp ebp,esp 0040103F call __chkesp (004010e0) 00401044 mov esp,ebp 00401046 pop ebp 00401047 ret 1: // test.cpp : Defines the entry point for the console application. 2: // 3: 4: #include "stdafx.h" 5: 6: int main(int argc, char* argv[]) 7: { 00401010 push ebp 00401011 mov ebp,esp 00401013 sub esp,40h 00401016 push ebx 00401017 push esi 00401018 push edi 00401019 lea edi,[ebp-40h] 0040101C mov ecx,10h 00401021 mov eax,0CCCCCCCCh 00401026 rep stos dword ptr [edi]

  22. 1GL Hello Program • 00401010 55 8B EC 83 EC 40 53 • 00401017 56 57 8D 7D C0 B9 10 • 0040101E 00 00 00 B8 CC CC CC • 00401025 CC F3 AB 68 1C 00 42 • 0040102C 00 E8 2E 00 00 00 83 • 00401033 C4 04 33 C0 5F 5E 5B • 0040103A 83 C4 40 3B EC E8 9C • 00401041 00 00 00 8B E5 5D C3 • 00401048 CC CC CC CC CC CC CC

  23. Program Development Environments (Software Development Tools)

  24. Compilers/IDE • Modern software development environments are highly integrated tools that provide the essential functions necessary to develop programs. These include: • Text editor to type programs/commands • Compiler to convert to machine language • Linker to link in libraries and other modules • Debugger to help catch semantic (logic) errors

  25. Programming Cycle Built in libraries and other program modules Text Editor Compiler Linker Debugger MyFile.obj (intermediate binary) MyFile.exe (Executable prog.) MyFile.c (C code)

  26. Trilogy of Programming Prog. Framework: C, Pascal, Cobol, Fortran, etc, Subject Knowledge Tools:MSVC++, Borland C++, Miracle C Environment:Windows, DOS, Unix, etc.

  27. Additional Material • RTOS (Real Time OS) Links • http://www.onesmartclick.com/rtos/rtos.html • http://linuxdevices.com/articles/AT4627965573.html

  28. Installing Miracle C • Links • Tutorials • Compiling • Add Pause()… • Show output (intermediate) files • Run from DOS Window • Help

  29. Preparation for next week • Reading Assignments • Review week 2 instructor’s lecture • eResource week 2 articles • Bring questions to class for discussion • Homework: Email response paper • Use APA style guide and CWE • Team Charter • Complete Miracle-C installation • Use eResouce tutorials if necessary • Write a simple program (like money wizard in book’s Ch. 2)

More Related