This action might not be possible to undo. Are you sure you want to continue?
The applications section Number:1
Computer hardware: The hardware of a personal computer system is the assembly of the major electronic components that build such system. These components are: the micro computer, the monitor, the keyboard, the mouse, the printer or plotter (or both) and the scanner. Personal computers are used by children to play games, by students to solve problems and by organizations and businesses to run their businesses consistently, automatically and efficiently. All these components are interconnected with each other using cables and appropriate connectors. Certain elements of the system have to be connected to the power source (preferabally a clean one). For example the mouse is connected to the microcomputer via a PS/2 or USB connector as well as the keyboard. The printer is connected to the microcomputer through a printer data connrctor or a USB. The micro computers come in many shapes and properties. For example the case can be of the desktop or mini tower, the speed of operation can range from 133 to 450 MHZ or 1 HZ (just a while ago it was from 33 to 100 MZ) depending on the microprocessor chip used (which is also known as central processing unit - CPU - the brain of the system). An example for the main elements that build the microcomputer are: the microprocessor, ROM (read only memory) are used to store the instructions needed to start and run the system and RAM (random access memory) which is used partly by the programs, peripherals and the user of the system, address, data & control buses, disk drives (hard, floppy, DVD and CD), expansion slots, modem card (if internal), monitor card, network interface module (card + port), serial and parallel ports. The peripheral devices are: the input and output ones which include the keyboard, mouse, monitor, printer (or/and plotter) and the scanner. The main chips (large scale integrated circuits and other digital or analog circuits) that arefound in a microcomputer can be: central processing unit (CPU-40 pin chip), peripheral interface adapter (PIA- 40 pin), video display generator (VDG- 40 pin), synchronous address multiplexer (SAM- 40 pin), asynchronous communication interface adapter (ACIA- 24 pin), read only memory (ROM- 24 pin), random access memory (RAM- 24 or 16 pin). The other chips which have 12, 14 or 16 pin are: buffers, latches, flip-flops, decoders, logic gates video mixers, modulators and regulators. The RAM chip can be static or dynamic. The ROM can be classified into programmable read only memory (PROM) erasable programmable memory (EPROM). The CPU is connected to all the chips through address bus (lines, cables or etched conductive lines on the printed circuit board), data bus and control bus. All the typing done on the keyboard or until the characters are printed on the screen of the monitor (or on the printer), downstream or upstream of the PIA (within the PC) depending on its function, are presented by electrical square wave pulses (a 0 or a 1 or an intermediate level - transition period from high to low or vice versa). For a block diagram of a typical system refer to fig. 1. When the PC is turned on, the CPU directs the control to the ROM (chip) first address (so the PC can perform the POST - power on self test), if everything goes as it should, then it directs the control of the PC system to the operating system on the hard drive. Thus the system is booted up.
s p e a k e r s
C P U
s p e a k e r s
Fig. 1 In simple manner, when the user type a letter on the keyboard, the PIA (or the microprocessor in the keyboard, found in most models) through the ROM, converts the scan code into ASCII code. The ASCII code is an 8-bit train (string) of pulses either 1, 2.4 volt or higher or 0 .8 volt or lower. Each character (letter, number or symbol on the keyboard) has its own 8-bit presentation of pulses. The ASCII pulses go from the ROM to the CPU over the bus. Now, lets assume the user has an application program stored on the hard disk. When he types (or clicks) to start such a program, the hard drive starts operating and the 1s and 0s which is the only language that the machine understands) pass through the PIA (hard drive interface on to the to the CPU. These bits are stored in the registers of the RAM. The RAM will have the program instructions (0s & 1s) in sets of 8 or 16 digits per row of registers. Then the CPU sends out the address of the first address of the application program and a copy of the contents of that address travels the bus back to the CPU. The CPU begins processing the program. When the contents of the first address has been processed by the CPU, the CPU outputs the address of the second address of the application progranm (RAM) on the address bus. This opens the second address and its contents enter the bus going to the CPU. After all the instructions are processed by the CPU, the user will have the application program ready for his use. Once the application program is running and all the menu items, icons, push buttons, prompts are on the screen, the user can start working with the software which is running with the operating system. While in the software, when the user starts to type, for each hit on the keyboard a string of pulses are generated (as a reason of the row/column intersection short). Through the PIA the bits reaches the CPU (through the ROM) via the bus. There is also a break signal that has to be received by the PIA before processing the input by the user to the keyboard. The reason for such requirement is the key combination (when more than 1 key is hit to produce a character). The bits are then addressed to the video RAM. The storage of the bits in the video RAM automatically outputs them to the video latch. The latch proceeds to output the bits to the VDG. There the bits are decoded into video signals and get displayed on the screen. A copy of the video RAM is stored in another location, also, in the RAM. When the user passes the printing command through the mouse or the keyboard, the addressing jump to the section of the software (program) that contains the printing
instructions. The CPU starts receiving copies of the printing instructions from the RAM (part of the software application program). The CPU outputs a copy of the information that is to be printed to the PIA (that is responsible for the production of hard copies). The PIA sends the pulses to the printer where the ASCII train of pulses (8-bit per character) is converted into letters & numbers, a hard copy is produced. In summary, the CPU has 3 main functions: addressing, instruction handling & manipulation. The main difference between a gate and a register is that a register can store the bits and a gate can not (can only switch itself on or off). A typical storage device that can hold one bit is called a flip flop.There are different types which are: R-S, D, J-K & T flip flops. These circuits can also be used as counters and shift registers. If a number of flip flops are wired side by side, they form a register. Typical registers can hold 4, 8 or 16 bits. For the personal computers, there are 3 types of keyboards: the PC/XT with 83 keys AT with 84 keys and enhanced AT with 101 or 102 keys. The scan codes are standardized as well as the number of keys per type. The communication between keyboard & the CPU is serial. A software interface acts as the connection between an application program and the mouse. A PC mouse may have 2 or 3 buttons. These buttons enable the user to select in an application program. They are also used to move the mouse cursor on the screen. In order to produce a hgard copy of what the user has on the screen, a printer or a plotter has to be part of the system. Printers can be classified broadly into vector printing (drawing lines right away) or raster printing (the image is drawn as a set of dots. Pen plotters are an example for the first type, as examples for the second type dot matrix (impact), thermal laser, electrostatic and bubble jet are of the subject type. Printers (plotters) can be of the black/white or colour type. The resolution & speed of producing the hard copy (number of sheets printed per minute) varies function of the complexity of the contents of the printed material and the technology used with monitors (screens), the ability to obtain optimum speed and resolution at a minimum cost was the challenge. The 2 properties are function of the memory capacity of the computer. The different commercially available monitors can be classified into: vector tube (VDT), direct view storage tube monitor (DVSTM), raster scan monitor & display listing monitor. For lap (or palm) top units, liquid crystal display (LCD) technology is used. The LCD technologies, not necessarily all of them are used in laptop computers, are: twisted nematic, single polarizer guest host, dye phase change, supertwist, active matrix and ferroelectric. The computer responds to asynchronous events like keyboard presses, mouse movements, disk accesses, timer timeouts and communications using interrupts. In general, there are 3 types of interrupts:³ hardware (maskable or non-maskable), software and processor exceptions. Maskable means the interrupt can be enabled or disabled by the software. A processor executes instructions in a scheduled sequential manner until an interrupt request occurs. When this happens, the processor drops what it is doing and services the interrupt and then resumes sequential execution where it left off. Input/output devices electrially generate interrupts to get the attention of the processor. Computer operating system: The most common operating systems for a personal computers are DOS or Windows by Microsoft or any of the flavours (distros) of Linux (ubuntu, mandriva, opensuse, PClinux os, simplymepis). The main purpose or tasks of an O.S. is the organization and presentation of the different applications/user prepared files to the hardware i.e. the connecting link between the hardware and software/user. There is also another operating system that is used to give support to the Internet, named UNIX by AT&T. In
this level, we shall cover the DOS and in the next, we shall cover the Windows, in the next question a brief coverage of system programming, which includes DOS functions will be presented. In DOS version 6 and later, there are 92 commands, for the config.sys file (each file is named a string with maximum 8 characters - letters or numbers - and an extension of 3 characters maximum preceded by a dot) there are 15 commands and for the autoexec.bat file there are 9. Any file with .sys extension is a system command & tells DOS how to do something and what it has to do it with. The file config.sys is the most common in system configuration setup. The autoexec.bat commands are probably the most used in computer software. They are used in customizing the systems and software to meet specific requirements. While each software package may have 1 or more of these files, the most common user recognized batch file is the autoexec.bat. A word of caution: make a copy of the original config.sys & autoexec.bat files and save it on a floppy disk in case editing of these files results in problems that may cause improper operation of the system. The commands that are found in the config.sys files are: BREAK (enables or disables DOS to check for a cancel command, cancel command = control key-Ctrl pluc C or Break), BUFFERS (sets the number of DOS files or buffers for temporary storage), COUNTRY (sets the specific characters and formats to be displayed & printed that are pertinent to the country of origin, instead COUNTRY.SYS file is located in the root directory), DEVICE (loads the device driver, which is a short specific program, for keyboards, screens, drives and other devices), DEVICEHIGH (loads a device driver into high or reserved memory), DOS (located DOS to a higher memory or extended memory, there are three types oh memory: main, extended & expanded, making more room available for applications), DRIVPRAM (modifies block device parameter), FCB (file control blocks indicates the number of DOS files that can be opened concurrently), FILES (identifies the number of files that can be opened at any one time), INSTALL (loads terminate & stay resident - tsr - programs when the system is started), LASTDRIVE (identifies the last valid drive DOS recognizes in current configuration drives are designated by letters eg. A,B,C,D,E..), REMARK (places hidden,unexecutable, user defined statement), SHELL (identifies and locates a command processor other than the default which is COMMAND.COM), STACKS (allocates memory for temporary use during hardware interruptions which help preventing the system from crashing), SWITCHES (controls the functions of the keyboard). Next level will have AUTOEXEC.BAT + certain DOS commands. The commands that are found in the autoexec.bat files are: @ which means the suppression of on-screen displayof a batch command line, CALL executes a second batch command and then return control to the original, ECHO /switches the switches are either ON or OFF switches control whether the command line it precedes is displayed on the screen of the monitor, FOR (IN $ DO) allows a DOS command to be repeated, GOTO sends batch execution to a specific line followng the batch label and continues batch file execution from that point, IF conducts a test and if the test is true a specific command is executed, PAUSE it pauses the specificbatch command until a key is pressed to continue, REMARK displays a batch file message string (up to 123 characters), SHIFT shifts command line parameters one position to the left. The DOS command are many, only the common ones will be given here, for a full list the user may refer to the DOS manual. APPEND command it adds the specified drive & directory to the current path, ATTRIB displays & change file attributes eg. read-only/archive/system/hidden, BREAK sets or clears CTRL+C checking (determines whether CTRL+C can interrupt a program or not,
CD (CHDIR) displays the name of the current directory or changes the current directory to that given in the argument of the command, CLS clears the screen, COPY copies one or more files to another location, DATE displays or sets the date, DBLSPACE creates or configures DoubleSpace compressed drive, DEBUG runs Debug a program that enable assembly language program preparation, testing & editing, DEFRAG reorganizes files on disks to optimize performance (by contiguously packing all sectors of a file), DELTREE deletes a directory & all the subdirectories and files it contain, DIR displays a list of files & subdirectories in a directory, DOSKEY allows the user to edit command lines & prepare macros, ECHO displays messages or turns command echoing on or off, FASTHELP provides help information regarding the operating system commands, LABEL creates/changes/deletes the volume label of a disk, MD (MKDIR) creates a directory, MEM displays the amount of used and free memory in the system, MOVE moves files & renames files and directories, MSAV scans the computer for known viruses, MSBACKUP backs up or restores one or more files from one disk to another, MSD provides detailed technical information regarding the computer PATH displays or sets a search path for executable files, POWER reduces power used by the computer, PRINT prints a text file while other DOS commands are being used, PROMPT changes the operating system command prompt, REN (RENAME) renames a file or files, SYS copies the operating system files & commands to a disk, TIME displays or sets the time, TYPE displays the contents of a text file, UNDELETE restores files previously deleted (with the DEL command), VOL displays the disk volume label & serial number, if available, VSAFE monitors the PC for viruses and displays a warning when it finds one. The most commonly used opoerating system (with graphics interface) for PC is Windows by Microsoft. It simplifies the control on the PC by the user. The main elements that will appear on the screen are STARTUP (which when clicked gives a list of choices), a set of icons for the programs that are available from the computer. The important items in the STARTUP pushbutton on the screen that are used to manage and control the computer are SETTINGS & PROGRAMS. From the SETTINGS submenu item the user can access any of the following: CONTROL PANEL, PRINTERS & TASKBARS. From the PROGRAMS the user can access the WINDOWS EXPLORER program which offers full control on the hard drive as well as the floppy and the CD (compact disk drive). The other items found under the STARTUP button are DOCUMENTS, RUN, FIND, HELP and other items that may assist the user in openning a program file i.e. word processing, spread sheet or base. When the user chooses the CONTROL PANEL choice, a window will open with the following menu items: File, Edit, View & Help witha set of icons. The icons may have more or less the following names: Add new hardware, Add/remove programs, Date/time, Display, Find fast, Fonts, Modem, Internet, Keyboard, Mail & Fax, Modems, Mouse, Multimedia, Network, Passwords, Printers, Regional settings, Sounds and systems. The Printers choice will open a window with a menu similar to the Control Panel choice but with icons related to the printers connected to the system with one icon having Add printers as a description. When the user clicks one of the icons the following menu will appear in a new window: Printer, Document, View and Help; a table will also appear with the headings: Document name, Status, Owner, Progress, Started at. From the START pushbutton at the bottom of the screen, the user can get the choice SETTINGS, in which he can find the TASKBAR choice. When he selects it, he will get the following choices: Options, Start Menu Programs (in which the user can customize the display, appearance of the screen, when the START button is clicked including the
Programs). There are subchoices to the TASKBAR Customize Start Menu (Add, Remove, Advanced) & Clear Document. The Choice DOCUMENTS from the START will display the most recent documents opened by the user, irrelevant o the application program. When any of these documents is clicked, the appropriate application program will be opened then the document selected will be opened & displayed on the screen infront of the user. The RUN selection will display a dialog box where the user can select or type in the name of the executable file (with .exe extension) he wants to run. The Windows Explorer program gives the user full control on his PC.It will have: File,Edit ³ View,Tools,Help menu options + Icons (up one level, cut, copy, paste, undo copy, delete properties & details). Programming for Windows is an all or nothing proposition. If the programmer wants to use any part of Windows, he must make the commitment to write a full fledged Windows program. Everything in Windows is interconnected, MSDOS manage the file system, while Windows commands the video display, keyboard, mouse, printer, serial ports, memory management, program execution & scheduling. For further details regarding Windows the on line HELP included with the OS can be consulted. Computer software: Computer software can be system programming or application programs. System programming involves the interface between the user and the hardware (passing through the operating systems or using the operating system or basic input/output interrupts and functions). Application programs or programming are off the shelf programs that the user can use to perform certain tasks. Application programs can be classified broadly into educational or functional packages. The educational ones can teach the user new languages, how to use personal computers,..etc. and they are usually prompt or menu driven. The functional packages that operate under specific operating systems like DOS and Windows can be classified according to what are the main objectives or purposes of such packages, for example Word Processing application program or software package, Spread Sheet, base, Presentation, Desk Top Publishing, Drafting & Design, Engineering, Accounting, Inventory Control, Project Management, Geographic Information Systems/Facility Management, Games, etc... Macros and programming Languages (from within the program) can be used to customize the program for the specific needs of the user. To write a software application, system and application programming are used. The programs are usually written in one of the computer languages or a combination of languages, for example: Assembly, Quickbasic, Pascal, C-language, C++ (object oriented programming), Visual Basic, Visual C. Macros: A macro is a stored series of keystrokes, special keys and commands that can be played back. Macros are created by typing or recording them. Macro commands can be divided into the following categories: keyboard, screen, interactive, program flow, cell, file, command equivalents, DDE, user interface building,object, miscellaneous and analysis tools. The first category can be subdivided into 4 sub-catagories: movement keys, function keys, status keys and other and is responsible for the emulation action of the various keys on the keyboard.The The second is responsible for the display, the third will enable the user to create macros that display dialog boxes and pause for the user to enter from the keyboard, the fourth gives the person preparing the macro the ability to loop and branch in a macro, the fifth will affect the stored in specified cells, the sixth allows the
operation on in files other than the active ones, the seventh will allow the emulation of menu commands, the eighth (Dynamic Exchange) allows the communication with other Windows applications, the nineth allows the person preparing tme macro to change the appearance of the menu bar, the tenth allows the macro creator to create/move resize/select/change the properties of objects (blocks,notebooks,graphs,graph objects,dialog boxes objects, floating objects & applications), the eleventh allows the insertion of characters & commands in the macro in addition to a variety of other tasks and finally rhe twelveth allows the performance of numerical analyses. More in the next level. Macros are the heart of every application, they are the primary method, the user utilizes to pull all his application components together. Macros are used to display dialog boxes, to automate tasks, to duplicate keyboard & mouse actions, change the active menus, affect the screen display, select reposition resize objects, to prompt users for input. Planning before writing a macro may save a lot of time later. If the macro involves menu commands, step through them first, writing down each action involved. If it involves special macro commands, know exactly what the user has to enter as the command arguments after each macro command; its position can affect the macro's behaviour. Certain available application programs uses programming language like Visual Basic for application to customize the look and behaviour of such progrmas rather than macros. In either case the use of flow chart as part of the planning process can assist the programmer while entering the macro (by typing or recording) or writing the program. A flow chart is a diagram showing the actions & decisions a macro (or a program) steps through while running. Boxes in the chart contain an action the macro performs. Diamonds contain decisions the macro must make to determine the next step. Arrows show where to go after a step is completed. Arrows exiting a diamond have a decision listed next to them dictating the next step. Flow charts do not show actual macro (or programming language statements), they show the planning & logic behind a macro (a module or a program). The newsletters of the micro-computers (PC) Div., the programming (computer languages) section covers programming in details. Computer languages: Computer languages are code or statements or functions that control the operation of the personal computer and let it do what the user wants. These languages can broadly classified into procedural (for example Quickbasic) and object oriented (example C++). The basic tasks of any programming language can be summarized into: building loops and decision structures, defining & calling procedures (subroutines or functions), inputting/outputting to devices keyboard or monitor), inputting/outputing to files (on hard or floppy disks), manipulating and transforming strings (to & from the different structures), displaying graphics images and setting traps for events & errors (making software package more robust). For example in Quickbasic there are statements (approximately 280 of them), functions, keywords and metacommands. In Visaual Basic for applications which come with Microsoft Word or Excel or Access programs, there are statements (about 87), functions (about 156), methods (about 11), 17 operators, 13 types, 24 constants and 67 keywords. More information regarding computer languages can be found in The Series Of Teach Yourself On Diskettes, Computer Languages For Everyone. Limited details will be given in the next levels of this educational package. Procedural languages can be defined as a series of procedures that act upon . It is a set of specific instructions executed one after the other. The is quite separate from the
procedures. A derived type of programming called structured which means breaking down complex tasks into self contained smaller ones. The most commonly used type of programming languages is the object oriented programming (OOP). This type of programming is built on 4 principles: encapsulation, hiding, inheritance (reuse) and polymorphism. The property of being self-contained unit is called encapsulation, the encapsulated unit when is used without (necessarily) knowing how it works is called -hiding. The creation of (new) user-defined types (classes) offers the encapsulation & hiding properties to the program. A new type can be declared from an existing one (thus it is an extension of an existing object). It inherits the properties of the existing type (class) as well as additions to the new object can be made to modify its response and output. Polymorphism means the same name may take many forms but makes the right (expected) thing (through the choice of the right objects). The source code is a file written in one of the programming languages using the appropriate statements, techniques and syntax. This file is saved in an ASCII format. Most available development packages (programming software) have their own editing environment where the programmer can type/enter his source code and then saves the file. The next step would be to make the source code file an executable one, with which the computer can run it from its operating system. In order to achieve this goal, the source code file has to be compiled (the source code file remains as is, but two other files are created the one with .OBJ extension & the executable one with .EXE extension). The programmer can compile the source code file into an executable one at the operating system prompt (by inputting the appropriate command) or from the menu from within the development environment. Thus the compiler is a software that takes the high level language file and converts it into machine language. A library is a collection of linkable files that the programmer creates, are supplied by the compiler or are purchased separately. A function is a block of code that performs a service (adding 2 numbers together or printing a character to a screen). A class is a collection of and related functions. The programmer may use the linker to create a an operable program with libraries using the following steps: he/she prepares the source code file (written in high level language), compiles the source code file and finally links the files with .OBJ extension with the needed libraries to produce an operable program. In C++ language, the main files that are used to produce a program are: the header, methods and implementation. The methods file will refine the functions declared in the header file, the implementation one (having the main function in it) will use the header file (.H extension) & the methods file (.CPP extension) to get the required results from the program. For a short program, typically it will have the following components: list of header files, list of global variables & their types, the base class, the definition of the functions declared in the class and finally the main function (the entry point to the program. The main topics of C++ are: predefined & created classes, pointers & references, overloading functions & operators, creating objects at run time, arguments & return values, containers and templates. The main statements, keywords & functions in C++ language can be classified broadly into: prompts & user input,output to screen or file, control of program flow, looping iteration) of certain program instruction, operators & trigonometric functions, classes, specifiers, identifiers, pointers & references, constructors and operators. On the other hand, for the Quickbasic (which is a procedural language) the statements, functions and keywords can be classified broadly into: prompts & user input, output to screen or file, control of program flow, subroutines & programs
chaining, looping (iterations) operators. Examples to shhow the syntax of Quickbasic language: INPUT which allows input from keyboard, PRINT prints on screen, IF...THEN allows conditional execution based on the evaluation of the expression following IF. For the C++ language: cin allows input from the keyboard while the program is running, iostream.h (a header file) should be included in the source code file (# include <iostream.f>), cout outputs to the screen, same header file as cin should be include in the source code file, if allows conditional execution based on the evaluation of the expression following the if, switch...case allows conditional execution based on the evaluation of the expression after switch and performs the instructions following the applicable case statement, while repeats a block of statements while a condition a true.
Home page of VePi
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.