You are on page 1of 13

Department of Computer

Science & Application


COMPUTER NUMBER SYSTEM

ANIL KUMAR PRAJAPATI


What is Number System

 A number system is a system representing numbers. It is also called the system


of numeration and it defines a set of values to represent a quantity. These
numbers are used as digits and the most common ones are 0 and 1, that are used
to represent binary numbers. Digits from 0 to 9 are used to represent other types
of number systems.
Types of Number Systems

 There are different types of number systems in which the four main types are:

Binary number system 


(Base - 2) like that (110101)2 
Octal number system 
(Base - 8) like that (826)8
Hexadecimal number system 
(Base - 16) like that (27FBE)16
Decimal number system 
(Base - 10) like that (102345)10
Binary Number System

 The binary number system uses only two digits: 0 and 1. The numbers in this system have a 
base of 2. The binary system is applied internally by almost all latest computers and computer-
based devices because of its direct implementation in electronic circuits using logic gates.
Every digit is referred to as a bit.  binary number, the rightmost digit is called least significant
bit (LSB) and leftmost digit is called most significant bit (MSB). The binary number are

represent like (110101)2 


1 1 0 0 1 1
MSB LSB
Binary Number System

 Binary number system conversion into decimal And decimal equivalent of this
number is sum of product of each digit with its positional value.
 Binary to Decimal conversation

1100102  = 1×25 + 1×24 + 0×23 + 0×22 + 1×21 + 0×20


= 32+16 + 0 + 0 + 2 + 0
= 5010
Decimal to Binary Conversion

 To convert Decimal to binary numbers, the following steps should be followed:-

 1. Take any decimal number and divide it by “2". After dividing, you will get some results along with the remainder.

 2. If the decimal number chosen by you is even, then the result will be in a whole number and it will give the remainder 0.

 3. If the decimal number chosen by you is odd, then the number will not be divided fully and you will get the remainder “1”.

 4. Continue dividing the number till you get the quotient  0

 5. Now place all the remainders in the series of Least Significant Bit (LSB) at the top and the Most Significant bit (MSB) at the

bottom.
Decimal to Binary Conversion Example

 Let us Convert the Decimal Number 75 into a Binary Number.

Division of Decimal
Quotient Remainder Binary
Number by 2

75/2 37 1 (LSB) 1
37/2 18 1 1
18/2 9 0 0
9/2 4 1 1
4/2 2 0 0
2/2 1 0 0
1/2 0 1 (LSB) 1
Octal Number System

 Octal number system has eight digits – 0, 1, 2, 3, 4, 5, 6 and 7. Octal number


system is also a positional value system with where each digit has its value
expressed in powers of 8, For example: 458, 538, 2418 are some examples of
numbers in the octal number system. as shown here − (Octal to Decimal)
3268  = 3×82 + 2×81 + 6×80

= 192 + 16 + 6

= 21410
Decimal to Octal Conversion

1. Take the decimal number as dividend.


2. Divide the number by 8 (as 8 is the base of octal so divisor here).
3. Preserve the remainder in an array (and it will be: 0, 1, 2, 3, 4, 5, 6 or 7 because of the divisor 8).
4. Repeat the above two steps until the amount is bigger than zero.
5. Print the mentioned array in the reverse order.

Let us Convert the Decimal Number 210 into a Octal Number. (Therefore, 21010 = 32216)
Division Remainder (R)

210 / 8 = 26 2

26 / 8 = 3 2

3/8=0 3
Hexadecimal Number System

 The hexadecimal number system uses sixteen digits/alphabets: 0,1,2,3,4,5,6,7,8,9 and


A,B,C,D,E,F with the base number as 16. Here, A-F of the hexadecimal system means
the numbers 10-15 of the decimal number system respectively. This system is used in
computers to reduce the large-sized strings of the binary system. For example: 7A316,
6E16, 4C2A16 are some examples of numbers in the hexadecimal number system.
(Hexadecimal to Decimal )
17FB16  = 1×163 + 7×162 + 15×161 + 10×160

= 4096 + 1792 + 240 +10

= 613810
Decimal to Hexadecimal Conversion

1. Take the decimal number as dividend.


2. Divide the number by 16 (as 16 is the base of octal so divisor here).
3. Preserve the remainder in an array
(and it will be: 0, 1, 2, 3, 4, 5, 6 , 7, 8, 9, A, B, C, D, E, F because of the divisor 16).
4. Repeat the above two steps until the amount is bigger than zero.
5. Print the mentioned array in the reverse order.

Let us Convert the Decimal Number 210 into a Octal Number. ( Therefore, 60010 = 25816)
Divide by 16 Quotient Remainder Hex Value

600/ 16 37 8 8

37/ 16 2 5 5

2/ 16 0 2 2
Decimal Number System

 Decimal number system is a base 10 number system having 10 digits from 0 to 9. This means
that any numerical quantity can be represented using these 10 digits. Decimal number system
is also a positional value system. This means that the value of digits will depend on its
position. Let us take an example to understand this.

123410  = 1×103 + 2×102 + 3×101 + 4×100

= 1000 + 200 + 30 + 4

= 123410
You
ha n k
T Regards:
Anil Kumar Prajapati

You might also like