for Robot Artificial Inteligence

33. Algorithm

|

Computer Programming and program instructions

  • An Algorithm is a step by step procedure for solving a program and finding a programming solution is essentially a way of expressing algorithms.

  • An algorithms are systematic methodical approach in which a program is first clearly defined and a solution is expressed in terms of series of computational steps required and when implemented leads to the program solution.

  • AN algorithm is a collection of instructions to solve a problem and when these instructions are executed in a specific sequence will produce the correct result. the study of algorithm is at the heart of computer science.

  • we can express an algorithm with the help of pseudocode and flowcharts. we can have more have one algorithm for the same problem definition and thus we need to figure out the algorithm, best suitable for a particular problem in terms of execution speed and memory space required.

  • A program is an implementation of an algorithm to be run on a specific computer and operating system.

  • an algorithm is more abstract - it is not a machine specific and independent of any programming language.

  • the measure of performance /efficiency for any algorithm is assessed on two parameters

    • Time : algorithm should take minimum time to execute
    • Space : algorithm should use less memory.

Pseudocode

  • A pseudocode is a detailed but readable step by step description of what a computer program or algorithm must do

  • A pseudocode is a simple way of writing programming code in English. A pseudocode is not a actual program written in programming language which can be executed by a computer.

  • As the name suggest a pseudo code can be written in any language such as English language.

Flow chart

  • the Large programs with complex logic can be visually quite intimidating. sometimes it’s more effective to visualize the complex algorithms graphically than to express in form of program code. that is the essence of what flowcharts are meant for.

  • the flowcharts explain a program algorithm clearly through symbols and text. moreover, flowcharts give the gist of the program flow in a single glance. the flowchart make use of different shapes, each indicating specific program element.

Comment  Read more

32. Computer Programming

|

Computer Programming and program instructions

  • Information Technology(IT) is the science which is concerned with the technologies used to convert the data in to useful Information. information is a processed data that has been converted into a meaningful and useful texts.

  • A computer program is a set of statements written in a computer programming language which directs the computer hardware to perform specific tasks.

  • A computer program can be written in any programming language depending upon the purpose and type of the software being developed.

  • the programming languages are generally classified as high and low level language. the higher level programming language is human readable and the lower level programming laguange is machine readable

  • the high level languages are more human readable the low level languages provide least abstraction and therefore it is relatively difficult to read and write program in low level language such as assembly language.

  • the program execution speed is higher for programs written in low level language whereas the program written in high level language have relatively lower execution speed.

  • A computer program is written to solve a particular problem. for example program to add two numbers.

  • A computer program mainly deals with the program statements and data. each program statement commands the computer to perform a specific task such as arithmetic calculations, logical decisions or assigning values to program variables. A computer program may contain number of such statements which are executed in sequential order.

  • A computer program is a set of statements written using a programming language. Each programming language is based on a set of rules and principle. Each program statement must be written as per the language rules.

  • in computer science, the syntax of a programming language is the set of there rules that defines the combinations of symbols that are considered to be a correctly structed.

  • A computer program consist of number of program statements and each these statement corresponds to the specific instruction for the processor to perform specific task. each of these program statement is constructed by using programming language reserved keywords and symbols(such as (),{},[]). each programming language has a set of rules that define the correct order to construct a program statement. this set of rules is referred as programming language syntax.

  • the programming language syntax is enforced during program compilation stage. each program statement is verified by a compiler which is special program used to convert the high level program to low level program in binary that is directly executable by the CPU

  • A program must be syntactically correct else program will not be compiled and a programmer is constrained to make necessary corrections.

Comment  Read more

31.BIOS/CMOS configuration

|

BIOS/CMOS configuration setup

Comment  Read more

30. Computer system - BIOS

|

Introduction to Computer system - BIOS

  • the BIOS is a start up program. the main function of the BIOS program is to load the operating system into the system main memory RAM. this process is referred as computer system booting.

  • therefore the CPU’s first job is to locate and initiate the process of loading the operating system when system is switched on. this is done with the help of system utility program BIOS(Basic Input Output System)

  • the BIOS stands for Basic Input Output System which is a system software that is placed in a ROM chip(Read Only) on the computer system motherboard as a firmware.

  • the BIOS is the first start-up program executed by the CPU when computer system is switched on. the main job of the BIOS is to locate and load the operating system into the main memory RAM.

  • the operating system is an essential component of the computer system. the main purpose of the BIOS program is to provide the bare minimum essential resources(hardware check, initial set of drivers) to the CPU during computer system booting(starting) process till the main operating system is loaded and the system is read for other applications to run.

  • the BIOS is placed inside a ROM(Read Only Memory) chip as a firmware by the BIOS chip manufacture. the BIOS chip is also known as ROM BIOS. A firmware is a program that is tied to a specific hardware.

  • the BIOS software is hardwired in to the ROM chip and because of this, the contents of the BIOS chip cannot be easily modified OR fail

  • The BIOS chips can be easily spotted on the motherboard because they usually have “BIOS” written on them as part of a manufacture’s label.

  • the BIOS chip is usually inserted in a IC socket on the motherboard. the IC socket allows the replacement of faulty BIOS chip which can easily be removed and replaced with new BIOS chip.

  • the main function of the BIOS is to locate and load the operating system. during the booting process the BIOS needs information such as data, time and other information about user system settings preferences. this information provided by CMOS.

  • the CMOS(Complementary Metal-Oxide Semiconductor) and BIOS together handle an essential process of loading the operating system into the RAM. the BIOS and CMOS together set up and boot the computer system.

  • the primary functions of the BIOS is to handle the system booting and setup process. the BIOS also provides initial set of basic drivers which provides basic operational control to user during booting process. the CMOS is battery powered memory. the primary function of the CMOS is to store the BIOS configuration settings.

  • the BIOS performs following important functions during the computer system booting process

    1. to check power supply to the computer system.
    2. to check that essential internal components such as RAM and external peripheral devices are connected and working.
    3. to initiate the computer system booting sequence.
    4. to prove initial basic set of drivers.
    5. to locate the operation system and load into the RAM
    6. to handover the system control to the operating system once the OS is fully loaded and operational

  1. POST : the “Power on self test” tests the computer systems internal hardware for compatibility, connection and ensures that no errors exist before loading the operating systems. only after successful completion of the POST, the bootstrap loader routine on the BIOS chip is invoked to load the operating system. if the POST fails then the computer system will beep different beep codes. After successfully completing the POST, the BIOS then attempt to loads the operating system into the main system memory RAM. the OS is located either on the internal hard disk attached to the computer system or from bootable OS disk in the CD ROM drive. the BIOS will pass the control to the operating system once the it is fully loaded.

  2. Bootstrap Loader : locate the operating system. if a capable operating system is located then BIOS will load & pass control it.

  3. BIOS driver :
    • All the external devices attached to the computer system are driven by a special system software called device driver. the operating system communicates with the hardware devices through these drivers whenever application program sends any request to use the device. it is the device driver which is a special system software which actually interacts with the device and get required job done. each device must have a driver to operate the device.
    • during the computer system booting process when the operating system is still not loaded, it is the BIOS drivers which provides the initial set of drivers that give the computer basic operational control over your computer’s hardware.
    • however, the BIOS handover the control to the operating system once it is loaded.
    • the operating system has its own set of device drivers through which the operating system communicates with the devices attached to the computer system.
    • some device drivers are required to be installed separately.
    • after the operating system is loaded, more elaborate set drivers which are part of the operating system are loaded, which replace the bios basic routines. the BIOS also supports internal services such as the real-time clock
    • on start-up, the Bios tests the system and prepares the computer for operation based on the installed hardware and the configuration settings from the manufacturer and user.
  4. BIOS/CMOS setup :
    • configuration program that allows user to configure hardware settings including system settings such as computer passwords, time and date.
    • this configuration utility program can be accessed just before the booting process is initiated by the CPU by pressing specific key such as escape key or predefined function key depending upon the computer system.
    • the BIOS need to be configured when the new internal hardware components is added to the computer system.

  1. RTC CMOS

  • A real-time clock(RTC) is a battery-powered clock that is included in a microchip on a computer motherboard. this microchip is usually sperate from the microprocessor and other chips. the RTC is often simply referred to as “The CMOS”

  • A small memory on this microchip stores system description or setup values which includes current time values stored by the real-time clock.

  • when the computer is turned on, the BIOS that is stored in the computer’s read-only memory (ROM) microchip reads the current time from the memory in the chip with the real-time clock

  • the CMOS is also a computer chip on the motherboard, but more specifically, it is a RAM chip. this is a type of memory chip which stores information about the computer components and configuration settings for these components.

  • However, the normal RAM chips lose the information stored in them when power is disconnected once the system is switched off. in order to retain the information in the CMOS chip, a CMOS battery on the motherboard supplies constant power to the CMOS chip

Comment  Read more

29. Operating System Booting process

|

Operating System Management

  • the computer system needs operating system which functions as interface between computer hardware and user. OS provides operational convenience.

  • the booting process is a set of operations initiated by the computer system. the booting process starts when the system is powered on an initiates loading the operating system into the system memory(RAM). the booting process ends when operating system completely loaded into the RAM and operational.

  • the CPU activates the BIOS which initiates the system booting process.
  • the BIOS jumps(Goto) to MBR and loads the primary boot loader(Stage-1) and transfer the exectuion control.
  • the primary boot loader(stage-1) locates the loads the secondary boot loader program(stage 2)
  • the secondary boot loader(stage-2) loads the operating system components and kernel

Comment  Read more