Number System In Computer Science
Introduction
When Humans
are speaking to one another, they speak in a particular language. The language
is basically a group of words and letters. Although we type words and letters
in computer system, the computer doesn’t understand the words and letters.
Rather, those words and letters are translated into numbers. Computers “talk”
and understand in numbers. As a computer programmer or an IT professional you
need to understand the four most common number systems that are frequently used
in computer. Those Number systems are
·
Binary
·
Octal
·
Decimal
·
Hexadecimal
If you gain
an idea of the number system, you’ll understand the following topics in
computer science:
I.
You’ll
understand how to calculate network addresses.
II.
How
to read memory address locations in core dumps.
III.
Understand
the color definition in application and web programming
IV.
Other
concepts related to number systems.
A number
system is defined as a set of value to show different quantities. The number
systems are useful for the computer students because it’s used in computer
field. Number systems are basically used to calculate the long term
calculations under the required base. This system is also used to solve the
long terms in Boolean algebra easy way.
There Are
Two types of Number System:
1.
Non-Positional
Number system
2.
Positional
Number System
Non-Positional Number System:
In this type of number system,
symbols are used to identify different numbers such as I for 1, II for 2 , III for 3 and so on. Each symbol shows the same
position regardless to its position in the system. The symbols are simply added to exact value
of particular number. But by using this number system, we have to face
different and difficult to perform arithmetic with such a number system.
Positional Number System:
In this type of number system,
suitable symbols are used to identify the numbers that are called as a digit.
These symbols are represented the different values depending upon the position
of the numbers that occupy on the definite system.
The value of
each digit is determined by the digit itself, the position of the digit in the
number and the base of the system.
BASE (Radix) :
The total number of the system is
equal to the base of the system. The maximum value of the single digit is
always equal to the one less value of the base. In the numbers system the show
the number of symbols used in the system. In the past, different civilizations
were using different radixes. The Egyptian used the radix 2, Babylonians used
the radix 60 and mayans are used 18 and 20 as a radix. The base of a number system is indicated by a
subscript and this will be followed by the value of the numbers.
Example:
(123)2 (564)8
(54454)10 (A41B)16
Numbers System Used In Computer:
The above both are those basic types
of number system. Now, we discuss the additional four types of number system.
Numbers
system that are used by the computers are describe follow:-
1.
Decimal
Number System
2.
Binary
Number System
3.
Octal
Number System
4.
Hexadecimal
Number System
Decimal Number System:
The number System that has the base
of 8 is called Decimal Number system. Base
10 Mean it has 8 Numbers from 0 to
9 i.e (0,1,2,3,4,5,6,7,8,9). It’s
because we know that the maximum value of the single digit in one less value of
the base. The numbers in decimal system can be written with the combination of
the 0 to 9 numbers. It doesn’t have
number 10.
Example:
(2689)10 , (786)10 etc.
Octal Number System:
The number system that has the base
of Number 8 is called Octal Number
System. Octal Number System Has only 8 digits form 0 to 7, that is (0,1,2,3,4,5,6,7). The Number that is
written with the combination of
(0,1,2,3,4,5,6,7) is called octal Numbering system sub as 123,, 458,254,
is octal number and 1258 is not an octal number because 8 is not the part of
Octal Number system Digit. Octal Number is identify by its radix or base.
Example:
(123)8 ,
(142)8, ( 142 )8 , (451)8
Hexadecimal Number System:
The number system that has the base
of number 16 is called Hexadecimal
Number system. Hexadecimal Number system has 16-digits (0,1,2,3,4,5,67,8,9,A,B,C,D,E,F) . Hexadecimal Number system
is identify with the base sixteen (16) . the number that is written with the
combination of (0,1,2,3,4,5,67,8,9,A,B,C,D,E,F) numbers is known as hexadecimal number system such as
125AB, A15B25c etc.
12BCHE is
not an hexadecimal number system because HE is not the part of that 16 digits.
Example:
(A258)16 , (1257B)16 , (BCF1435)16 , (1258 )16
Binary Number System:
The Number system that has the base
of Number 2 is called Binary Number
system. Binary number system has only two digits that are 0 and 1. The Number that
is written with the combination of 0’s
and 1’s is called Binary Number. Like 1100,0101,100110011,
etc.
Example:
(11001)2 ,
(1110001)2 , (101)2 , (1010101)2
Bit:
Bit stands for binary digit.
Basically the computer system language bit means either 0 or 1. A binary number system consisting of n bits is called an
n-bit number.
Applications of Binary Numbers:
Mo Mostly digital computer used the
binary number system(base 2), for represent the data and perform arithmetic
calculation. The binary number is very efficient for computer. Computer system
used these binary numbers for calculation or other function. Basically it’s the
native language 0’s and 1’s of the computer system. Computer only understand
and work with just 0’s and 1’s . 0 mean off and 1’s mean on. Computer work with
the long streams of these numbers.
Binary Operations:
There
are four binary operation:
·
Addition
·
Subtraction
·
Multiplication
·
Division
Binary Addition:
For
adding the binary
operation we’ve to know about the rules that describe that how to add binary
numbers.
The
following table will help in understanding that how to calculate the numbers:
A+B
|
X
|
0+0
|
0
|
0+1
|
1
|
1+0
|
1
|
1+1
|
10
|
Example:
(1101)2
(1001)2
(10110)2
(1001)2
(0001)2
(1010)2
Subtraction of Binary Numbers:
Subtraction of binary number can be done
through the table given below:
A-B
|
X
|
0-0
|
0
|
0-1
|
1
|
1-0
|
1
|
1-1
|
0
|
Examples:
(1101)2
(1001)2
(0100)2
(1001)2
(0001)2
(1000)2
Multiplication of Binary Number:
Multiplication of binary Number can
be done by learning the following table.
A*B
|
X
|
0*0
|
0
|
0*1
|
0
|
1*0
|
0
|
1*1
|
1
|
Note: multiplication is nothing but
repeated addition.
Division of Binary Numbers
0/1
|
0
|
1/1
|
1
|
Example:
11001/101 ?
101
101 11001
101
101
101
*
No comments:
Post a Comment