Introduction:

You’ve heard about the number system. Number systems are techniques for representing numbers of a certain type. It is a mathematical notation for representing numbers, consistently using digits or other symbols. Typically we use a decimal number system in our day-to-day life. However, the computer only understands binary numbers. Others are octal and hexadecimal number systems. In this post, I will try to cover this topic from various aspects. The weight structure counting technique will also discuss. I tried to make things as simple as possible. First I try to explain some common terms used in the number system.

Key Questions:

What are the different types of number systems?

What are the applications of different number systems?/Why do we use different number systems?

Discuss counting in binary, counting in octal and counting in hexadecimal

Types:

Some commonly used number systems are:

  1. Binary number system (base 2)
  2. Octal number system (base 8)
  3. Decimal number system (base 10)
  4. Hexadecimal number system (base 16)

Number Base (Radix):

The base of any number system is defined by the number of different unique symbols possible in that number system.

Base 2 has only two unique symbols 0,1

,Base 8 has 8 unique symbols 0-7

following Base 10 has 10 unique symbols 0-9

and Base 16 has 16 unique symbols 0-9 A-F

Positional Notation:

In a weighted system, each digit has its value multiplied by its place value/weight. Multiplying each digit with its place value or weight and summing up all, we get the original number. We all know about units, tens, hundreds and thousands, these are the positional notations which is mathematically represented by the POWER of BASE. The digit at tens position has more weight than the digit at a units place. Similarly, the digit at the hundreds place has more weight than the digit at tens place. The concept will be more clear after solved examples are later provided in the post.

Weight:

The weight of numbers is determined by their position. The weight for whole numbers is the positive powers of base/radix that increase from right to left. For fractional numbers, the weights are negative powers of 10 decreases from left to right.

Counting Technique:

While counting in any number system some points should be kept in mind. These are as follows:

  • If we place a zero on the left side of a number it doesn’t change the number. For example, if I write 6576 or 06576 both are the same
  • Units place updates at every iteration while the other places remain the same
  • If the unit place can not upgrade further, it’s time to reset unit place and tens place upgrades this time
  • If both unit and ten places can not upgrade further, it’s time to reset both places and upgrade the hundred place example 099)10 units and tens places can not upgrade further, both are reset to 0 and hundreds place upgrades to 1. So 099 becomes 100
BinaryDecimalOctalHexadecimal
00000000
01010101
10020202
11030303
100040404
101050505
110060606
111070707
1000081008
1001091109
101010120A
101111130B
110012140C
110113150D
111014160E
111115170F

1. Decimal Number System:

The decimal number system with its ten digits is a base 10 system. We all are familiar with the decimal number system because we use it in our daily lives. But most of us are unfamiliar with weights and positional notations. The understanding of this concept is easy in the decimal system because all of us are familiar with it. Later on, the same concept will be applied to the other number systems.

Largest possible value:

For single-digit numbers, the largest possible value is 9 = 101-1

For two digits number, the largest possible value is 99 = 102-1

For three digits number, the largest possible value is 999 = 103-1

For four digits number, the largest possible value is 9999 = 104-1

For five digits number, the largest possible value is 99999 = 105-1

Generalize,

For n digits number, the largest possible value is 10n-1

Weight Structure:

10n-1…  103 102 101 100 10-1 10-2 10-3… 10-n

Example: The number is given 4567

 Determine its weight and positional notation

Number4567
Positional Notation3Thousands2Hundreds1Tens0Units
Weight103102101100

Example: 4567 expresses it as sum of the values of each digit

Remember: weight increases from right to left for whole numbers

4567=(4*103)+(5*102)+(6*101)+(7*100)

       =(4*1000)+(5*100)+(6*10)+(7*1)

       =4000+500+60+7

        =4567

Example:4567.89 determine its weight and positional notation and express it as sum of the values of each digit

Number4567.89
Positional Notation3Thousands2Hundreds1Tens0Units-1Tenths-2Hundredth
Weight10310210110010-110-2

Remember weight decreases from left to right after the decimal point.

4567.89=(4*10003)+(5*1002)+(6*101)+(7*100). (8*10-1)+(9*10-2)

             = (4*1000)+(5*100)+(6*10)+(7*1). (8*0.1)+(9*0.01)

             =4000+500+60+7.(0.8)+(0.09)

             =4567.89

2. Binary Number System:

It is a counting system with only two bits 0 and 1. It is a weighted number system. The rightmost bit is the least significant bit (LSB) and has a weight of 20(weight is determined by POWER of BASE). While the left most bit is the most significant bit (MSB) and its weight depends upon the size of the binary number. When we are working with a particular number system we used to mention its base.

For example 0)2  110)2

The subscript ‘2’ shows base or radix.

Largest possible value:

For a single bit number, the largest possible value is 1)= 21-1)10= 1)10

For two bits numbers, the largest possible value is 11)= 22-1)10= 3)10

For three bits numbers, the largest possible value is 111)2= 23-1)10= 7)10

For four bits number, the largest possible value is 1111)2= 24-1)10=  15)10

For five bits number, the largest possible value is 11111)2= 25-1)10=31)10

Generalize,

For n bits number, the largest possible value is 2n-1)10

Weight Structure

2n-1…  23 22 21 20  2-1 2-2 2-3… 2-n

Example: 1011)2 express it as sum of the values of each digit, or convert the number in decimal equivalent.

1011)2= (1*23)+(0*22)+(1*21)+(1*20)

         =(1*8)+(0*4)+(1*2)+(1*1)

         =8+0+2+1

         =11)10

Example: 1011.11 determine its weight and positional notation and express it as sum of the values of each digit or convert the number in decimal equivalent

Number1011.11
Positional Notation3Thousands2Hundreds1Tens0Units-1Tenths-2Hundredth
Weight232221202-12-2

1011)2= (1*23)+(0*22)+(1*21)+(1*20).+(1*2-1)+(1*2-2)

         =(1*8)+(0*4)+(1*2)+(1*1). (1*0.5)+(1*0.25)

         =8+0+2+1.+0.5+0.25

         =11.75)10

3. Octal Number System:

The octal number system is another type of numbering technique that is less common nowadays. It is a base 8 system that has 8 unique symbols. These are 0,1,2,3,4,5,6,7

Largest possible value:

For single-digit numbers, the largest possible value is 7)8= 81-1)10= 7)10

For two digits number, the largest possible value is 77)8= 82-1)10= 63)10

For three digits number, the largest possible value is 777)8= 83-1)10=511)10

For four digits number, the largest possible value is 7777)8= 84-1)10 = 4,095)10

For five digits number, the largest possible value is 77777)8= 85-1)10=32,767)10

Generalize,

For n digits number, the largest possible value is 8n-1)10

Weight Structure:

8n-1…  83 82 81 80 8-1 8-2 8-3… 8-n

Example: 1267)8   express it as sum of the values of each digit, or convert the number in decimal equivalent

1267)8 = (1*83)+(2*82)+(6*81)+(7*80)

           =(1*512)+(2*64)+(6*8)+(7*1)

           =512+128+48+7

           =695)10

Example: 1267.44)8 determine its weight and positional notation and express it as sum of the values of each digit or convert the number in decimal equivalent.

Number1267.44
Positional Notation3Thousands2Hundreds1Tens0Units-1Tenths-2Hundredth
Weight838281808-18-2

1267)8 = (1*83)+(2*82)+(6*81)+(7*80).+(4*8-1)+(4*8-2)

           =(1*512)+(2*64)+(6*8)+(7*1).        +(4*0.125)+(4*0.015625)

           =512+128+48+7+0.5+0.0625

           =695.5625)10

4. hexadecimal Number System:

The base 16 or hexadecimal system has 16 unique symbols. These are 0,1,2,3,4,5,6,7,8,9, A, B, C, D, E, F

Largest possible value:

For single-digit numbers, the largest possible value is F)16 = 161-1)10=15)10

For two digits number, the largest possible value is FF)16 = 162-1)10=255)10

For three digits number, the largest possible value is FFF)16 = 163-1)10=4095)10

For four digits number, the largest possible value is FFFF)16 = 164-1)10=65,535)10

For five digits number, the largest possible value is FFFFF)16 = 165-1)10=1,048,575)10

Generalize

For n digits number, the largest possible value is  16n-1)10

Weight Structure:

16n-1…  163 162 161 160  16-1 16-2 16-3… 16-n

Example: 57FF)16 express it as sum of the values of each digit or convert the number in decimal equivalent

57FF)16 = (5*163)+(7*162)+(F*161)+(F*160)

            = (5*4096)+(7*256)+(15*16)+(15*1)

            = 20480+1792+240+15

            = 22527)10

Example:57FF.1A)16  determine its weight and positional notation and express it as sum of the values of each digit or convert the number in decimal equivalent.

Number57FF.1A
Positional Notation3Thousands2Hundreds1Tens0Units-1Tenths-2Hundredth
Weight16316216116016-116-2

57FF)16 = (5*163)+(7*162)+(F*161)+(F*160). (1*16-1)+(10*16-2)

            =(5*4096)+(7*256)+(15*16)+(15*1) (1*0.0625)+(10*0.00390625)

               =20480+1792+240+15.0.0625+0.0390625

            = 22527.0.1015625)10

Applications:

  • The computer uses a binary number system with ‘zero’ representing ‘off’ position and ‘one’ representing an ‘on’ position
  • Digital circuits work only with binary values like logic 0’ and logic 1
  • Computer use binary numbers in addressing memory but for memories in the range of gigabytes it is more appropriate to use hexadecimal numbers for addressing
  • Hexadecimal numbers are used as a compact way of representing binary numbers and it is very easy to convert between binary and hexadecimal.
  • Long binary numbers are difficult to write as it is easy to drop a bit. To overcome this problem hexadecimal and octal numbers are used.

Conversions from one number system to another:

Leave a comment

Your email address will not be published. Required fields are marked *