(M4-GUIDE) Number System
(M4-GUIDE) Number System
In any binary number, the rightmost digit is called least significant bit
(LSB) and leftmost digit is called most significant bit (MSB).
And decimal equivalent of this number is sum of product of each digit with its
positional value.
110102 = 1×24 + 1×23 + 0×22 + 1×21 + 0×20
= 16 + 8 + 0 + 2 + 0
= 2610
Decimal equivalent of any octal number is sum of product of each digit with
its positional value.
7268 = 7×82 + 2×81 + 6×80
= 448 + 16 + 6
= 47010
0 0 0 0000
1 1 1 0001
2 2 2 0010
3 3 3 0011
4 4 4 0100
5 5 5 0101
6 6 6 0110
7 7 7 0111
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
As you know decimal, binary, octal and hexadecimal number systems are
positional value number systems. To convert binary, octal and hexadecimal
to decimal number, we just need to add the product of each digit with its
positional value. Here we are going to learn other conversion among these
number systems.
Decimal to Binary
Decimal numbers can be converted to binary by repeated division of the
number by 2 while recording the remainder. Let’s take an example to see
how this happens.
The remainders are to be read from bottom to top to obtain the binary
equivalent.
4310 = 1010112
Decimal to Octal
Decimal numbers can be converted to octal by repeated division of the
number by 8 while recording the remainder. Let’s take an example to see
how this happens.
Decimal to Hexadecimal
Decimal numbers can be converted to octal by repeated division of the
number by 16 while recording the remainder. Let’s take an example to see
how this happens.
Reading the remainders from bottom to top we get,
42310 = 1A716
101100101012 = 26258
To convert an octal number to binary, each octal digit is converted to its 3-
bit binary equivalent according to this table.
Octal Digit 0 1 2 3 4 5 6 7
Binary Equivalent 000 001 010 011 100 101 110 111
546738 = 1011001101110112
Binary to Hexadecimal
To convert a binary number to hexadecimal number, these steps are followed
−
• Starting from the least significant bit, make groups of four bits.
• If there are one or two bits less in making the groups, 0s can be added
after the most significant bit.
• Convert each group into its equivalent octal number.
Let’s take an example to understand this.
101101101012 = DB516
To convert an octal number to binary, each octal digit is converted to its 3-
bit binary equivalent.
Binary Addition
It is a key for binary subtraction, multiplication, division. There are four rules
of binary addition.
In fourth case, a binary addition is creating a sum of (1 + 1 = 10) i.e. 0 is
written in the given column and a carry of 1 over to the next column.
Example − Addition
Binary Subtraction
Subtraction and Borrow, these two words will be used very frequently for
the binary subtraction. There are four rules of binary subtraction.
Example − Subtraction
Octal Addition
Following octal addition table will help you to handle octal addition.
To use this table, simply follow the directions used in this example: Add
68 and 58. Locate 6 in the A column then locate the 5 in the B column. The
point in 'sum' area where these two columns intersect is the 'sum' of two
numbers.
68 + 58 = 138.
Example − Addition
Octal Subtraction
The subtraction of octal numbers follows the same rules as the subtraction of
numbers in any other number system. The only variation is in borrowed
number. In the decimal system, you borrow a group of 1010. In the binary
system, you borrow a group of 210. In the octal system you borrow a group
of 810.
Example − Subtraction
Hexadecimal Addition
Following hexadecimal addition table will help you greatly to handle
Hexadecimal addition.
To use this table, simply follow the directions used in this example − Add
A16 and 516. Locate A in the X column then locate the 5 in the Y column. The
point in 'sum' area where these two columns intersect is the sum of two
numbers.
A16 + 516 = F16.
Example − Addition
Hexadecimal Subtraction
The subtraction of hexadecimal numbers follow the same rules as the
subtraction of numbers in any other number system. The only variation is in
borrowed number. In the decimal system, you borrow a group of 10 10. In the
binary system, you borrow a group of 210. In the hexadecimal system you
borrow a group of 1610.
Example - Subtraction