Sunday, March 4, 2018

Computer Languages

Computer Languages

Programming language is used to communicate user with the computer give ideas, logics, thoughts etc. These are used to develop programs. These are classified as:

1.   Low Level Languages

2.   High Level Languages

Low Level Languages:
  1.   Machine / Binary Language: It is a first generation programming language. It is the language based on binary digits ( 0’s and 1’s ).
               

               a.   Advantages:

                           i.    Computer can understand directly.


               
                b.   Disadvantages:

i.    It is very difficult to remember the codes and address of memory locations.

ii.    User can’t modify the program.

iii.    User can’t debug the program.

iv.    It is machine dependent.

v.    It is suitable for simple applications.

2.   Assembly / Symbolic Language: It is a second generation programming language. This language based on symbolic codes (mnemonic) to represent any instruction.

a.   Advantages:


i.    User can remember the mnemonics.

ii.    It is easy to understand and develop the programs.

iii.    User can modify the program and debug.

iv.    It is suitable for simple applications.

b.   Disadvantages:

i.    It is machine dependent.

ii.    It requires the translator program called Assembler.

3.   High Level Language: It is a third generation programming language. It is based on English grammatical notations and mathematical formulae’s. these are classified as general and specific purpose language.

a.   Advantages:

i.    Easy to follow.

ii.    Easy to understand

iii.    Easy to modify and debug.

iv.    Suitable for complex applications.

b.   Disadvantages:

i.    It requires the translator program called Compiler or Interpreter.

ii.    It runs programs slower with compare to low level languages

Saturday, March 3, 2018

Computing Environments

Computing Environments

Personal Computing Environment

All of the computer hardware components are tied together in our personal

computer. A personal computer (PC) is a computer whose original sales price,

size, and capabilities make it useful for individuals, and intended to be operated

directly by an end user, with no intervening computer operator. People generally

relate this term with Microsoft’s Windows Operating system. Personal computers

generally run on Windows, Mac or some version of Linux operating system.


Desktop: Desktop computer is just another version of Personal Computer intended

for regular use from a single use. A computer that can be fit on a desk can also be

called as desktop.


Time-Sharing Environment

In the time-sharing environment, all computing must be done by the central computer. The central computer the shared resources, it manage the shared data and printing. Employees in large companies often work in what is known as time-


sharing environment. In the time sharing environment, many users are connected to one or more computers. These computers may be mini computers and central mainframes. In this environment the output devices, auxiliary storage devices are shared by all the users.

Client/Server Environment

Client/Server computing environment splits the computing function between a central computer and user’s computers. The users are given personal computers or work stations so that some of the computation responsibility can be moved from the central computer and assigned to the workstations. In the client/server environment the users micro computers or work stations are called the client. The central computer which may be a powerful micro computer, minicomputer or central mainframe system is known as server.

Distributed Computing Environment

A distributed computing environment provides a seamless integration of computing functions between different servers and clients. The internet provides connectivity to different servers throughout the world. This environment provides reliable, scalable and highly available network.

Friday, March 2, 2018

Block Diagram of Computer

Block Diagram of Computer

Block Diagram of Computer

Hardware: The physical components which are used to assemble computer system are known as hardware. Any computer device which we can touch including cables and wires is hardware.

Input Unit:

Computers need to receive data and instruction in order to solve any problem. Therefore we need to input the data and instructions into the computers. The input unit consists of one or more input devices. Keyboard is the one of the most commonly used input device. Other commonly used input devices are the mouse, floppy disk drive, magnetic tape, etc. All the input devices perform the following functions.

      Accept the data and instructions from the outside world.

      Convert it to a form that the computer can understand.

      Supply the converted data to the computer system for further processing.

Storage Unit:

The storage unit of the computer holds data and instructions that are entered through the input unit, before they are processed. It preserves the intermediate and final results before these are sent to the output devices. It also saves the data for the later use. The various storage devices of a computer system are divided into two categories.

1.   Primary Storage: Stores and provides very fast. This memory is generally used to hold the program being currently executed in the computer, the data being received from the input unit, the intermediate and final results of the program. The primary memory is temporary in nature. The data is lost, when the computer is switched off. In order to store the data permanently, the data has to be transferred to the secondary memory.

2.   The cost of the primary storage is more compared to the secondary storage. Therefore most computers have limited primary storage capacity. Secondary Storage: Secondary storage is used like an archive. It stores several programs, documents, data bases etc. The programs that you run on the computer are first transferred to the primary memory before it is actually run. Whenever the results are saved, again they get stored in the secondary memory. The secondary memory is slower and cheaper than the primary memory. Some of the commonly used secondary memory devices are Hard disk, CD, etc.,

Memory Size:

All digital computers use the binary system, i.e. 0’s and 1’s. Each character or a number is represented by an 8 bit code. The set of 8 bits is called a byte. A character occupies 1 byte space. A numeric occupies 2 byte space. Byte is the space occupied in the memory.




The size of the primary storage is specified in KB (Kilobytes) or MB (Megabyte). One KB is equal to 1024 bytes and one MB is equal to 1000KB. The size of the primary storage in a typical PC usually starts at 16MB. PCs having 32 MB, 48MB, 128 MB, 256MB memory are quite common.

Output Unit:

The output unit of a computer provides the information and results of a computation to outside world. Printers, Visual Display Unit (VDU) are the commonly used output devices. Other commonly used output devices are floppy disk drive, hard disk drive, and magnetic tape drive.

Arithmetic Logical Unit:

All calculations are performed in the Arithmetic Logic Unit (ALU) of the computer. It also does comparison and takes decision. The ALU can perform basic operations such as addition, subtraction, multiplication, division, etc and does logic operations viz, >,< , =, ‘etc. Whenever calculations are required, the control unit transfers the data from storage unit to ALU once the computations are done, the results are transferred to the storage unit by the control unit and then it is send to the output unit for displaying results.

Control Unit:

It controls all other units in the computer. The control unit instructs the input unit, where to store the data after receiving it from the user. It controls the flow of data and instructions from the storage unit to ALU. It also controls the flow of results from the ALU to the storage unit. The control unit is generally referred as the central nervous system of the computer that control and synchronizes its working.

Central Processing Unit:

The control unit and ALU of the computer are together known as the Central

Processing Unit (CPU). The CPU is like brain performs the following functions:

  It performs all calculations.

  It takes all decisions.

  It controls all units of the computer.

A PC may have CPU-IC such as Intel 8088, 80286, 80386, 80486, Celeron, Pentium, Pentium Pro, Pentium II, Pentium III, Pentium IV, Dual Core, and AMD etc.

Software

Software is a set of program or instructions given to the computer to carry out certain jobs or tasks. It is set of programs which actually makes the computer useful. The software can be classified into three categories




System Software: System software is responsible for managing a variety of independent hardware components, so that they can work together. Its purpose is to unburden the application software programmer from the often complex details of the particular computer being used, including such accessories as communications devices, printers, device readers, displays and keyboards, and also to partition the computer's resources such as memory and processor time in a safe and stable manner.

       Device drivers

       Operating systems

       Servers

       Utilities

       Window systems

Programming Software: Programming Software usually provides tools to assist a programmer in writing computer programs, and software using different programming languages in a more convenient way. The tools include:

      Compilers

      Debuggers

      Interpreters

      Linkers

      Text editors

Application Software: Application software is developed to aid in any task that benefits from computation. It is a broad category, and encompasses Software of many kinds, including the internet browser being used to display this page. This category includes:

      Business software

      Computer aided design

      Databases

      Decision making software

      Educational software

      Image editing

      Industrial automation

      Mathematical software

      Medical software

      Simulation

      Spreadsheets

      Telecommunications

      Video games

      Word processing




                 Applications of Computers

Computers applications are used worldwide in almost all fields.

1.   Science: scientists use computers to analyze large quantity of data to analyze the effect of earthquake on buildings dams, for satellite launching and remote controlling etc.

2.   Education: Computers are used in all educational institutions ranging from ordinary schools to universities for variety of purpose like training, e-learning, exams and results.

3.   Medicine and Health: The doctors and technicians use computer to diagnose the human problems and monitor them to provide treatment.

4.   Engineering/ Architecture / Manufacturing: They are used for planning, designing, and drawing the layouts.

5.   Entertainment: Computers used to listen the music, play the video games, graphics in movies.

6.   Communication: to send and receive mails, e-commerce, e-shopping, e-banking and e-learning.

7.   Business and Banking Applications: Computers are used in all commercial and business organizations.

8.   Government: Used for weather forecasting, in military, satellite launching and controlling, communication and e-governance.

Program To Convert Binary To Hexadecimal Number System.






/* C program to convert binary to hexadecimal number system */

#include <stdio.h>

#include <string.h>

int main()

{

int hexConstant[] = {0, 1, 10, 11, 100, 101, 110, 111, 1000,

1001, 1010, 1011, 1100, 1101, 1110, 1111};

long long binary, tempBinary;

char hex[20];

int index, i, digit;

/* Input binary number from user */

printf("Enter binary number: ");

scanf("%lld", &binary);

/* Copy binary number to temp variable */

tempBinary = binary;

index = 0;

/* Find hexadecimal of binary number */

while(tempBinary!=0)

{

/* Group binary to last four digits */

digit = tempBinary % 10000;

/* Find hexadecimal equivalent of last four digit */

for(i=0; i<16; i++)

{

if(hexConstant[i] == digit)

{

if(i<10)

{

/* 0-9 integer constant */

hex[index] = (char)(i + 48);

}

else

{

/* A-F character constant */

hex[index] = (char)((i-10) + 65);

}

index++;

break;

}

}

/* Remove the last 4 digits as it is processed */

tempBinary /= 10000;

}

hex[index] = '\0';

/* Reverse the hex digits */

strrev(hex);



printf("Binary number = %lld\n", binary);

printf("Hexadecimal number = %s", hex);

return 0;

}



Output
Program To Convert Binary To Hexadecimal Number System.

Thursday, March 1, 2018

Computer systems

Computer systems
A Computer is an electronic device which performs operations such as accepts data
as an input, store the data, manipulate or process the data and produce the result
as an output.
Main task performed by a computer
    •      Accept the data
    •      Process or manipulate the data
    •      Display or store the result in the form of human understanding
    •      Store the data, instructions and results.

Characteristics of Computers

Speed

You will be surprised to know that computer can perform millions (1,000,000) of instructions and even more per second. Therefore, we determine the speed of computer in terms of microsecond (10-6 part of a second) or nano-second (10-9 part of a second). From this you can imagine how fast your computer performs work.

Accuracy

Suppose someone calculates faster but commits a lot of errors in computing. Such result is useless. There is another aspect. Suppose you want to divide 15 by 7. You may work out up to 2 decimal places and say the dividend is 2.14. I may calculate up to 4 decimal places and say that the result is 2.1428. Someone else may go up to 9 decimal places and say the result is 2.142857143. Hence, in addition to speed, the computer should have accuracy or correctness in computing. The degree of accuracy of computer is very high and every calculation is performed with the same accuracy. The accuracy level is determined on the basis of design of computer. The errors in computer are due to human and inaccurate data.

Diligence

A computer is free from tiredness, lack of concentration, fatigue, etc. It can work for hours without creating any error. If millions of calculations are to be performed, a computer will perform every calculation with the same accuracy. Due to this capability it overpowers human being in routine type of work.

Versatility

It means the capacity to perform completely different type of work. You may use your computer to prepare payroll slips. Next moment you may use it for inventory management or to prepare electric bills.



Power of Remembering

Computer has the power of storing any amount of information or data. Any information can be stored and recalled as long as you require it, for any numbers of years. It depends entirely upon you how much data you want to store in a computer and when to lose or retrieve these data.

No IQ

Computer is a dumb machine and it cannot do any work without instruction from the user. It performs the instructions at tremendous speed and with accuracy. It is you to decide what you want to do and in what sequence. So a computer cannot take its own decision as you can.

No Feeling

It does not have feelings or emotion, taste, knowledge and experience. Thus it does not get tired even after long hours of work. It does not distinguish between users.

Storage

The Computer has an in-built memory where it can store a large amount of data. You can also store data in secondary storage devices such as floppies, which can be kept outside your computer and can be carried to other computers.

  Program To Convert Octal Number System To Binary Number System.




/* C program to convert Octal number system to Binary number system */

#include <stdio.h>

int main()

{

int OCTALVALUES[] = {0, 1, 10, 11, 100, 101, 110, 111};

long long octal, tempOctal, binary, place;

int rem;

/* Input Octal number from user */

printf("Enter any Octal number: ");

scanf("%lld", &octal);

tempOctal = octal;

binary = 0;

place  = 1;

while(tempOctal > 0)

{                                                                         /* Extract the last digit of octal */

rem = tempOctal % 10;

/* Get the binary equivalent of octal digit

* add it to the binary variable  */

binary = (OCTALVALUES[rem] * place) + binary;

/* Remove the last octal digit */

tempOctal /= 10;

/* Increase the place value */

place *= 1000;

}

printf("Octal number = %lld\n", octal);

printf("Binary number = %lld", binary);

return 0;

}

Output
  Program To Convert Octal Number System To Binary Number System.

“Shayad Wo Pyaar Nahi“- Yahya Bootwala ¦ Spill Poetry


Life Articles And News:

Life Articles And News: