Saturday 28 April 2012

Number Types

There are different types of number in mathematics. Different types of numbers have many different uses. We can also classified them as sets.

Natural Number:
The first type of number is 'natural' numbers. It is also called counting number. These are:
 1, 2, 3, 4, 5, 6, ... 40,41 ...100,101 ......
The set of natural numbers, denoted N, can be defined in N ={1,2,3,4}

Whole Number:
Same as Natural Number. Here it is together with zero:
    0, 1, 2, 3, 4, 5, 6, ...
So if we include 0 with natural number then it is whole number.

Integers:
Then come the "integers", which are set of zero, the natural numbers, and the negatives of the naturals. It is written without fractional part. These are:
    ..., –6, –5, –4, –3, –2, –1, 0, 1, 2, 3, 4, 5, 6, ... 
So +8 or -8 both are integer but 8.23 is not integer. 8.23 is a fraction. The set of integers, denoted Z, is formally defined as follows: Z = {..., -3, -2, -1, 0, 1, 2, 3, ...}

Rational numbers: 
The rational number is ratio of two integer numbers. So it can be written in the p/q form, where p and q are integers and q is not equal to zero. By dividing one integer by another integer may form a fraction.  For example, 5/2=2.5 but 4/2=2 does not make fraction.
So fractions are rational number but remember that fractions should be terminated (ending) or repeating decimals. Such as 1/2=0.5(fraction is terminated), 1.58/2= 0.79(fraction is terminated), or 4/3=1.333333.....(Here fraction is repeating). All these numbers are example of fraction. 

Irrational numbers:
Irrational means not Rational. Some numbers cannot be written as a ratio of two integers and they are called irrational number. For example:
√2=1.4142135623730950....... (fraction is non-terminating) 
π = 3.1415926535897932384626433832795 (and more...) 
Here fraction is endless. The decimal expansion of an irrational number continues without repeating.

Real numbers:
Real number includes all the number: natural,integer,rational and irrational numbers. It is denoted by R.


Monday 23 April 2012

How to Convert from Decimal to Binary

The decimal number system has base 10 and binary number system has base 2. In study of computer science, we often need to convert a decimal number to a binary one. The following approach will teach how to convert a decimal number to a binary one.

The approach is simple. Take a decimal number 9 and now we will convert it to decimal.
Divide this number by 2 as it is the base of the binary numeral system. The remainder will always either be 0 or 1. Then keep this remainder and divide the quotient by 2. We will do this method until we reach the quotient as 0.

9 ÷ 2 = quotient 4 and remainder 1
4 ÷ 2 = quotient 2 and remainder 0
2 ÷ 2 = quotient 1 and remainder 0
1 ÷ 2 = quotient 0 and remainder 1  
Now start with the bottom remainder, read the sequence of remainders upwards to the top, we will get the binary number 1001. Here the last or bottom remainder is 1 as 1 ÷ 2 = quotient 0 and remainder 1 and top remainder is also 1 as 9 ÷ 2 = quotient 4 and remainder 1.

Take another decimal number 47 and its binary value is 101111. We will find it out now.
47 ÷ 2 =  quotient 23 and remainder  1
23 ÷ 2 =  quotient 11 and remainder  1 
11 ÷ 2 =  quotient 5 and remainder    1
5 ÷ 2  =  quotient 2 and remainder     1
2 ÷ 2  =  quotient 1 and remainder     0
1 ÷ 2 =   quotient 0 and remainder     1  
If start with the bottom remainder, read the sequence of remainders upwards to the top, we will get the binary number 101111.

Above we  have discussed about converting integer decimal into binary. What will we do in case of fractional number?  Suppose the number is .25 and how can we convert it into binary. We will do it in the following way:
First, we will multiply the fractional part by 2 and then keep the whole number part or the result. We will continue this approach until we reach to a full integer. So,
0.25  × 2 = 0.50  keep  0  (Here 0 is whole number part and .50 is fractional part)
0.50  × 2 = 1.0    keep  1  (Here 1 is whole number part and .0 is fractional part)
Now we will count it from top to bottom and we will get 01 as 0 is the top digit and 1 is the last digit.

So the binary of .25 is  0.01

Take another number  0.5625 and find its binary value.

0.5625  × 2 = 1.125  keep  1  (Here 1 is whole number part and .125 is fractional part)
0.125    × 2 = 0.25    keep  0
0.25      × 2 = 0.50    keep  0 
0.50      × 2 = 1.0      keep  1  

Start count from top to bottom  the binary number will be 0.1001


Friday 20 April 2012

Binary Number

In numeral system, Binary Number System is simplest. The base or the radix of the binary system is 2. So, there are two digits: 0 and 1. Gottfried Wilhelm Leibniz, the co-inventor of Calculus, first talked about binary number in the paper 'Essay d'une nouvelle science des nombres' in 1701.


As there are two symbols: 0 and 1, so , all the numbers are represented with this two symbols. Below table shows how decimal numbers are represented in binary system -

Binary 0 1 10 11 100 101 110 111 1000 1001 1010
Decimal 0 1 2 3 4 5 6 7 8 9 10

Suppose a binary number 1010 that is equivalent to 10 in decimal. The rightmost bit is called  Least Significant Bit (LSB) and the leftmost bit is called Most Significant Bit (MSB). Then 1 is MSB and 0 is LSB.

Fractions can also be represented in binary system. Suppose decimal 22.75 can be written in binary as (10110.11). Arithmetic in binary is much like arithmetic in other numeral systems. Addition, subtraction, multiplication, and division can be performed on binary numerals. There is a method of converting binary number in other number system.

The binary system is used internally by almost all modern computers and computer-based devices. Each digit is referred to as a bit. Computer memory comprises small elements that may only be in two states - off/on - that are associated with digits 0 and 1. Such an element is said to represent one bit - binary digit

Binary arithmetic

Addition:
Addition is done exactly like adding decimal numbers. Below is just rule in binary addition like decimal system. When 1 is added with 1, the result will be 0 and there will be an extra bit 1 that is called Carry. This carry will have to be added in the next column.

0+0 = 0
1+0 = 1
0+1 = 1
1+1 = 0, and you carry a 1. 
The two binary numbers (110)2=decimal 6 and (111)2=decimal 7 can be add in the following manner. The answer will be (1101)2 =decimal 13.
  110
+111
------------
 1101 

The above addition is for two positive numbers. But if it is the combination of positive and negative numbers then we have take other method. For example, when you handwrite a number that represent some physical quantity such as temperature, you can simply put a +  or - sign in front of the number to indicate that the number as positive or negative. Storing this value in computer is problematic.  To resolve this problem, it was decided that the most significant bit (MSB) will be reserved as sign data or bit.

To make computation easier with signed numbers, the magnitude of negative number is represented in a special form called 2's complement. It is formed by inverting each bit or digit and adding 1 to the result. Suppose in a 8 bit representation, the decimal number +5 can be written as 00000101 and decimal number -5 can be written as 10000101. Here we, at first, inverted 00000101(+5) and found 11111010. Then we add 1 with 11111010 and found 11111011(-5).  So addition of signed binary numbers can be done in following way -
0 0 0 0 1 1 0 1   (+13)
1 1 1 1 0 1 1 1   (-9) ( in 2's complement form )
----------------
0 0 0 0 0 1 0 0   (+4)

Subtraction:
Subtraction is same as decimal subtraction. When we subtract 1 from 0, the result will be 1 and we will hire 1 from next column. This hiring is called borrowing. Then the value of the next column becomes 0.
0 − 0 = 0
0 − 1 = 1, borrow 1
1 − 0 = 1
1 − 1 = 0
Here we subtract binary (1011)2=decimal 11 from binary (10101)2=decimal 21 and the result will be (1010)2=decimal 10. In that subtraction method, larger number should be top and smaller number should be in bottom.  
 1 0 1 0 1
-  1 0 1 1
 ----------
    1 0 1 0

Multiplication:
Multiplication in binary follows same rule that we use in decimal.
0 x 0 = 0
1 x 0 = 0
0 x 1 = 0
1 x 1 = 1, no carry and no borrow
Here, we will multiply binary (110)2=decimal 5 and (11)2=decimal 3. The result will be (10010)2=decimal 18.
          1 1 0
          x  1 1
     -------------
         1 1  0
      1 1 0
-- -------------
  1  0  0 1  0


Sunday 8 April 2012

What Is The Difference Beween Numerals and Number?

Number is a concept, it is a mathematical concept. To express the quantitative value of the object, this  is developed in ancient history. Suppose, a man has many cows. How can he know how many cows he has or is there any missing cow or less cow in his farm? The word 'number' is the way to figure it out and this way number is developed. It is an abstract concept.

On the other hand, the numeral is the way to write or to express this number. With the collection of notation, symbol or some marking letters --- the number is expressed. Suppose the farmer has 20 cows, so 20 is the number and we expressed this number by using the symbol '2' and '0'. This symbol '2' and '0' are the numerals. Because this symbol or notation helps us to write this number 20.

There are several numerals or numeral system in the world such as Hindu-Arabic numerals, Egyptians numerals, Roman numerals, Greek numerals, Mayan numerals, Western-Arabic numerals etc. Some other numerals are positional numerals such as Binary, Ternary, Decimal, Hexadecimal numerals etc.  

Example:
Suppose you have 3 white horses and 1 brown horse.
So in total 3+1=4 horses.
These 3,1,4 all are numbers and we represented this number in English language symbol or Western Arabic language. If we use Roman numerals it will be like below -
III + I = IV horses.
If we use positional numerals or base numerals 'Binary' where base is 2 which means only 2 symbols represent all the number then it will be like below -
11 + 01= 100 horses.
In binary system 11 represents 3 and 1 represents 1. 100 represents 4.

In this way numbers can be expressed in various way and it is called numerals.

What is Supercomputer?

 
A supercomputer is nothing but a big computer. Like our desktop or laptop computers, it has memory, processor, hard drive etc. but large in number. It consists of many processor and that's why it has high computational capacity.  Supercomputer is capable of processing enormous amount of data and it has high processing speed.

The history of super computer dates back to 1960. Seymour Cray, an American electrical engineer,  made the initiative to build a fastest computer at  Control Data Corporation (CDC) and in 1964, 'CDC 6600' was made. It was the flagship computer of supercomputer series by CDC.

Supercomputers are typically measured in FLOP (floating-point operations per second) instead of  MIPS(million instructions per second). Now a days, supercomputer performed at  some gigaflops or even in teraflops.

Basically the preferred supercomputer architecture today is called Parallel Computing, which means that we divide our problem up among a number of processors. Applications that use parallel processing are able to solve computational problems by simultaneously using multiple processors.

Supercomputers are very expensive and are employed for specialized scientific and engineering applications where it handles very large databases or do a great amount of computation. It is generally used in Quantum mechanics, Climate Research, Molecular Modeling, Simulation etc.

What Is The Difference Beween Numerals and Number?

Number is a concept, it is a mathematical concept. To express the quantitative value of the object, this  is developed in ancient history. S...