Number Systems: Base/radix of A Number System
Number Systems: Base/radix of A Number System
MODULE 3
NUMBER SYSTEMS
A Number System is a way to represent numbers. There are two types of
number systems
In this method, we use symbols for counting such as I for 1,II for 2,III for
3……etc. These are also position invariant. That means the symbols are position
independent. They have no values depending on their position and are not used for
arithmetic calculations
In positional number systems we use digits for counting. These digits represent
different values depending on the position they occupy in the number. The value of
each digit in a number is determined using three factors
Example: 423
3*100 = 3*1 = 3
2*101 = 2*10= 20 3+20+400 = 423(which is the real number)
4*102 = 4*100 =400
Base/radix of a number system
Base of a number system is defined as the total number of digits available in that
number system. Numbers are always starting with 0.The maximum value of a
number system is equal to one less than the base of that number system.
It is also called denary number system or Arabic number system. It has two parts,
Integer part & fractional part. Both are separated by a decimal point. Base of
decimal number system is 10. Each position to the left of decimal point is
represented as the power of base 10. Each position to the right of decimal point is
represented as the negative power of base 10.
Eg:234.78
Eg:1452
Eg:14FA2
NUMBER CONVERSION
I.
1. Binary to decimal
(1110)2 = ( ? )10
=0+2+4+8
=(14)10
➢ All the bits to the right of decimal point have the weight that are negative
powers of base 2
Example:
(.010)2 = ( ? )10
= 0+ .25 +0
=(.25)10
2. Binary to Octal.
Example:
(101110.011)2 = ( ? )8
(101110.011)2 =
=(56.3)8 110
011
3. Binary to Hexa-decimal.
Example:
= 0 1 1 0 1 0 1 1. 1101 0110
6 B . D 1011->11(B)
II.
1. Decimal to Binary
Method:
Example
(25)10 ( ? )2
=(11001)2
➢ To convert decimal fractions into binary number, use the method repeated
multiplication by 2 method
Example: (.3125)10 = ( ? )2
= ( .0101)2
2. Decimal to Octal
Method:
(569)10 = ( ? )8
3. Decimal to Hexa-decimal
Method:
=(9F1)16
.3725 * 16 = 5. 96
.96 * 16 = 15.36
.36 * 16 = 5.76
.76 * 16 = 12.16
=(5F5C)16
III.
1. Octal to Binary
To convert octal numbers to corresponding binary number, simply replace
each octal digit into the 3 bit binary number and combine the results.
Example:
(436)8 = (?)2
4 3 6
=( 100011110)2
2. Octal to Decimal
• To convert octal numbers to corresponding decimal number, multiply
each octal digit with its weight and calculate the sum of products
• All the bits to the right of decimal point have the weight that are negative
powers of base 8
Example
(547.14)8 = ( ? )10
(547)8
=7+32+320
=(359)10
(.14)8
=1*8-1 + 4*8-2
=(1*.125)+(4*.015)
=.125+.06
=(.185)10
Answer=(359.185)10
3. Octal to Hexa-Decimal
❖ There is no methods to convert octal number to hexa-decimal directly
❖ So we first convert the octal number to corresponding binary number and
then convert the binary number to its equivalent hexa-decimal number
Ie.
Octal number
Binarynumber
Hexa-decimal number
Example:
(345)8 = (?)16
3 4 5
0000 1 1 1 0 0 1 0 1
0 14(E) 5
=(E5)16
IV.
1. Hexa-decimal to binary
Method:To convert Hexa-decimal numbers to corresponding binary number,
simply replace each Hexa-decimal into the 4 bit binary number and combine
the results.
Example:
(AF13)16 =(? )2 8421
1010(A)
1111(F)
0001
0011
A F 1 3
2. Hexa-decimal to Decimal
Method: To convert hexa-decimal numbers to corresponding decimal
number, multiply each hexa-decimal digit with its weight and calculate the
sum of products
Example:
(B2F8)16 =( ?)10
=8*160 + F*161 + 2*162 + B*163
=8*160 + 15*161 + 2*162 + 11*163
=8+240+512+45056
=(45816)10
3. Hexa-decimal to Octal
❖ There is no methods to convert hexa-decimal number to octal directly
❖ So we first convert the hexa-decimal number to corresponding binary
number and then convert the binary number to its equivalent octal
number
Ie.
hexa-decimal number
Binarynumber
Octal number
Example:
(E5)16 =(?)8
=E 5
1110 0101
= 0 1 1 1 0 0 1 0 1
3 4 5
=(345)8
Arithmetic Addition
Example:1
00111+10101= ?
Answer=11100
Example:2
11101+11011=?
Answer=111000
Step3: remove the carry and add it to the result. This carry is called end
around carry
Example:
11001-10011 =?
01100
100101
00101 +
00110
11001-10011= 00110
Step3: There is no carry. The answer has an opposite sign and the result
must be in 1’s complement form
Example:
1001-1101=?
0010
1011
1001-1101= -0100
Example:
1100-1001=?
0111
10011
0011
1100-1001=0011
Step3: There is no carry. The answer has an opposite sign and the result
must be in 2’s complement form
Example:
10111-11111=?
Step2:Add 10111 +
00001
11000
00111+1= - 01000
10111-11111= -01000
Sign-Magnitude form
This form is used to represent signed numbers in binary format.It is also
called sign & magnitude form.
We use leftmost bit of binary number to represent the sign and the
remaining bits are called magnitude. If the sign bit is 0, then the number is
positive. If the sign bit is 1, then the number is negative. We can represent
the number either in 8 bit format or in 16 bit format.
23 =10111
BCD Numbers
BCD means binary coded decimal. In this System digit is represented by the
binary code of 4 bits. The BCD numbers contains only digits from 0-9.The
8421 code is an example of BCD code. Here we can represent the numbers
from 0-15.But the valid BCD numbers are from 0-9,Others are considered
as invalid number(10-15)
Example: 1472
1 4 7 2
BCD Addition
Step3: If the 4 bit sum is >9, then the result is the invalid BCD number. So that
add 6 (0110) to the result to make up the valid BCD number
1001 +
0011
1100 +
0110
0001 0010