Monday, 7 December 2015

Do you have any idea about father of computer?

Charles Babbage - The Father of Computers


WHO invented the first computer? And when?

Charles Babbage    The answer will surprise you: it was Charles Babbage, in the year 1832.
    Babbage, who was born in London in 1791, was a great mathematical genius. He was a natural inventor, and invented all sorts of new products.
    When he finished school, he went to study mathematics at Cambridge University. Later, he got a job teaching at the university ; and while Professor of Mathematics in this illustrious university, he designed his "first difference engine". This was, basically, a hand-operated mechanical calculator.
    He took nine years to build a part of the machine. This machine, which is in the London Science Museum, can make complex mathematical calculations. It is a basic mechanical computer.
    Babbage dreamed however of more complicated machines. In fact, he did not only dream; he began to design them. The result was a series of "analytical engines" which were in fact powerful computers!
    His designs contained processors (he called them "mills"), control units, a memory (he called it a store), and an input/output system. These are the four essential parts of a modern mathematical computer!
    Alas, Babbage was born 100 years too soon! His "second difference engine" could not use electricity, since this had not yet become a usable source of power; so Babbage had to make do with mechanical systems. For this reason, the machine was big and very complicated, and very expensive. Though Babbage produced complete plans for the machine, he could not build it. It was too sophisticated for its age!

    It was not until almost 160 years later that Babbage's "second difference engine" was finally manufactured. The first working version of this machine was built by the Science Museum in London, for the Babbagebicentenary in 1991. It can now be seen at the  Museum; a second machine was then built for an American high-tech millionnaire, who put it in the Computer History Museum, in Mountain View, California.
           Babbage's analytical engines would have used "programmes" like those used in the textile industry to make complicated patterns; but they were never built. This brilliant mathematician really was too far ahead of his time !

Why memory is needed ?

Memory is needed to store data and retrieve it when needed. Computers have two kind of memory, one is primary and another is secondary.
Secondary memory is commonly known as just storage. It's used to store files when they are not needed by the processors. The examples are HDD, SSD, USB Drives, SD Cards etc.

Primary memory is needed to execute any program. Your program when executed loads itself into primary memory. When program runs, it needs to work on variables, objects, data structure etc. to store data. For example if it needs to store value 10, it'll need an integer datatype while for storing text, it'll need a string data type. These data types stores these values into primary memory. Apart from that some programs needs to access files which are also gets loaded into primary memory for execution and then after releasing them, they go back with changes (if any) to secondary memory.

Primary memory example could be RAM, ROM, L1 & L2 Cache, Registers etc. Processor works as a primary memory too since they have limited storage too.

Now the question is why do we need Primary memory like RAM at all? Can't we just use Secondary memory for this?
We can, in fact we do. When RAM ran out of space to open new files, the OS uses Hard disks as primary memory by creating page files on that. If you have seen pageswap or page files in your system's hidden files then you have seen the proof.
Now why do we need it? We need processors to run the commands, however processors are really costly and they can not hold much data in them. Processors are really fast, but we need to store the data processors are not currently using, even in the running program. Caches are faster kind of memory which can be used by Processors very easily. However they are costly too (L1 is faster and costly than L2). Registers are next faster memory and RAM is the next fastest and the cheapest option.
RAMs can't hold the data, so we need a persistent data storage such as HDDs. HDD works on magnetic resonance principles and are really slow. However they are faster than Optical disks such as CDs and DVDs. SSDs are faster, but they still can't compete with RAMs. RAMs are electronic drives which can connect with Processors with ease.

Consider an example of slow moving traffic. If the fastest car is behind slow moving cars, it will move as fast as the slowest car in the lane. That's why the slowness of HDDs affect the Processors' execution speed. Thus we need RAM for this.

"Difference between human viruses and computer viruses"

Biological Viruses (or Human Viruses) are Nanotechnology by Nature while computer viruses are infectious agent by made by humans. Most often the people think Biological viruses and Computer viruses as a same entity, although both cause infection and damage to their host (or target) and some of their features & characteristics are same but they are quite different from each other. Following table enlists some interesting main difference between Biological Virus and Computer Viruses.
There are some differences i'm going to explain:

1. Living – non living:

Biological VirusBiological viruses are living (at least to some extent) biological entity who can reproduce itself
Computer VirusComputer viruses are non – living at all, they are manmade malicious computer coding which are programmed to perform specific functions

2. Host:

Biological VirusThey are living, thus infects living things. Biological Viruses can infect all form of life including Human, Animals, Plants, Insects, Bacteria, Protozoa, Fungi, Archae and other viruses (Yes, there are some viriophage exist)
Computer VirusThey are programmed, thus made impact on programs (softwares) Computer viruses infect mostly PCs, Servers, websites and software. Computer viruses mostly targets PCs with MS windows Operating system and rarely other Operating System.

3. History:

Biological VirusThe history of Biological virus’s evolution is dated back where the Life begins; they are as old as bacteria (about 2.5 billion year). The first written and proven case of viral infection is depicted on 3700 B.C old ancient painting which shows the case of poliomyelitis.
Computer VirusThe first computer virus was “Creepy” virus which is written (coded) in 1971 by Bob Thomas. This virus remotely spread and copied itself, just show the message “I am creepy, catch me if you can”.

4. Components:

Biological VirusAs a biological entity or living organism, Biological virus contain genetic material (in the form of RNA or DNA), covered by a coat of protein (called Capsid) and sometime by a lipid Envelop
Computer VirusA computer virus is not more than a few lines of code. It contains a script or code of programming language written in C, C++ or other assembly languages.
5. Mechanism of action:
Biological VirusBiological viruses infect their host after they enter the host body and reach inside the cell where the virus uses the host genetic material (DNA or RNA )to replicate and expend their population
Computer VirusComputer viruses, similarly infect computers when they enter and reach the registry (or the specific components/area for which they are programmed) where they cause the damage (usually hiding or disabling some files or functions) .

6. Types:

Biological VirusClassify by many ways, mostly by the body system which the biological virus infect. Their types include Neuroviruses, Enteroviruses, Rhino viruses, Respiratory viruses, etc.
Structurally their classification include RNA viruses and DNA viruses
Computer VirusClassify by the components or subsystem of the host which they infects. Their types includes, system viruses, Macro viruses (infect application e.g.MS Word, MS Outlook) and Boot sector viruses (which target Master Boot Record).
Programmatically their types include .exe viruses, .COM viruses or  a batch files (.bat) virus.

7. Hazards:

Biological VirusThey causes severe damage to the organ or system they involved which may be reversible (as in case of Hepatitis A, Flu) or lifelong irreversible (i.e. Poliomyelitis, Rabies or Hepatitis C viruses)
Computer VirusThey causes damage to the system or component of the PC which they infect and can result in burden on system memory, system crush and permanent lost of a document or a file or other data.

8. Benefits:

Biological VirusBiological viruses to some extent, are helpful and beneficial in the sense that they are being used in gene therapy to introduce therapeutic genetic material to the diseased cell (e.g. in case of cancer)
Computer VirusComputer viruses, till to date, has no any beneficial role. They always cause damage and lost to the system am data.

9. Prevention:

Biological VirusBiological viruses are preventable by getting vaccinated against them. Vaccines (or even some viruses) help our boy to develop immunity against the occurrence or re-occurrence of the same disease again.
Computer VirusWell, there is no such scenario in case of computer viruses, even with having a powerful Antivirus or fire wall on your system, your system may still got infected, as the developer continually write the malicious code and it across networks to get their job done.

10. Treatment:

Biological VirusBiological viruses can be treated to some extent with Antiviral drugs e.g. Acyclovir or you can get symptomatic treatment against them.
Computer VirusComputer viruses can be detect and remove with the help of Antivirus. But still it is unpredictable how much damage they can left or made to the system and some time you need to re-install the operating system

Monday, 23 November 2015

Syntax of if-function in excel

IF function:
The IF function is one of the most popular and useful functions in Excel. You use the IF function to ask Excel to test a condition and to return one value if the condition is met, and another value if the condition is not met.
Excel IF function - syntax:
The IF function is one of Excel's logical functions that evaluates a certain condition and returns the value you specify if the condition is TRUE, and another value if the condition is FALSE.
The syntax for Excel IF is as follows:
IF(logical_test, [value_if_true], [value_if_false])

Uses and working of excel

MICROSOFT EXCEL:
Microsoft Excel provides a grid interface to organize nearly any type of information.  The power of Excel lies in it's flexibility to define the layout and structure of the information you want to manage.  Basic tasks require no special training, and Excel allows you to work with text, numbers, and date information in a relatively open and unstructured way.  Nearly 30 years after it's initial introduction, Excel remains the worlds leading spreadsheet software.

This brief article provides an introduction to Microsoft Excel, major uses, and key features every Excel user should be aware of.

Major Uses for Excel

Excel is used widely in any financially-related activity.  The ability to create new spreadsheets where users can define custom formulas to calculate anything from a simple quarterly forecast to a full corporate annual report makes Excel highly appealing.  Excel is also used widely for common information organization and tracking like a list of sales leads, project status reports, contact lists, and invoicing.  Finally, Excel is a useful tool for scientific and statistical analysis with large data sets.  Excel's statistical formulas and graphing can help researches perform variance analysis, chi-square testing, and chart
complex data.

 How Excel Works

An Excel document is called a Workbook.  A workbook always has at least one Worksheet.  Workseets are the grid where you can store and calculate data.  You can have many worksheets stored inside a workbook, each with a unique worksheet name.

Worksheets are laid out in columns (vertical) and rows (horizontal).  The intersection of any given row and column is a cell.  Cells are really where you enter any information.  A cell will accept a large amount of text, or you can enter a date, number, or formula.  Each cell can be formatted individually with distinct border, background color, and font color/size/type. 

Parts of CPU

Components of CPU:

A typical CPU has a number of components. The first is the arithmetic logic unit (ALU), which performs simple arithmetic and logical operations. Second is the control unit (CU), which manages the various components of the computer. It reads and interprets instructions from memory and transforms them into a series of signals to activate other parts of the computer. The control unit calls upon the arithmetic logic unit to perform the necessary calculations.
Third is the cache, which serves as high-speed memory where instructions can be copied to and retrieved. Early CPUs consisted of many separate components, but since the 1970s, they have been constructed as a single integrated unit called a microprocessor. As such, a CPU is a specific type of microprocessor. The individual components of a CPU have become so integrated that you can't even recognize them from the outside. This CPU is about two inches by two inches in size.
Top-view of an Intel CPU - because it is a single integrated unit, the components are not visible from the outside
top-view of Intel CPU
Bottom-view of an Intel CPU - the gold plated pins provide the connections to the motherboard
bottom-view of Intel CPU
CPUs are located on the motherboard. Motherboards have a socket for this, which is specific for a certain type of processor. A CPU gets very hot and therefore needs its own cooling system in the form of a heat sink and/or fan.
CPU located on a motherboard with a heat sink and fan directly on top
CPU with heatsink and fan
The ALU is where the calculations occur, but how do these calculations actually get carried out? To a computer, the world consists of zeros and ones. Inside a processor, we can store zeros and ones usingtransistors. These are microscopic switches that control the flow of electricity depending on whether the switch is on or off. So the transistor contains binary information: a one if a current passes through and a zero if a current does not pass through.
Transistors are located on a very thin slice of silicon. A single silicon chip can contain thousands of transistors. A single CPU contains a large number of chips. Combined, these only cover about a square inch or so. In a modern CPU, however, that square inch can hold several hundred million transistors - the very latest high-end CPUs have over one billion! Calculations are performed by signals turning on or off different combinations of transistors. And more transistors means more calculations. You may be interested to know that the material silicon used in chips is what gave the Silicon Valley region of California its name.
Early CPUs were quite bulky and did not contain as many transistors as they do today. Chip manufacturers, such as Intel and AMD, have invested a lot of research into making everything smaller and fitting more transistors inside a single processor. So when there is a new generation of chips, it typically means they have come up with a smarter way to pack more processing power into a single CPU. The general name of the processor, such as Intel Pentium 4, Intel i7, AMD Athlon, and AMD 870, refers to the underlying architecture of the CPU. There are so many different ones that it can be hard to figure out what you really need in a new computer. The best way is to go with the latest processor type that falls within your budget.

real number system,ordering,rounding numbers

The Real Numbers

In higher standard we explored the real number system. This is a set of numbers that includes the integers or counting numbers, all the rational numbers (numbers that can be represented as a ratio of two whole numbers, such as 1/3 or 3/7) and the irrational numbers (numbers that cannot be represented as a ratio of two whole numbers, such as π, e, and sqrt(2)).
You learned about combining numbers using basic operations like addition (+), subtraction (-), multiplication (× or *) and division (/). You have also been introduced to several other mathematical functions including: exponentiation (^) -- raising something to a power -- and square root (). You may even remember some of the properties that real numbers obey:
Closure
If you operated on any two real numbers A and B with +, -, ×, or /, you get a real number.
Commutativity
A + B = B + A and A × B = B × A
Associativity
(A + B) + C = A + (B + C) and (A × B) × C = A × (B × C)
Inverse
A + -A = 0, A × (1/A) = 1
Identity
A + 0 = A, A × 1 = A
Distributivity
A × (B + C) = (A × B) + (A × C)
These properties are useful to review and keep in mind because they help you simplify more complex calculations.

Order of Operations

In chemistry, as in the other sciences, we will encounter many problems in which the solution involves a series of calculations. When doing more than one operation we need follow a set of rules regarding which calculations to do first. For example, what is the "right" answer to
3 + 2 × 6 = ?
Should we go "left to right" and just do the + first and get 30, or do we do the × first and get 15? Well, in order to avoid confusion and get the correct answer, mathematicians decided long ago that all calculations should be done in the same order. You may have learned the order of operations as being: Please Excuse My Dear Aunt Sally! where the words stand forParentheses, Exponentiation, Multiplication or Division, Addition or Subtraction.
So what is the correct answer for our problem? The order of operations would say that in the absence of parentheses, you would multiply 2×6 first, then add 3, so the result should be 15.

Rounding Numbers

Another issue we need to deal with when we perform operations is how to state the answer. For example, if we are dividing a 20 centimeter wire into 3 equal pieces, we would divide 20 by 3 to get the length of each piece. If we took the time to work this division out by hand -- ack! -- we would get
20 / 3 = 6.666666666666666666.........
The 6 repeats forever. How do we report this number? We round to some usually pre-determined number of digits or decimal places. By "digits" we mean the total number of numbers both left and right of the decimal point. By "decimal places" we specifically refer to the number of numbers to the right of the decimal point.
For comparison, let's try rounding this number to 2 decimal places -- two numbers to the right of the point. To round, look at the digit after the one of interest -- in this case the third decimal place -- and use the rule:
if the digit is 0, 1, 2, 3 or 4 round down
if the digit is 5, 6, 7, 8 or 9 round up
In our example:
6.666666666666.....
    ^              
the next digit is 6 so we round up,
giving 6.67 as the desired answer. If instead we had been asked to round the number 20/3 to 2 digits the answer would have been 6.7 (two digits, one of which is a "decimal place").
Sometimes rounding is the result of an approximation. If you had 101 or 98 meters of some wire, in each case you would have "about 100 meters."
We will round many of our answers in science because the numbers will often be reporting measurements. Numbers representing measurements are only as accurate as the device used for measuring. For example, we could use a standard meter stick marked off in centimeters to measure the length of a wire as 15 cm. If sometime later we cut the wire in pieces, reporting the size of a piece of the wire to nine or ten decimal places would not make sense. You may encounter instructions in labs or in problem sets or on exams which ask you to round a measurement or result to the "nearest cm" or "nearest mL" or "nearest second". We'll look more at these accuracy issues in the section "Numbers in Science."
One other operation which you may or may not be familiar with is often used in chemistry is absolute value . The "absolute value" of a number is sometimes used instead of the number itself. Absolute value is represented as a pair of upright lines around whatever expression or number is supposed to be treated that way. The absolute value of a number expresses its distance from zero, regardless of sign. So, the absolute value of -20 is 20, and the absolute value of 19 is 19. Basically, all numbers become positive but do not change value. Most calculators will take an absolute value, usually called abs().