What is a Number?
A number is a mathematical value used for counting or measuring or labelling objects. In number system these numbers are used as digits.
Number Systems
A number system is the mathematical notation for representing numbers of a given set by using digits or other symbols in a consistent manner. It provides a unique representation of every number and represents the arithmetic and algebraic structure of the figure.
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
Number System Chart
There are various types of number systems in mathematics. The four most common number system types are:
 Decimal number system (Base 10)
 Binary number system (Base 2)
 Octal number system (Base8)
 Hexadecimal number system (Base 16)
Numbers are used to represent data, and the different the data is representation are:
 1’s complement
 2’s complement
 9’s complement
 10’s complement
Range of Numbers in a number system
Binary (base 2) 
Octal (base 8) 
Decimal (base 10) 
Hexadecimal (base 16) 
Decimal Equivalent 
0 
0 
0 
0 
0 
1 
1 
1 
1 
1 
2 
2 
2 
2 

3 
3 
3 
3 

4 
4 
4 
4 

5 
5 
5 
5 

6 
6 
6 
6 

7 
7 
7 
7 

8 
8 
8 

9 
9 
9 

A 
10 

B 
11 

C 
12 

D 
13 

E 
14 

F 
15 
Conversion of numbers to other base systems
 Decimal to any other number system
 From any other number system to decimal system
Procedure of converting a given decimal number to any other number system by:
Step1: Divide the decimal number to be converted by the value of the base of the number in which conversion is required
Step2: get the remainder from step1 as the rightmost digit (LSD) of new base number
Step3: Divide the quotient of the previous step with the base value of required system
Step4: Record the remainder as the next higher digit of the new base number
Repeat step3 and step4 till the quotient become zero.
Example1: Convert decimal (19)_{10} to binary.
Example2: Convert decimal (619)_{10} to octal number.
Conversion from other base number system to decimal number system
We follow the sum of the weighted position of each digit by:
Step1: Determine the positional value of the each digit(It depends on the position and the base of the given number.
Step2: Multiply the column values (in step1) by the corresponding column digit
Step3: Sum the product (values obtained in step2).
The total is the equivalent value in decimal number system.
Example3: Convert octal (1250)_{8} to decimal number system.
Solution:
Conversion from Other Base Number System to Nondecimal Number System
Follow the given below steps for Conversion from Other Base Number System to Nondecimal Number System.
Step1: Convert the given number to the decimal number system
Step2: Now convert the decimal number so obtained to the required number system as described above.
Example4 : Convert (1001)2 = ( ? )_{3}.
Solution hint:
Step1: convert (1001)_{2 }to decimal answer here is decimal 9
Step2 : convert decimal 9 to ternary with base 3 by division process, answer here will be (100)_{ 3}.
Therefore (1001)_{2} = (100)_{ 3}.
Binary to Octal:
Conversion Process
 Beginning from right make group of three bits and write their corresponding octal value below it.
 Add as many zeros at the left most to complete the group of three bits.
 Read the number so obtained to be answer in octal.
Example: Convert binary 010101011111101 to octal
Solution
Make groups 010 101 011 111 101
Write digits 2 5 3 7 5
Answer is (25375)_{8}
Octal to Binary
 For each octal digit write its equivalent three bit binary code
 Read the code so obtained from left to right
Example: Convert (5245)_{8} to binary
Solution:
5 2 4 5
101 010 100 101
Answer is (101010100101)_{2}
Problems for Practice:
 (1100101)_{2} = ( ? )_{8}.
 (246753)_{8} = ( ? )_{2}.
Binary to Hexadecimal:
Conversion Process
Beginning from right make group of four bits and write their corresponding hex value below it.
Add as many zeros at the left most to complete the group of four bits.
Read the number so obtained to be answer in Hexadecimal.
Example : Convert (110101110110001110)_{2} to hexadecimal
Make group of 4bits 11 0101 1101 1000 1110
Add zeros in front 0011 0101 1101 1000 1110
Write hex digits 3 5 C 8 E
Answer is = (35C8E)_{16}.
Hexadecimal to Binary
For each Hex digit write its equivalent four bit binary code
Read the code so obtained from left to right to be binary equivalent of hexadecimal.
Example: Convert (A6B9)16 to its binary
Solution:
(A6B9)_{16}
A 6 B 9
1010 0110 1011 1001
(A6B9)_{16} = (1010011010111001)_{2}.
Problems for Practice:
(10010111011000100110111)_{2} = ( ? )_{16}.
(FA2953B)_{16} =( ? )_{2}.
Conversion of Fraction numbers
1. Converting Decimal to Binary
Fraction number is converted to its equivalent in base ‘X’ by following the multiplication by the base of number to which conversion is to be done.
Procedure:
a). Multiply the given decimal fraction by 2
b). Write the integer to the right and take fraction part to next multiplication
c) Repeat step(a) and step(b) till the required number of decimal places.
d). Read all integers from top to the bottom; i.e. integer value of first multiplication will be 1^{st} digit after decimal point.
Example: Convert (0.545)_{10} to binary to a precession of 4 decimal places
Solution
Fraction x base Product Integer
0 .545 x 2 = 1.090 —Keep Integerà 1
0.090 x 2 = 0.180 —Keep Integerà 0
0.180 x 2 = 0.360 —Keep Integerà 0
0.360 x 2 = 0.720 —Keep Integerà 0
0.720 x 2 = 1.440 —Keep Integerà 1
Answer is 0.545)_{10} = (0.10001)_{2}.
Converting any base fraction to decimal number
We can easily convert a fraction number in any base system to its decimal equivalent using the positional weight system. Remembering that the powers of the base starts with 1 and goes as 2, 3 for the subsequent digits
Procedure
Step1: After the decimal point, write the weights of each digit/ or bit
Step2: Multiply the weights by the corresponding column digit
Step3: Add all products so obtained.
Example : Convert (0.254)8 in octal to its decimal equivalent fraction
Solution:
Given Number 0 . 2 5 4
Weights 0 . 2^{1} 2^{2 } 2^{3}.
Multiply by digit . 2×8^{1} 5×8^{2 } 4×8^{3}
Add all product . 2×0.125 + 5×0.015625 + 4×0.001953125
= 0.25 + 0.078125 + 0.0078125
Answer = (0.3359375)_{10}.
Rounding to 4 decimal places = (0.3359)_{10}
Brain storming problem:
1. If (2.3)_{4} + (1.2)_{4} = ( Y )_{4} what is the value of Y
Solution:
Since base is common on the LHS, we can add the numbers. Remember in base 4, the values are 0,1,2,3. So while adding if sum > 3 carry will be generated. Watch the solution carefully.
3+2 =5, but in base 4, we get 1, with carry of 1
Also now see the integer value of answer, it is 4, this is not a valid digit. 4 in base 4 = 10
So final answer = (2.3)_{4} + (1.2)_{4} = ( 10.1 )_{4}
Example6: Given (135)_{x} + (144)_{x} = (323 )_{x }what is the base of the system.
Options: (a) 5 (b) 3 (c) 12 (d) 6
Solution:
Highest Digits given on LHS and RHS is 5; so the base of the system can be >=6,
Let us verify by doing the sum of LHS
135
144
——–
X X9 the least digit is 9, but look carefully digit 9 is not present in answer on RHS of the given question.
The right choice is (d)
Method2
Practice Problems
Consider the equation (43)x = (Y3)8 where X and Y are unknown. The number of possible solutions to X and Y is …….
BCD
BCD Stands for binary coded decimal, BCD numbers are used in computer system instead of the conventional decimal system. The advantage of BCD over decimal system is the ease of conversion from BCD to binary.
As in conventional decimal each digit is represented by 4binary bits. There are 16 possible combination that can be written with 4bits. But BCD has only 10digits 0 through 9, All combinations from 10 to 15 are therefore invalid in BCD.
The table below shows the decimal digits, its binary and BCD equivalent
Decimal Numbers 
Binary 
BCD 
0 
0000 
0000 
1 
0001 
0001 
2 
0010 
0010 
3 
0011 
0011 
4 
0100 
0100 
5 
0101 
0101 
6 
0110 
0110 
7 
0111 
0111 
8 
1000 
1000 
9 
1001 
1001 
10 
1010 
X 
11 
1011 
X 
12 
1100 
X 
13 
1101 
X 
14 
1110 
X 
15 
1111 
X 
Converting Given BCD to its Binary
Conversion of BCD to binary is straight forward.
Procedure – Just write the 4bit binary equivalent of each digit below it. That’s all.
Example: Convert BCD 568 to its binary equivalent
Solution:
5 6 8
0101 0110 1000
So, BCD 568 = 010101101000
Weighted / NonWeighted Codes
Weighted code
Weighted code obey the positional weight principle where each position of the digit represent specific weight. There are several system of codes which are used to express the decimal digits 0 through 9. These digits are represented by a group of 4bits. As an example each digit of the number 246 is represented as group of 4bits as shown in figure. The weights corresponding to each bit is also shown.
NonWeighted Codes:
Example of such codes are XS3 and the Gray code
Excess3 (XS3)
It is nonweighted code used to represent decimal numbers. The codes in this system are derived by adding 3 to the 8421 BCD code of digits.
Table of 8421 BCD and their equivalent XS3 codes
Decimal Digit 
8421 BCD code 
XS3 code 
0 
0000 
0011 
1 
0001 
0100 
2 
0010 
0101 
3 
0011 
0110 
4 
0100 
0111 
5 
0101 
1000 
6 
0110 
1001 
7 
0111 
1010 
8 
1000 
1011 
9 
1001 
1100 
Gray Code:
Gray code is also called as a unit distance code. There is only 1bit change in the code as the number is incremented or decremented by 1. These code does not support any arithmetic operations. This code is also a cyclic code
Table below shows the gray code of the decimal numbers
As can be seen in the Gray Code column3 code of 0à 00; 1à 01; 2à 11; 3à10, exactly 1bit change from one digit to next or previous.So is also for 3bit and 4bit codes. The position of bit that changes has been highlighted by green arrows.
Example
1.. Decimal equivalent of XS3 number 110010100011.01110101 is
(a) 970.42 (b) 861.75 (c) 1253.75 (d) None
2. The decimal number 10 is represented in BCD form as
(a) 01010 (b) 001010 (c) 00010000 (d) 1010
3. A three digit number requires…………….for representation in conventional BCD form
(a) 24bits (b) 6 bits (c) 12 bits (d) 3 bits
Reflective Codes/Self Complementary Codes
A code is called reflective when the code is selfcomplementary. Examples of selfcomplementary or reflective code are 8421 BCD, 2421 BCD and 5421 BCD and XS3. Figure below shows how the reflective/selfcomplementary code are called so.
Sequential Code
In sequential code we get the next or the previous number by adding or subtracting 1 from the number. Here each succeeding code is one binary number greater than its preceding number. This property of the number helps in manipulating the data. Example of such code is 8421 BCD and XS3 code.
Alphanumerical codes
· ASCII – American standard code for information interchange
· EBCDIC Extended Binary coded decimal interchange code
· Fivebit Baudot Code
Number System Questions
 Convert (543)_{10} into hexadecimal. [Answer: (21F)_{16}]
 Convert 0.525 into an octal number. [Answer: 4146]
 What is binary equivalent of BCD number 5920. [Answer: 0101100100100000]
 Gray code is also known as a ……………….code (Answer:unit distance code]
 Octal number is an example of the ……………..number [Answer: Weighted]
 ……………………are an example of Nonweighted code [Answer: XS3 and Gray code]
 What is XS3 code of BCD 5679 [Answer: 1000 1001 1010 1100]
 What is decimal equivalent of XS3 1011110010001010. {Answer: 1000 1001 0101 0111]
 What is binary equivalent of 2475 octal number. [Answer: 010 100 111 101]
 Convert hexadecimal 2FB5A to its octal equivalent [Answer: 0575532 ]