0% found this document useful (0 votes)
49 views12 pages

Understanding Number Systems Basics

Uploaded by

roberatech
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)
49 views12 pages

Understanding Number Systems Basics

Uploaded by

roberatech
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

Chapter- 4 Number Systems

4.0 Objectives

4.1 Introduction

4.2 Non-Positional Number System

4.3 Positional Number System

4.4 Conversion

4.5 Shortcut Methods

4.6 Summary

4.7 Check Your Progress

4.8 Questions for Self-Study

4.0 OBJECTIVES
After studying this reader will be able to explain various number systems. The main features of this
chapter are as follows

 Non-Positional Number System

 Positional Number System

 Number Systems

 Conversion

 Shortcut Methods

4.1 INTRODUCTION
We saw in the previous chapter that a computer stores data internally in a format that is not easily
readable by human beings. This is the reason why input and output (I/O) interfaces are required. Every
computer store numbers, letters, and other special characters in coded form. Before going into the
details of these codes, it is essential to have basic understanding of number system. Hence, this chapter
familiarizes you with the fundamentals of number system. It also introduces some commonly used
number system by computer professionals and relationship among them.

Number systems are two types – non-positional and positional.

4.2 NON-POSITIONAL NUMBER SYSTEM

In early days, human beings counted on fingers. When counting beyond ten fingers, they used stones,
pebbles, or sticks to indicate values. This method of counting uses an additive approach or non-
positional number system. In this system, we have symbols such as I for 1, II for 2, III for 3, IIII for 4, IIIII
for 5, etc. Each symbol represents the same value regardless of its position in a number, and to find the
value of a number, one has to count the number of symbols present in the number. Since it is very
difficult to perform arithmetic with such a number system, positional number system was developed.

4.3 POSITIONAL NUMBER SYSTEM

In a positional number system, there are only a few symbols called digits. These symbols represent
different values, depending on the position they occupy in a number. The value of each digit in such a
number is determined by three considerations.

1. The digit itself,

2. The position of the digit in the number, and

3. The base of the number system (where base is defined as the total number of digits available in the
number system).

In our day-to-day life, we use decimal number system. In this system, base is equal to 10 because there
are altogether ten symbols or digit (0,1,2,3,4,5,6,7,8, and 9).

You know that in decimal number system. Successive positions to the left of the decimal point represent
units, tens, hundreds, thousands, etc. However, notice that each position represents a specific power of
the base (10). For example, decimal number 2586 (written as 2586) consists of digit 6 in units position, 8
in tens position, 5 in hundreds position, and 2 in thousands position, and its value can be written as:

(2 x 103) + (5 x 102) + (8 x 101) + (6 x 100) = 2000 + 500 + 80 + 6 = 2,586

Observe that the same digit signifies different values, depending on the position it occupies in the
number. For example,

In 258610 the digit 6 signifies 6 x 100 = 6 X 1= 6

In 256810 the digit 6 signifies 6 x 101 = 60

In 265810 the digit 6 signifies 6 x 102 = 600

In 625810 the digit 6 signifies 6 x 103 = 6000

Hence, we can represent any number by using the available digits and arranging them in various
positions.

The principles that apply to decimal number system, also apply to any other positional number system.
It is important to keep track of only the base of the number system in which we are working. The value
of the base in all positional number systems suggests the following characteristics:

1. The value of the base determines the total number of different symbols or digits available in the
number system. The first of these choices is always zero.

2. The maximum value of a single digit is always equal to one less than the value of the base.

4.3.1 Binary Number System

Binary number system is like decimal number system, except that the base is 2, instead of 10. We can
use only two symbols or digits (0 and 1) in this number system. Note that the largest single digit is 1 (one
less than the base). Each position in binary number represents a power of the base (2). Hence, in this
system, the rightmost position is units (20) position, the second position from the rights 2’s (21) position,
and proceeding in this way, we have 4’s (22) position, 8’s (23) position, 16’s (24) position, and so on.
Therefore, decimal equivalent of binary number 10101 (written as 101012) is:

(1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 20) = 16 + 0 + 4 + 0 + 1 = 21

In order to be specific about which system we are referring to, it is a common practice to indicate the
base as a subscript. Hence, we write 101012=2110

The short form of “binary digit” is bit. Hence, “bit” in computer terminology means either a 0 or1.

An n-bit number is binary number consisting of ‘n’ bits. Below table lists all 3-bits numbers along with
number can have one of the 8 values in range 0 to 7. In fact, any decimal number in the range 0 to 2n-1
can be represented in binary form as an n-bit number.

Binary Decimal Equivalent


000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7
Table No 4.1 3-bit binary
numbers with their decimal
equivalences.
Every computer store numbers, letters, and other special characters in binary form. There are several
occasions when computer professionals need to know the raw data contained in a computer’s memory.
A commonly used way to doing this is to print memory contents on a printer. This printout is called a
memory dump. Memory dumps, which are in binary numbers, would have many pages of 0’s and 1’s.
Working with these numbers would be very difficult and error prone for computer professionals. Hence,
two number systems – octal and hexadecimal, are often used as shortcut notations for binary. These
number systems and their relationship with binary number system are explained below.

4.3.2 Octal Number System

In octal number system, the base is 8. Hence, there are only eight symbols or digits: 0,1,2,3,4,5,6, and 7
(8 and 9 do not exist in this system). The largest single digit is 7 (one less than the base 8). Each position
in an octal number represents a power of the base (8). Therefore, decimal equivalent of octal number
2057 (written as 20578) is: (2 x 83) + (0 x 82) + (5 x 81) + (7 x 80) = 1024 + 0 + 40 + 7 = 1071

Observe that since there are only 8 digits in octal number system, 3 bits (23= 8) are sufficient to
represent any number in binary (see the above table-4.1)

4.3.2 Hexadecimal Number System


In hexadecimal number system, the base is 16. Hence, there are 16 symbols or digits. The first 10 digits
are the same digits of decimal number system – 0, 1, 2,3,4,5,6,7,8, and 9. The remaining six digits are
denoted by the symbols A, B, C, D, E, and F, representing decimal values 10,11,12,13,14 and 15,
respectively. Hence, the largest single digit is F or 15 (one less than the base 16). Each position in
hexadecimal number system represents a power of the base (16). Therefore, decimal equivalent of
hexadecimal number 1AF (written as 1AF16) is

(1 x 162) + (A x 161) + (F x 160) = (1 x 256) + (10 x 16) + (15 x 1) = 256 + 160 + 15= 431

Hence, 1AF16=43110

Observe that since there are only 16 digits in hexadecimal number 4 bits (24 = 16) are sufficient to
represent any hexadecimal number in binary.

Check Your Progress - 4.2 & 4.3

Fill in the blanks

1. Binary System consists of digit ..........................and ..........................

2. Every Computer Store letters, Symbols and numbers in .......................... format.

3. The principles that apply to decimal number system, also apply to any other.......................... number
system.

4. In .......................... number system, the base is 16. Hence, there are 16 symbols or digits.

5. In 265810 the digit 6 signifies ..........................

4.4 CONVERSION

Numbers expressed in decimal number system are much more meaningful to us, than are numbers
expressed in any other number system. This is because we have been using decimal numbers in our day-
to-day life, right from childhood. However, we can represent any number system in any other number
system. Because the input and final output values are to be in decimal, computer professionals are often
required to convert numbers in other number system to decimal and vice-versa. Many methods can be
used to convert numbers from one base to another. A method of converting from another base to
decimal, and a method of converting from decimal to another base are described below.

4.4.1 Converting from another Base to Decimal

The following steps are used to convert a number in any other base to a base 10 (decimal) number.

Step 1: Determine the column (positional) value of each digit (this depends on the position of the digit
and the base of the number system).

Step 2: Multiply the obtained column values (in Step 1) by the digits in the corresponding columns.

Step 3: Sum up the products calculated in Step 2. The total is the equivalent value in decimal.
Example 4.1. 110012 = ?10

Solution: Step 1: Determine Column values

Column Number (from right) Column Value


0 20 = 1
1 21 = 2
2 22 = 4
3 23 = 8
4 24 = 16

Step 2: Multiply the column values by the corresponding column digits

Column Value 16 8 4 2 1
Binary Digits 1 1 0 0 1
Product 16 8 0 0 1
Decimal Equivalence 16 + 8 + 0 + 0 + 1 = 25

Step 3: Sum up the products 16 + 8 + 0 + 0 + 1 = 25

Hence, 110012 = 2510

Example 4.2. 47068=?10

Solution: Step 1: Determine Column values Column Number (from right)

Column Number (from right) Column Value


0 80 = 1
1 81 = 8
2 82 = 64
3 83 = 512
4 84 = 4096
Step 2: Multiply the column values by the corresponding column Digits

Column Value 409 512 64 8 1


6
Octal Digits 4 7 0 6
Product 204 44 0 6
8 8
Decimal Equivalence 2048 + 448 + 0 + 6 = 2502
3: Sum up the products 2048 + 448 + 0 + 6 = 2502

Hence, 47068= 250210

Example 4.3. 1 AC16 = ?10

Solution: 1AC16 = 1 x 162 + A x 161 + C x 160 = 1 x 256 + 10 x 16 + 12 x 1 = 256 + 160 + 12 = 42810


Example 4.4. 40527 = ?10

Solution: 40527 = 4 x 73 + 0 x 72 + 5 x 71 + 2 x 70 = 4 x 343 + 0 x 49 + 5 x 7 + 2 x 1 = 1372 + 0 + 35 + 2 =


140910 Example 4.5. 40526 = ?10

Solution: 40526 = 4 x 63 + 0 x 62 + 5 x 61 + 2 x 60 = 4 x 216 + 0 x 36 + 5 x 6 + 2 x 1 = 864 + 0 + 30 + 2 = 89610

Compare the result with the result obtained In Example 4.4 and 4.5

Comparing this result with the result obtained in Example 4.4, we can find that although the digits
(4052) are the same for both the numbers, their decimal equivalents are different. This is because the
number in Example 4.4 is represented in base 7 number system, whereas the number in Example 4.5 is
represented in base 6 number system.

4.4.2 Converting from Decimal to Another Base (Division- Remainder Technique)

The Following steps are used to convert a decimal number to a number in another base.

Step 1: Divide the decimal number by the value of the new base.

Step 2: Record the remainder from Step 1 as the rightmost digit (least significant digit) of the new base
number.

Step 3: Divide the quotient of the previous division by the new base.

Step 4: Record the remainder from Step 3 as the next digit (to the left) of the new number.

Repeat Steps 3 and 4, recording remainders from right to left, until the quotient becomes zero in Step 3.
Note that the last remainder, thus obtained, will be most significant digit of the new base number.
4.4.3 Converting from a Base Other than 10 to Another Base Other Than 10
The following steps are used to convert a number in a base other than 10, to a number in another base:

Step 1: Convert the original number to a base 10 (decimal) number.

Step 2: Convert the decimal number obtained in Step 1 to the new base number.
4.5 SHORTCUT METHODS

4.5.1 Shortcut Method for Binary to Octal Conversion

The following steps are used in this method:

Step1: Divide the binary digits into groups of three (starting from the right).

Step 2: Convert each group of three binary digits to one octal digit. Since there are only 8 digits (0 to 7)
in octal number system, 3 bits (23 = 8) are sufficient to represent any octal number in binary. Moreover,
since decimal digits 0 to 7 are equal to the octal digits 0 to 7, we use binary to decimal conversion
method in this step.

4.5.2 Short Method for Octal to Binary Conversion


The following steps are used in this method:

Step 1: Convert each octal digit to a 3-digit binary number (the octal digits may be treated as a decimal
number for this conversion).

Step 2: Combine all the resulting binary groups (of 3 digits each) into a single binary number.

4.5.3 Shortcut Method for Binary to Hexadecimal Conversion

The following steps are used in this method:

Step 1: Divide the binary digits into groups of four (starting from the right).

Step 2: Convert each group of four binary digits to one hexadecimal digit. Remember that hexadecimal
digits 0 to 9 are equal to decimal digits 0 to 9 and hexadecimal digits A to F are equal to decimal values
10 to 15. Hence, for this step, we use binary to decimal conversion procedure and represent decimal
values 10 to 15 as hexadecimal A to F

4.5.4 Short Method for Hexadecimal to Binary Conversion

The following steps are used in this method:


Step 1: Convert each Hexadecimal digit to a 4-digit binary number.

Step 2: Combine all the resulting binary groups (of 4 digits each) into a single binary number.

We have summarized the relationship among decimal, hexadecimal, binary, and octal number system.
Note that the maximum value for a single digit of octal (7) is equal to the maximum value of three digits
of binary. The value range of one digit of octal duplicated the value range of three digits of binary. If we
substitute octal digits for binary digits, the substitution is on a one-to-three basis. Hence, computer that
print octal numbers instead of binary, while taking memory dump, save one-third of printing space and
time. Similarly, note that the maximum value of one digit in hexadecimal is equal to the maximum value
of the four digits in binary. Hence, the value range of one digit of hexadecimal is equivalent to the value
range of four digits of binary. Therefore, hexadecimal shortcut notation is one-to-four reduction in space
and time required for memory dump.

Hexadecima Decima Octa Binar


l l l y
0 0 0 0
1 1 1 1
2 2 2 10
3 3 3 11
4 4 4 100
5 5 5 101
6 6 6 110
7 7 7 111
8 8 10 1000
9 9 11 1001
A 10 12 1010
B 11 13 1011
C 12 14 1100
D 13 15 1101
E 14 16 1110
F 15 17 1111
10 16 20 10000

Relationship among Decimal, Hexadecimal, Octal and Binary number systems.

Check Your Progress - 4.4 & 4.5

Fill in the Blanks

1. Decimal Equivalent for FF Hexadecimal number is ..................................

[Link] equivalent for 16 is ..................................

[Link] is for ..................................and MSD is for ..................................

[Link] symbols used in octal are ..................................

[Link] equivalent for 101101011002 is ..................................

4.6 SUMMARY

1) Number systems are of two types – non-positional and positional.

2) In a non-positional number system. Each symbol represents the same value regardless of its position
in the number and to find the value of a number, one has to count the number of symbols present in
the number. It is very difficult to perform arithmetic with such a number system.

3) In a positional number system, there are only a few symbols called digits. These symbols represent
different values depending on the position they occupy in a number. The value of each digit in such a
number is determined by the three considerations: ·The digit itself, ·The position of the digit in the
number, and ·The base of the number system (where base is defined at the total number of digits
available in the number system).

4) In our day-to-day life, we use the decimal number system. In this system, base is equal to 10 because
there are altogether ten symbols or digits. (0,1,2,3,4,5,6,7,8 and 9).

5) Some positional number system that are used in computer design and by computer professionals are
binary (having base 2), octal (having base 8), and hexadecimal (having base 16).

4.8 QUESTIONS FOR SELF - STUDY

1) Differentiate between positional and Non positional number systems.


2) What is base of a number system? Write examples to illustrate the role of base in positional number
system.

3) What is the value of base for decimal, hexadecimal, binary and octal number system?

4) Find decimal equivalent of a) 11010112 b) 101100011002 c) 10101011002 d) 11101012

5) Find octal equivalent of following binary numbers

a) 1010011 b) 1001001101 c) 1010101100 d) 11001010

6) Find hexadecimal equivalent of above binary numbers (question5)

7) Convert following numbers into decimal numbers

a) 1101102 b) 2A3B16 c) 25738

8) Convert following decimal numbers into binary numbers

a) 435 b) 32 c) 1694 d) 135

Common questions

Powered by AI

Hexadecimal 'FF' converts to decimal by calculating (15 x 16^1) + (15 x 16^0), equaling 255 . Each 'F' represents the decimal 15 because hexadecimal digits A to F correspond to decimals 10 to 15 .

The maximum value for a single binary digit is 1, for an octal digit is 7, and for a hexadecimal digit is 15 . This reflects the base system: 2, 8, and 16, respectively, where the maximum digit value is always one less than the base . This significance lies in understanding digit representation and operations within the given number system's base.

The base of a number system determines the total number of digits or symbols available, starting with zero . In positional systems, this dictates how numbers are represented and calculated, where base variations modify numeral sets from binary's 0-1 to hexadecimal's 0-F .

The binary number system has a base of 2 and uses symbols 0 and 1, where each position represents a power of 2 . In comparison, the decimal system has a base of 10 using symbols 0 through 9, where each position represents a power of 10 . The rules for determining digit value by position and base apply to both systems .

Non-positional number systems use symbols that represent the same value regardless of their position; arithmetic operations are difficult with this system because value is determined by counting symbols . In contrast, positional number systems use a base and the value of a digit is determined by its position, making arithmetic operations more manageable .

Hexadecimal is beneficial because it significantly reduces the space required to represent binary values, allowing a one-to-four reduction . This advantage is critical in computer memory dumps and coding practices, offering efficient mapping of binary data and simplifying interpretation for system operations .

To convert a binary number to an octal number: divide the binary digits into groups of three, starting from the right . Convert each three-bit group directly to its octal equivalent since 3 bits are sufficient to represent an octal number (as they range from 0 to 7).

The relationship is that 3 binary bits can represent one octal digit because the octal base (8) requires 3 bits to cover all its digit possibilities (0-7). This one-to-three correspondence reduces complexity in conversion, simplifying direct translation between these systems for computational efficiencies .

Starting with the decimal number, divide it by the desired base and note the remainder as the least significant digit (rightmost). Continue dividing the quotient by the base, recording each remainder successively to the left until the quotient is zero . The complete remainder sequence forms the converted number in the new base.

Positional systems allow for complex arithmetic operations and digital data management, especially in computing, where operations like addition, multiplication, and data storage rely on digit positioning and base interpretations . Non-positional systems lack this efficiency due to their additive nature, making operations cumbersome and error-prone .

You might also like