0% found this document useful (0 votes)
2 views15 pages

Unit 2-Number System

The document provides an overview of number systems, including their definitions, classifications, and examples such as decimal, binary, octal, and hexadecimal systems. It explains the concepts of positional and non-positional systems, the significance of base or radix, and the relationships between different number systems. Additionally, it covers methods for converting between these systems, particularly focusing on binary to decimal, octal, and hexadecimal conversions, as well as decimal to binary conversions.

Uploaded by

Keerthana
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
2 views15 pages

Unit 2-Number System

The document provides an overview of number systems, including their definitions, classifications, and examples such as decimal, binary, octal, and hexadecimal systems. It explains the concepts of positional and non-positional systems, the significance of base or radix, and the relationships between different number systems. Additionally, it covers methods for converting between these systems, particularly focusing on binary to decimal, octal, and hexadecimal conversions, as well as decimal to binary conversions.

Uploaded by

Keerthana
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 15

Number System

A number system is defined as a system of writing, to express numbers. It is the


mathematical notation for representing numbers of a given set by using digits. It
provides a unique representation of every number. It also allows us to operate
arithmetic operations like addition, subtraction and division.
The value of any digit in a number can be determined by:

 The digit
 Its position in the number
 The base of the number system

Classification of Number System:

The number system can be classified in to two types namely:

Positional (or Weighted) Number System


A positional number system is also known as weighted number system. As the
name implies there will be a weight associated with each digit. According to its
position of occurrence in the number, each digit is weighted
For example 13.58 can be represented as:
13.58 = 1 x 101 + 3 x 100 + 5 x 10-1 + 8 x 10-2
Examples of positional number system are decimal number system, Binary
number system, octal number system, hexadecimal number system, Binary
Coded Decimal (BCD), etc.
Non-Positional (or Non-weighted) Number System:
Non-positional number system is also known as non-weighted number system.
Digit value is independent of its position. Non-positional number system is used
for shift position encodes and error detecting purpose.
Few examples of non-weighted number system are gray code, roman code,
excess-3 code, etc.
Base or Radix of a Number System:

The base or radix of a number system can be referred as the total number of
different symbols which can be used in a particular number system. Radix means
“root” in Latin.Base equals to 4 implies there are 4 different symbols in that
number system. Similarly, base equals to “x” implies there are “x” different
symbols in that number system.

Types of Number System


There are various types of number system and the four most common number
system types are:

1. Decimal number system (Base- 10)


2. Binary number system (Base- 2)
3. Octal number system (Base-8)
4. Hexadecimal number system (Base- 16)

Decimal Number System


Decimal number system is a base 10 number system. As it uses 10 digits to
represent a number, hence called the base 10 number system. In this number
system, the digits 0 to 9 represents numbers. Decimal number system is also
a positional value system because the value of digits will depend on its position.
Let us take an example:
Consider three numbers – 532, 352, 235

 In 532, value of 5 is 5 hundreds or 500 or 5 × 100 or 5 × 102


 In 352, value of 5 is 5 tens or 50 or 5× 10 or 5 × 101
 In 235, value of 5 is 5 units or 5 or 5 × 1 or 5 × 100
In 532, 352, 235 the value of 5 in all three numbers is different.
The weightage of each position can be represented as follows
In digital systems, instructions are given through electric signals and the variation
is done by varying the voltage of the signal. Having 10 different voltages to
implement decimal number system in digital equipment is difficult. So, many
number systems that are easier to implement digitally have been developed.
Binary Number System
A computer can understand only the “on” and “off” state of a two-state system
through electric signals. These two states are represented by 1 and 0. On is
represented as 1 and off as 0.The combination of 1 and 0 form binary numbers.
The number system having just these two digits 0 and 1 is called binary number
system

Each binary digit is also called a bit (binary digit). Binary number system is also
positional value system, where each digit has a value expressed in powers of 2.

In any binary number, the rightmost digit is called least significant bit (LSB) and
leftmost digit is called most significant bit (MSB).

Consider an example, (011001)2 , the positional value is represented as


(011001)2 = 0 x 25 +1 x 24 + 1 x 23 + 0 x 22 + 0 x 21 + 1 x 20
The decimal equivalent of (011001)2 is sum of product of each digit with its
positional value.
(011001)2 = 0 x 25 +1 x 24 + 1 x 23 + 0 x 22 + 0 x 21 + 1 x 20
= 0 x 32+1 x 16 +1 x 8 + 0 x 4 + 0 x 2 + 1 x 1
= 0 + 16 + 8 + 0 + 0 + 1
= 2510
Units of measurement of data

Machine understands only binary language. And so it is necessary to know how to


measure the data stored in a computer. Bit and Byte are the units to measure data.

Bit : The term ‘bit’ is a combination of the words ‘binary’ and ‘digit’. It is the
smallest unit of memory or instruction that can be stored on a computer. A bit is
either a 0 or a 1 and bits (‘binary’ and ‘digits’) are series of 0s and 1s.

Byte : A group of 8 bits is a byte. Combination of bytes comes with various names
like the Kilobyte, Megabyte and so on.

One kilobyte (KB) is a collection of 1000 bytes. 1024 kilobytes form a Megabyte
(MB) and so on.

Octal Number System


Octal number system is a base 8 number system. As it uses 8 digits to represent a
number, hence called the base 8 number system. In this number system, the digits
0 to 7 represents numbers. Octal number system is also a positional value system
where each digit has its value expressed in powers of 8.
Consider an example, the positional value is represented as
(276)8 = 2×82 + 7×81 + 6×80
The decimal equivalent of (276) is sum of product of each digit with its positional
8

value.
(276)8 = 2 x 82 + 7 x 81 + 6 x 80
= 2 x 64 + 7 x 8 + 6 x 1
=128 + 56 + 6
= (190)10

Hexadecimal Number System


Hexadecimal number system is a base 16 number system. As it uses 16 digits to
represent a number, hence called the base 16 number system. In this number
system, the numbers are first represented just like in decimal system, i.e. from 0 to
9 and the remaining 6 numbers are represented using the alphabets from A to F.
To take A, B, C, D, E, and F as part of the number system is conventional and has
no logical reason.
In hexadecimal number system, the numbers are represented as.

Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F

Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

. Hexadecimal number system is also a positional value system with where each digit
has its value expressed in powers of 16.

Consider an example, the positional value is represented as


(B2B)16 = B x 162 + 2 x 161 + B x 160
The decimal equivalent of (B2B)16 is sum of product of each digit with its
positional value.
(B2B)16 = B x 162 + 2 x 161 + B x 160
= 11 x 256 + 2 x 16 + 11 x 1
= 2816 + 32 + 11
= (2859)10
Number System Relationship
The table depicts the relationship between decimal, binary, octal and hexadecimal
number systems.
DECIMAL BINARY OCTAL HEXADECIMAL

0 0000 0 0

1 0001 1 1

2 0010 2 2

3 0011 3 3

4 0100 4 4

5 0101 5 5

6 0110 6 6

7 0111 7 7

8 1000 10 8

9 1001 11 9

10 1010 12 A

11 1011 13 B

12 1100 14 C

13 1101 15 D

14 1110 16 E

15 1111 17 F

Base Conversions
The different number base conversion in number system are:

1. Binary to other Number Systems.

2. Decimal to other Number Systems.

3. Octal to other Number Systems.

4. Hexadecimal to other Number Systems.

Binary to other Number Systems


There are three conversions possible for binary number, i.e., binary to decimal, binary
to octal, and binary to hexadecimal.

Binary to Decimal Conversion


To convert the binary number to a decimal number, we use the multiplication method. If
a number with base n has to be converted into a number with base 10, then each digit
of the given number is multiplied from the Most Significant Bit (MSB) to the Least
Significant Bit (LSB) with reducing the power of the base. Then the summation of the
multiplication result gives the equivalent decimal number.

Consider the following examples:

1. Convert binary number 1010(2) to decimal number


Binary Number 1 0 1 0
Significant Digit MSB - - LSB
Place Value 23 22 21 20
Conversion 1 x 23 0 x 22 1 x 21 0 x 20
Decimal Equivalent 8 0 2 0
Decimal Sum 8+0+2+0
Decimal Number 10

2. Convert a binary number with a decimal point 0.101(2) to decimal form.

All the fractional digits to the right of the binary point have respective weightings
which are negative powers of two. So for the fractional binary numbers to the right
of the binary point, the weight of each digit becomes negative giving: 2-1, 2-2, 2-3
and so on as shown.

Binary Number . 1 0 1
Significant Digit Zero Point - - -
Place Value 2-1 2-2 2-3
1 x 1/2 0x¼ 1 x 1/8 1
Conversion 1 x (0.5) 0 x (0.25) x (0.125)
Decimal Equivalent 0.5 0 0.125
Decimal Sum 0.5+0+0.125
Decimal Number 0.625

3. Convert binary number 1001.01(2) to decimal number


Binary
Number 1 0 0 1 . 0 1
Significant Zero
Digit MSB - - LSB Point - -
Place Value 23 22 21 20 . 2-1 2-2
0 x 1/2 0 x 1/4 0
Conversion 1x2 3
0x2 2
0x2 1
0x2 0
. 0 x (0.5) x (0.25)
Decimal
Equivalent 8 0 0 1 . 0 0.25
Decimal
Sum 8+0+0+1 . 0 + 0.25
Decimal
Number 9+0.25 = 9.25

Binary to Octal Number System


The given binary number is converted in to octal number system by the following
steps:

 Separate the digits of the given number in to groups from right to left each
3
containing 3(2 =8) digits.
 Find the equivalent octal number for each group.
 Write all group’s octal numbers together to get the equivalent octal number
for a given binary number.

Consider the following examples:

1. Convert 111110011001(2) to octal

BinaryNumber 1 1 1 1 1 0 0 1 1 0 0 1
Group of 3 digits 111 110 011 001
Equivalent Octal Number 7 6 3 1
Converted Octal Number 7631

2. Convert 0.100111(2) to octal

Binary Number . 1 0 0 1 1 1
Group of 3 digits Decimal Point 100 111
Equivalent Octal
4 7
Number
Converted Octal
Number 47

3. Convert binary number 1001.01(2) to octal number system

Binary
Number 1 0 0 1 . 0 1
Group of 3 Zero
digit 001 001 Point 010
Equivalent
Octal
Number 1 1 . 2
Converted
Octal
Number 11.2

Binary to Hexadecimal Number System


The given binary number is converted in to hexadecimal number system by the
following steps:

 Separate the digits of the given number in to groups from right to left each
4
containing 4(2 =16) digits.
 Find the equivalent hexadecimal number for each group.
 Write all group’s hexadecimal numbers together to get the equivalent
hexadecimal number for a given binary number.
1. Convert 111110011001(2) to Hexadecimal number system.

Binary Number 1 1 1 1 1 0 0 1 1 0 0 1
Group of 4 digits 1111 1001 1001
Equivalent Hexadecimal
F (15) 9 9
Number
Converted Hexadecimal
F99
Number

2. Convert 0.100111(2) to Hexadecimal number system.

Binary Number . 1 0 0 1 1 1
Decimal
1001 1100
Group of 4 digits Point
Equivalent Hexadecimal
9 B
Number
Converted Hexadecimal . 9B

3.Convert binary number 1001.01(2) to Hexadecimal number system.

Binary Number 1 0 0 1 . 0 1
Zero
Group of 4 digits 1001 Point 0100
Equivalent
Hexadecimal Number 9 . 4

Converted
Hexadecimal Number 9.4
Decimal to other Number Systems
There are three conversions possible for decimal number, i.e., decimal to binary,
decimal to octal, and decimal to hexadecimal.

Decimal to Binary Conversion


The most popular way to convert a decimal number into the binary is, the given
decimal number is progressively divided by 2 and writing the remainder after each
division. When all the remainder is read in reverse order, the binary number is
obtained.

The given decimal number is converted in to binary number system by the


following steps:

Step – 1 Divide the decimal number which is to be converted by 2.

Step – 2 The remainder which is obtained from step 1 is the least significant bit of
the new binary number.
Step – 3 Divide the quotient which is obtained from the step 2 and the remainder
obtained from this is the second least significant bit of the binary number.
Step – 4 Repeat the process until the quotient remains zero.
Step – 5 The last remainder obtained from the division is the most significant bit of
the binary number.

Arrange the number from most significant bit to the least significant bit (i.e., from
bottom to top).

Consider the following examples:

1. Convert decimal number 25(10) into its equivalent binary.


Conversion of Decimal to Binary for Fraction Number

For fractional decimal numbers, multiply it by 2 and place the carry in the integral
position. The carries when read down produces the equivalent binary fraction as
explained by the example given below.

2.Convert decimal number . 35(10) to Binary number system.

Thus the fractional binary number is .01011, i.e., 0.01011.

The process of multiplication by 2 will continue till the desired accuracy is


achieved.

3.Convert decimal number 25.35 (10) to Binary number system.

To convert the given decimal number into the binary number, the same approach is
used, as was done in integer and fractional parts of the number.
Hence the binary equivalent of 25 is 11001(2) and .35 is 01011(2)
Therefore 25.35(10) is 11001.01011(2)

Decimal to Octal Conversion


Converting a decimal number into the octal is, the given decimal number is
progressively divided by 8 and writing the remainder after each division. When all
the remainder is read in reverse order, the octal number is obtained.

1. Convert 239(10) to octal number system


2.Convert 0.356(10) to octal number system

3. Convert 239.356(10) to octal number system

Hence the octal equivalent of 239 is 354(8)


and .356 is 2662(8)

Therefore 239.356(10) is 354.2662(8)

Decimal to Hexadecimal Conversion

You might also like