Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
15 views14 pages

Number System - Notes

The document provides an overview of number systems used in digital electronics, focusing on decimal, binary, octal, and hexadecimal systems. It explains the representation of numbers in these systems, including methods for converting between them, such as binary to decimal and decimal to binary conversions. Additionally, it covers the positional value of digits and includes exercises for practice.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views14 pages

Number System - Notes

The document provides an overview of number systems used in digital electronics, focusing on decimal, binary, octal, and hexadecimal systems. It explains the representation of numbers in these systems, including methods for converting between them, such as binary to decimal and decimal to binary conversions. Additionally, it covers the positional value of digits and includes exercises for practice.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Number Systems

Number Systems
Number systems play an important role in digital electronics. In digital systems like
Computers the quantities are represented by symbols called digits. So many number systems are
used in digital technology that represent the digits in various forms. The most common are decimal,
binary, octal and hexadecimal number system.

1) Decimal Number System:-


It is the most familiar number system. It has 10 distinct symbols called as digits. These
10 symbols are 0,1,2,3,4,5,6,7,8,9. So any number expressed in decimal number system is the
combination of one or more digits. For example, the number 128 contains three digits 1, 2 and 8. So
when we have to represent any number greater than 9, we make the combinations of the basic
digits. Since the decimal number system contains 10 basic symbols or digits, it has a base of 10.

The decimal system is a positional value system in which every digit has its position in
the number. The digit at the right most side, is the LSD (least significant digit) It is having weight
zero since it is at unit’s position. Thus, in any decimal number, position of digit is called as its
weight.
For example, the decimal number 2345 can be represented as:
2345  2  103  3102  4 101  5 100.
Thus the number 5 is the LSD and the number 2 is the MSD in decimal 2345. So the digit which is
at the left most position is called as MSD (most significant digit).
Consider another example, 35.78 . This number can be represented as:
35.78  3101  5100  7 101  8102
Here the decimal point separates the integer part and the fraction part.
Thus, in general any decimal number is simply the sum of products of each digit value
and its positional value.

For example,
The number 2 4 5 1 3 . 1 9 7 can be represented in positional values as:
 104 103 102 101 100 101 102 105 
2 | 4 | 5 | 1 | 3 | 1 | 9 | 7
.

decimal po int
Figure: Positional values in decimal no.

2) Binary number System:-


In binary number system there are only two possible states or symbols i.e. 0 & 1.
Binary number system are used in digit system e.g. a switch: it has two states either open or closed.
So if switch is open it has the state 0 and when switch is closed it has state 1.
Every binary number is a combination of 0’s and 1’s. The binary digits 0 & 1 are also
called as bits (Short from of binary digits)

Binary weight:-
Every bit in a binary has its weight depending on its position in the number It is called
as the binary weight. It is started with 20 ie from least significant digit. If the binary number is having
binary point, the digits on right hand side of the binary point are started with 2 -1. Since, there are
only two states in the binary system it has the base of 2.
For e.g. a binary number 100101 may be represented as
100101  1 25  0  24  0  23  1 22  0  21  1 20
Consider another e.g. which contains binary point
101.011  1 22  0  21  1 20  0  21  1 22  1 23

Conversions from one number system to another :


We can convert a number from one number system to another. That is, we are
changing the base of that number from one number system to another. Here we convert a binary
number into decimal number and also a decimal number into an equivalent binary number.

Binary to decimal conversion


In this type of conversion a number having base 2 is converted into equivalent number
having base 10. For this we have to find out the corresponding binary weights of each digit in a
number. Following method is used for converting binary number into decimal number.

Streamlined Method:_

To convert a binary number into equivalent decimal number, we use this method by
following procedure:

1. Write the binary number.


2. Directly under the binary number, write corresponding binary weights depending upon the
positions.
3. Now write the value of each binary weight below the number.
4. Cross out the weights if the binary digit is zero.
5. Add the remaining weights to obtain the decimal equivalent.

Binary Integer :

For e.g. to convert a binary number 1011 to its decimal equivalent, we apply
streamlined method as :
Step 1: 1 0 1 1
Step 2 : 1 0 1 1
23 22 21 20

Step 3 : 1 0 1 1
8 4 2 1

Step 4 : 1 0 1 1
8 4 2 1

Step 5 : 1 0 1 1
8  2 1
 11
So (1011) 2  (11)10 .
That is the binary number 1011 has the decimal equivalent as 11.

Fractions:
We have converted binary integers that is, whole numbers. Now the question arises, how
the binary fractions are converted into corresponding decimal equivalent. In this case we use the
binary weights of fractional part starting from.
1 1 1
Values are , , and so on.
2 4 8

For e.g. A Binary fraction 0.101 has a decimal equivalent as.

Step 1  0.1 0 1

Step 2  0.1 0 1
21 22 23

Step 3  0. 1 0 1
1 1 1
2 4 8
Step 4  0. 1 0 1
1 1 1
2 4 8

Step 5  0. 1 0 1
1 1

2 8
 0.5  .125
 .625
 (0.101) 2  (0.625)10
Mixed Binary no.s:
For mixed numbers (numbers with an integer and a fractional part, handle each part
according to the rules first developed. The weights for a mixed number are.
23 22 21 20 0 21 22 23 etc

binary po int .
For e.g. to convert binary number 110.001 to a decimal
1 1 0 .0 0 1
1
Step 1 2 2 1
2 2 0
2 22 23

1 1 1
Step 2 4 2 1
2 4 8
number.

1 1 1
Step 3 42  1  
2 4 8

Step 4 6.125

Exercise:
Convert the following binary numbers into equivalent decimal no.

a) 10110.011

b) 1010011.1001

c) 1101101.10101
Decimal to binary Conversion:
The following table shows the binary values for first 15 decimal numbers:

Decimal Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111

This chart shows the conversion from decimal to binary upto 15 numbers. But if the number
is greater that 15, how to convert a decimal number into equivalent binary number.

Double Dabble Method :


This method is used to convert a decimal number into equivalent binary number. It proceeds
in following steps.

Step 1 : Take the decimal number

Step 2: Divide the number by 2. Write remainder at right side

Step 3: Now take quotient as a decimal number and divide it by 2. Again write the remainder on
right side.

Step 4: Continue step 3 until the quotient is zero.

Step 5: Take the sequence of remainders in reverse order i.e. from down to upward.

This is nothing but equivalent binary number of the given decimal number. e.g. to convert a decimal
number 13 into equivalent binary number, we apply double dabble method as:
Step 1  13 quotient remainder

13
Step 2  6 1
2

6
Step 3  3 0
2

3
Step 4  1 1
2

1
Step 5  0 1
2
So (13)10  (1101) 2 upward

Fractions:

For converting Fractions following steps are to be followed:

Multiply the fraction by 2 and record a carry in the integer position. Now take the multiplication as
next fraction and repeat the same process. Continue this way for 6 multiplications or till we get 0 on
the fraction side. Take the sequence of carries in forward direction.

e.g. to convert a decimal fraction 0.85 into equivalent binary fraction:

0.85  2  1.7  0.7 with carry 1


0.7  2  1.4  0.4 with carry 1
0.4  2  0.8  0.8 with carry 0
0.8  2  1.6  0.6 with carry 1
0.6  2  1.2  0.2 with carry 1
0.2  2  0.4  0.4 with carry 0
So (0.85)10  (110110) 2

Exercise:

1. Convert the following decimal numbers into equivalent binary numbers:


a) 23.16
b) 40.65
c) 56.17

2. Convert the following binary numbers into equivalent decimal numbers:


a) 1101.111
b) 110110.1110
c) 1101011.1001
3) Octal Number System:

The base of the number system equals the number of digits it uses. The decimal number system
has a base 10, because it uses 10 digits 0 to 9. The binary number system has a base 2 since it
has two digits or 1.
The octal number system has a base 8. It uses the digits: numbers are combinations of 0 to
7. Consider the following table which shows the octal, binary & decimal numbers for 15 Numbers.

Decimal Binary Octal


0 0000 000
1 0001 001
2 0010 002
3 0011 003
4 0100 004
5 0101 005
6 0110 006
7 0111 007
8 1000 010
9 1001 011
10 1010 012
11 1011 013
12 1100 014
13 1101 015
14 1110 016
15 1111 017

Octal to Decimal Conversion:


In Octal number system each digit position corresponds to a power of 8 follows:
etc 8 8 8 80 . 81 82 83 etc
3 2 1

 Octal po int
So to convert an octal number into decimal, multiply each octal digit by its weight and add the
resulting products.
For e.g. to convert an octal number 23 into equivalent decimal number,

The steps are:

Step :1 2 3

Step : 2 2 3
2(81) 3(80)

Step : 3 16 + 3 = 19

So (23)8 = (19)10
Decimal to Octal Conversion:
To convert a decimal number into octal equivalent, we use octal dabble method which is
similar to double dabble method.

Instead of dividing by 2, we divide by 8 writing down the remainder after each division.
The remainders are taken in reverse order to form the equivalent octal number.

Integers :

For example, to convert the decimal number 175 into equivalent octal number.
We use the procedure as:
Step1: 175 quotient remainder

175
Step 2 : 21 7
8

21
Step 3 : 2 5
8

2
Step 4 : 0 2
8
So (175)10  (257)8

Fractions:

With decimal fractions, multiply instead of divide by writing the carry into the integer
position. The carries read downward to form the equivalent octal fraction.

For example, to convert the decimal number 0.23 into an equivalent octal:

Step 1) 0.23  8  1.84 0.84 1


Step 2) 0.84  8  6.72 0.72 6
Step 3) 0.72  8  5.76 0.76 5
So (0.23)10  (0.165)8

Exercise:
1) Convert the following octal numbers into decimal equivalents.
a) 237.35
b) 136.13
c) 205.57

2) Convert the following decimal numbers into equivalent octal numbers.


a) 105.15
b) 298.37
c) 915.18
Octal to Binary Conversion:
Here we convert the number having base 8 into the equivalent number having base 2.
For this type of conversion, we convert each octal digit to its equivalent binary digit. So
every octal digit is expressed by the combination of three binary digits into octal to binary conversion.
For example, to convert the octal number 23 into equivalent binary number,

2 3
010 011
So (23)8 = (0 1 0 0 1 1)2
Often we left one space between the groups of 3 bits. This makes it easier to read the binary number.

Mixed number:-
To convert the mixed octal number into an equivalent binary number. We apply the
same procedure as above. So the process for conversion of integer is same as conversion of fraction.

For example, to convert the octal number 34.562 into an equivalent binary number.

3 4 5 6 2
    
011 100 101 110 010
So (34.562)8  (011100.101 110 010) 2

Binary to Octal Conversion :-


Conversion from binary to octal is the reverse process of conversion of octal to binary.
For this type of conversion, we first take the binary number and make the groups of 3
bits. If the left most group does not have sufficient number of bits to form the group. Then we add
zeros in it and then each group is individually converted into an equivalent octal digit.
For example, to convert the binary number 1011 . 01101 into an equivalent octal number,
we use:
1 0 1 1. 1 1 0 1
Make the groups of 3 bits.
001 011 . 001 101

001 011 001 101


  
1 3 1 3
So (1011 . 01101) 2  (13.13)8

Exercise :

1) Convert the following binary numbers into equivalent octal numbers.


a) 110011.011
b) 1010101 . 101
c) 11011011 . 11011

2) Convert the Following octal numbers into equivalent binary numbers.


a) 363 . 67
b) 525 . 15
c) 227 . 501
4) Hexadecimal Number System:
Hexadecimal numbers are used in microprocessors. They are much shorter than binary
numbers. This makes them easy to write and remember. Also, we can mentally convert them into
binary equivalents. The hexadecimal number system has a base of 16. So the digits are from 0 to 15.
The digits from 10 to 15 are represented by A to F as the basic symbols.

Following table shows the hexadecimal equivalents for 0 to 15 decimal Numbers:

Decimal Binary Hexadecimal


0 0000 0
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 8
9 1001 9
10 1010 A
11 1011 B
12 1100 C
13 1101 D
14 1110 E
15 1111 F

Hexadecimal to Binary Conversion:

To convert a hexadecimal number into equivalent binary number we convert each


hexadecimal digit into equivalent binary number of 4 digits.

For example, to convert a hexadecimal number 9A F into an equivalent binary number.


9 A F
  
1001 1010 1111
so (9 A F )16  (1001 1010 1111) 2

Binary to Hexadecimal conversion :


This is the reverse process of converting hexadecimal to binary. We first make the
groups of bits and then convert each group into hexadecimal equivalent.

For example, to convert a binary number 1000 1100 to hexadecimal


1000 1100
 
8 C
So (1000 1100) 2  (8 C )16

Fractions:

A method of converting a fraction from binary to hexadecimal is same as converting an


integer from binary to hexadecimal.
The same is true for the conversion of hexadecimal to binary from fractions.

Exercise:

1) Convert the following binary numbers into hexadecimal number:


a) 101011011
b) 110111.101101
c) 101011.1011

2) Convert the following hexadecimal numbers into equivalent binary numbers:


a) 9 B C
b) 1 A F . 17
c) F A 7 . 8 E

Hexadecimal to decimal conversion:-

Here we convert a number having base 16 into equivalent number having base 10.

In a hexadecimal number system each digit position corresponds to the power of 16. So
the weights of digit positions are:
 163 162 161 160 . 161 162 163 

Hexadecimal Point.
Therefore to convert from hexadecimal to decimal, we multiply each hexadecimal digit by its weight
and add the resulting products.

For example, to convert a hexadecimal number F 8 E 6 . 3 9 into decimal.:

F 8 E 6 . 3 9  F (16)3  8(16) 2  E (16)  6 (16)0  3(16) 1  9 (16) 2


 15 (163 )  8(162 )  14 (161 )  6 (160 )  3(161 )  9 (162 )
 61, 440  2, 048  224  6  0.1875  0.0352
 63, 718 . 2227
So ( F 8 E 6.39)16  (63, 718.227)10
Decimal to Hexadecimal conversion:
We use hex dabble method to convert from decimal number to equivalent hexadecimal
number. In it we divide the number successively by 16, writing down the remainders till we get the
quotient as zero. Each time, we take the quotient as the next number to divide. At the end, the
remainders taken in reverse direction gives the equivalent hexadecimal number.

For example, to convert a decimal number 2479 to hexadecimal, we apply hex dabble
method as,

Quotient Re mainder
2479
Step 1 154 15  F
16

154
Step 2 9 10  A
16

9
Step 3 0 99
16
So (2479)10  (9 A F )16

Exercise:
1) Convert the following decimal numbers into equivalent hexadecimal numbers:
a) 9 2 7
b) 1 5 4
c) 8 0 7

2) Convert the following hexadecimal numbers into equivalent decimal numbers.


a) 9 A C . 1 5
b) 1 3 D . 2 E
c) F 3 8 . A B

NON – POSITIONAL NUMBER SYSTEM :


1)B C D (Binary Coded Decimal):
The BCD code expresses each digit in a decimal number by its nibble equivalent.
So This code is very simple to understand. It was used in early computers.
To convert a decimal no. 429 into its equivalent B C D.
4 2 9
  
0100 0010 1001
So each digit is independently converted to a 4 bit binary number. Hence the conversion process is
very easy. Since the 4 bits are used, only 2 4 ie. 16 configurations are possible.

If we consider the B C D equivalent of decimal digits, then it is as follows.

Decimal Digit BCD equivalent


0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
10 0001 0000
11 0001 0001
12 0001 0010
13 0001 0011
14 0001 0100
15 0001 0101

So only 0 to 9 decimal digits are converted into 4 bits for BCD equivalents. From 10 to 15 two groups
of 4 bits are used since there are two decimal digits.

2) ASCII : American Standard Code for Information Interchange.

This is a seven bit code. It is standard code used in computer hardware such as keyboards,
printers & video displays. It is an alphanumeric code. It allows 2 7 = 128 different characters. The first
3 bits are used as zone bits and last 4 bits indicate the digit. The following table shows alphabetic &
numeric characters in ASCII notation.

Character ASCII Code Hexadecimal


Zone Digit Equivalent
0 011 0000 30
1 011 0001 31
2 011 0010 32
3 011 0011 33
4 011 0100 34
5 011 0101 35
6 011 0110 36
7 011 0111 37
8 011 1000 38
9 011 1001 39

A 100 0001 41
B 100 0010 42
C 100 0011 43
D 100 0100 44
E 100 0101 45
F 100 0110 46
G 100 0111 47
H 100 1000 48
I 100 1001 49
J 100 1010 4A
K 100 1011 4B
L 100 1100 4C
M 100 1101 4D
N 100 1110 4E
O 100 1111 4F

P 101 0000 50
Q 101 0001 51
R 101 0010 52
S 101 0011 53
T 101 0100 54
U 101 0101 55
V 101 0110 56
W 101 0111 57
X 101 1000 58
Y 101 1001 59
Z 101 1010 5A

For e.g.
Write the hexadecimal & binarycoding for The word ‘THAKUR’ in ASCII

T = 54 H = 0101 0100
H = 48 H = 0100 1000
A = 41 H = 0100 0001
K = 4B H =0100 1011
U = 55 H = 0101 0101
R = 52 H = 0101 0010

You might also like