Unit 1 Introduction To Number System Complete Note
Unit 1 Introduction To Number System Complete Note
UNIT 1
NUMBER SYSTEM
In every step of life, we definitely find the use of numbers. If you need to buy something,
you will have to pay a certain amount of money for which you will have to count the money.
Likewise, the shopkeeper will also count the goods to give you and same for your changes.
Therefore, number system can simply be defined as a way to represent numbers.
For example, a number system can be used to represent the number of players in a certain game
like 11 players in a football team or for the number of audience for a concert like 25000 concert-
goers, etc. So number system can also be viewed as a set of values that is used to represent different
quantities.
The decimal number system is the most commonly used number system in our daily life. This
generally used number system is also known as the base 10 number system because it uses just the
10 symbols i.e. 0 to 9. It is also known as the denary number system because any numeric value
there is, these system’s digits can easily represent them. The decimal system is specially used in
the computer interface. The weight and position of the digit dictate the value represented by it.
In this system, each number consists of the digits that are located at different positions. The
positions of the 1st and the 2nd digits towards the right side of the decimal point are -1 and -2.
Similarly, the positions of the 1st and 2nd digits towards the left side of the decimal point are 0 and
1 respectively.
The value of the number is determined by adding the results out of the multiplication of the digits
with the weight of their position. This method is called the expansion method. Under this method,
the rightmost digit of the number is called the Least Significant Digit (LSD), as it has the lowest
weight. Likewise, the leftmost digit of the number is called the Most Significant Digit (MSD), as
it has the highest weight.
Binary Number System refers to the number system that uses only two symbols i.e. 0 and 1, that's
0why it is called a base 2 number system. It is also known as Binary Digit (BIT). This number
system is especially used in the internal processing of computer system. When we count up from
0 in binary, symbols are much more frequently run out as this system only uses 0 and 1 and 2 do
not exist. Therefore, we use 10 in this system because 10 is equal to 2 in decimal. The combination
of binary numbers can be used to represent different quantities like 1001. In Binary, each digit’s
positional value is twice the face value or place value of the digit of its right side. Each position’s
weight is a power of 2.
Octal Number System is the base 8 system. Like the decimal number system, this system is also
used in the internal processing of computer system. It is the system that consists of eight digits i.e.
{0, 1, 2, 3, 4, 5, 6, and 7} which is used for the representation of long binary numbers short-
handedly. In this system, each digit position represents a power of 8. The number 708 will not be
valid in this system as 8 is not a valid digit.
Hexadecimal Number System is the number system that represents long binary numbers in shortcut
method. It is a base 16 system as it consists of 16 digits i.e. {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D,
E, F } where the alphabets represent the decimal numbers 10 to 15. This system is also used in the
computer system, mainly in the memory management. As the name suggests, each digit's position
represents a power of 16 in this system.
➢ CONVERSION OF BINARY
It consists of:
The rules for conversion from binary to decimal are given below:
Note: A power of 2 is 0 for a left bit of binary point (or for a right most bit for the number that
does not contain fractional part) and increase the power by one for each bit towards left and
decrease power by one towards the right of binary point.
Solution:
= 32 + 16 + 0 + 0 + 2 +1
= (51)10
= 8 + 0 + 2 + 1 +0.5+ 0 +0.125
= 11 + 0.5 + 0.125
= (11.625)10
The rules for conversion from binary to decimal are given below:
1. Divide the given binary number into a group of three bits from binary point to left (or from
right to left if no fractional part) and from binary point to the right. Append 0’s at leading
or trailing or trailing position if necessary to make each group of 3 bits.
2. Substitute each group of three bits by octal equivalent from a table.
3. Collect octal digits to get an octal equivalent number.
Solution:
Dividing the given binary number (10110101)2 into groups of 3 bits from right to left, and
appending 0’s at leading position, we have,
The rules for conversion from binary to hexadecimal are as given below:
1. Divide the given binary number into a group of four bits from binary point to left (or from
right to left if no fractional part) and from binary point to the right. Append 0’s at leading
or trailing position if necessary to make each group of 4 bits.
2. Substitute each group of four bits by hexadecimal equivalent symbol (letter or digit) from
the table.
3. Collect Hexadecimal symbols to get Hexadecimal equivalent number
Solution:
Dividing the given binary number (10101011101)2 into groups of 4 bits from binary point to left
and binary point right and appending 0’s at leading or at trailing position to make each group of
four bits, we have,
➢ Conversion of Decimal
It consists of conversion from decimal to binary, octal and hexadecimal number system which are
described below:
The rules for conversion from decimal to binary are as given below:
Solution:
51÷2=25 remainder =1
6÷ 2=3 remainder =0
3÷ 2=1 remainder =1
1÷ 2=0 remainder =1
The rules for conversion from decimal to binary are as given below:
Solution:
22÷ 8 = 2 remainder =6
2÷ 8 = 0 remainder =2
Solution:
4÷ 16 =0 remainder =4
➢ Conversion of octal:
It consists of conversion from octal to decimal, binary and hexadecimal number system which are
described below:
Multiply the each octal digit by corresponding power of 8 and sum each product term to get
decimal equivalent.
Solution:
= 384 + 24 + 2
= 410
Substitute each octal digit by equivalent 3 bit binary from table and collect bits for each digit to
get binary equivalent numbers.
Actually, there is no direct method for converting from octal to hexadecimal so first, convert octal
into binary or decimal and then convert binary or decimal to hexadecimal.
➢ Conversion of hexadecimal
It consists of conversion from hexadecimal to decimal, binary and octal number system which are
described below:
The rules for conversion from hexadecimal to decimal are as given below:
Solution:
= 3840 + 64 + 12
= 3916
Substitute each hexadecimal symbol by equivalent 4 bit binary from table and collect bits for each
digit to get binary equivalent numbers.
For example, the 9`s complement of 3 is 6 (9-3=6), and 234 is 765 (999-234 =765).
The 10`s complement of decimal number can be obtained by adding 1 to the least significant digit
of 9`s complement of that number. For example, 10`s complement of 3 is 7 (9-3=6+1=7), and 123
is 877.
Adding the 9`s complement with 345, i.e. 345 + 876 = 1221
In the result, most significant digit 1 is the carryover. So add this carry over to remaining digits
221
Hence, (222)10 is the required result after subtracting (123)10 from (345)10.
Adding the 10`s complement with 345, i.e. 345 + 877 = 1222
In this result, most significant digit 1 is the carry over. So remove it to find the result.
Binary Mathematics
1. Binary Addition
2. Binary Subtraction
3. Binary Multiplication
Example: Binary
multiplication1011
Rule for binary
multiplicand *1011
multiplication1*1=11*0=00*1=00*0=0
multiplier10111011*0000**
+1011***1111001 product
4. Binary Division
Example:
1010 = MBS
Example:
1010 = LSB
• There are two types of complement: r`s complement and (r-1)`s complement.
In binary number system, there are two types of complement: 1`s complement and 2`s
complement.
• 1`s Complement
1`s complement of a binary number is obtained by subtracting each bit by 1. We can get 1`s
complement by simply replacing 1 by 0 and 0 by 1.
• 2`s complement:
The 2`s complement of a binary number is obtained by adding binary 1 to the 1`s
Example: A number with n decimal digits will require 4n bits in BCD. E.g. decimal 396 is
represented in BCD with 12 bits as 0011 1001 011
❖ Error-Detection codes:
Binary information can be transmitted from one location to another by electric wires or other
communication medium. Any external noise introduced into the physical communication
medium may change some of the bits from 0 to 1 or vice versa.
The purpose of an error-detection code is to detect such bit-reversal errors. One of the most
common ways to achieve error detection is by means of a parity bit. A parity bit is the extra bit
included to make the total number of 1's in the resulting code word either even or odd. A
message of 4-bits and a parity bit P are shown in the table below:
➢ The message, together with the parity bit, is transmitted to its destination. The parity
of the received data is checked in the receiving end. If the parity of the received
information is not even, it means that at least one bit has changed value during the
transmission.
➢ This method detects one, three, or any odd combination of errors in each message
that is transmitted. An even combination of errors is undetected. Additional error
detection schemes may be needed to take care of an even combination of errors.
The Gray code is used in applications where the normal sequence of binary numbers may
produce an error or ambiguity during the transition from one number to the next. If binary
numbers are used, a change from 0111 to 1000 may produce an intermediate erroneous number
1001 if the rightmost bit takes more time to change than the other three bits. The Gray code
eliminates this problem since only one-bit changes in value during any transition between two
numbers.
❖ Alphanumeric codes:
Alphanumeric character set is a set of elements that includes the 10 decimal digits, 26 letters of
the alphabet and special characters such as $, %, + etc. It is necessary to formulate a binary code
for this set to handle different data types. If only capital letters are included, we need a binary
code of at least six bits, and if both uppercase letters and lowercase letters are included, we need
a binary code of at least seven bits.
NOTE :
Decimal digits
in ASCII can be
converted to
BCD by
removing the
three higher
order bits,
011.
❖ Excess-3 Code:
The excess 3 code is defined as the binary code formed after adding the 3 i.e. 0011 to the decimal
number converted to the BCD number.
Excess-3, also called XS3, is a non-weighted code used to express decimal number-s. It is another
important binary code. It is particularly significant for arithmetic operations as it overcomes the
shortcomings encountered while using the 8421 BCD code to add two decimal digits whose sum
exceeds 9. This code is used in some old computers.
The Excess-3 code for a given decimal number is determined by adding '3' to each decimal digit
in the given number and then replacing each digit of the newly found decimal number by its four-
bit binary equivalent. The table gives is the Excess-3 code.
The key feature of the Excess-3 code is. that it is self-complementing. In other words, the l's
complement of an Excess- 3 number is the Excess- 3 code for the 9's complement of the
corresponding decimal number. For example, the Excess- 3 code for decimal 6 is 1001. The l's
complement of 1001 is 0110, which is the Excess-3 code for decimal 3, and 3 is the 9's complement
of 6.