Read the questions as text
Introduction Decimal Number System Binary Number System Why Binary? Octal Number System Hexadecimal Number System Relationship between Hexadecimal, Octal,
Decimal, and Binary Number Conversions
In early days when there were no means of counting, people use to count with the help of fingers, stones, sticks, etc. These methods were not adequate and had many limitations. Many number system were introduced with the passage of time like: Decimal Number System Binary Number System Octal Number System Hexadecimal Number System
• It consist of ten digit i.e. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 with the base 10.
• Each number can be used individually or they can be grouped to form a numeric value as 85,48,35,456 etc.
• The Binary Number System consist of only two digits– 0 and 1.
• Since this system use two digits, it has the base 2.
• All digital computer use this number system and convert the data input from the decimal format into its binary equivalent.
Since the computer is made up of electronic components; it can have only two states, either • On(1) • Off(0) The data which is given to the computer is converted into binary form because a computer understand only binary language. It further converts the binary results into their decimal equivalents for output.
In the Octal Number System it consist of 8 digits i.e. 0, 1, 2, 3, 4, 5, 6, 7 with a base 8.
The sequence of octal number goes as 0, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, …..as go on.
See each successive number after 7 is a combination of two or more unique symbols of octal system.
The Hexadecimal system use base 16. It has 16 possible digit symbol. It use the digit 0 through 9 plus the letters A, B,
C, D, E, and F as the 16 digit symbols.
Hexad eci mal 0 1 2 3 4 5 6 7 8 9 A B C D E F
Octal
0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17
Decimal Binary
0
0000
1
0001
2
0010
3
0011
4
0100
5
0101
6
0110
7
0111
8
1000
9
1001
10
1010
11
1011
12
1100
13
1101
14
1110
15
1111
Notice that each hexadecimal digit represent a group of four binary digit. It Is important to remember that Hex(Abbreviation for Hexadecimal) digit A through F are equivalent to the decimal value 10 through 15.
The method of converting Decimal to binary is repeated-division method. For conversion follow the rules: 1. Divide the given decimal number with the
base 2. 2. Write down the remainder and divide the
quotient by 2. 3. Repeat step 2 till the quotient is zero.
(25)10=(11001)2
To convert a binary number follow the steps: 1. Multiply each binary number with 2 having the
power 0 for last position, starting from the right digit. 2. Increase the power one by one, with base as 2. 3. Sum up all the products to get decimal number.
The method of converting Decimal to Octal is repeated-division method. For conversion follow the rules: 1. Divide the given decimal number with the
base 8, 2. Write down the remainder and divide the
quotient by 8, 3. Repeat step 2 till the quotient is zero.
(33)10=(41)8
To convert a octal number follow the steps: 1. Multiply each Octal number with 8 having the
power 0 for last position, starting from the right digit. 2. Increase the power one by one, with base as 8. 3. Sum up all the products to get decimal number.
The conversion from octal to binary is performed by converting each octal digit to its 3-bit binary equivalent.
The eight possible digits are converted as indicated below:
Octal Digit
Binary Equivalent
01234567 000 001 010 011 100 101 110 111
Using these conversions, any octal number is converted to binary by individually converting each digit.
5
4
3
1
101
100 011
001
Thus
(5431)8=
(101
100
011
001)
2
1. Group the binary integer into a3 bits starting at the least significant bit(LSB)
2. If unable to form group then, add one or two 0's 3. Each group is converted to its octal equivalent. For example Binary number 11010110 into octal start making a group of three digits
011 010 110
326
thus (11010110)2=(326)10
The method of converting Decimal to Hexadecimal is repeated-division method. For conversion follow the rules: 1. Divide the given decimal number with the
base 16. 2. Write down the remainder and divide the
quotient by 16. 3. Repeat step 2 till the quotient is zero.
16 423 Remainders 16 26 7 LSB 16 1 A
0 1 MSB
To convert a Hexadecimal number follow the steps:
1. Multiply each hexadecimal number with 16 having the power 0 for last position, starting from the right digit.
2. Increase the power one by one, with base as 16.
3. Sum up all the products to get decimal number.
Make a group of four digits starting from Least Significant Bit(LSB)
If unable to form group then, add one or two 0's Each group is converted to its Hexadecimal
equivalent. For example 1010111010 Divide the number in group of four digits starting from the last digit 0010 1011 1010
2 BA thus (1010111010)2=(2BA)16
Lets convert
(9F2)16= 9 F
2
1001 1111 0010
Thus (9F2) 16=(1001 1111 0010)2
Multiply the fractional decimal number by 2. Integral part of resultant decimal number will
be first digit of fraction binary number. Repeat step 1 using only fractional part of
decimal number and then step 2.
Binary to decimal
10.1011 =>
1 x 2-4 = 0.0625 1 x 2-3 = 0.125 0 x 2-2 = 0.0 1 x 2-1 = 0.5 0 x 20 = 0.0 1 x 21 = 2.0
2.6875
Decimal to binary 36.22 binary to decimal 11001.1001
decimal to octal 76.29
Octal to binary Binary to hexadecimal (721.262)8=()16
7
2
1.
111 010 001
00011101 0001
1
13 1
26 2 010 110 010
0101 1001 0 make a group of four
590
(1D1 .590)16
Hexadecimal to Binary + Binary to Octal Convert Hexadecimal number to binary (48)16=()8
48
0100 1000
(48)16 = (01001000)2
Convert Binary Number into Octal Number Split the binary number from left to right each group 3 bits 001 001 000 110
(01001000)2 = (110)8
A
B
A + B =C
0
0
0 + 0 =0
0
1
0 + 1 =1
1
0
1 + 0 =1
1
1
1 + 1 = 10
Example – Compute (11111)₂ + (1011)₂
1 1 11
Carry Over
1 1 1 11
0 1 0 11
1 0 1 0 10
Therefore, (11111)₂ + (1011)₂
= (101010)₂
A
B
0
0
1
0
1
1
0
1
Example :- Compute (1100)₂ - (1011)₂
10 -1 = 1
1
1Borrowed 1 0
1
-1
0
1
1
0
0
1
0
A -B =C 0–0=0 1–0=1 1–1=0 0–1=1 (With a borrow taken from next place i.e., 10-1=1)
The answer is = (0010)₂
A
B
A * B =C
0
0
0*0=0
0
1
0*1=0
1
0
1*0=0
1
1
1*1=1
Example- Compute (101)₂ × (11)₂
101 × 11
101 + 101×
1111
Therefore, the answer is (1111)₂
Example- Compute (110)₂ ÷ (10)₂
11 10110
10 0 10
10 00
Quotient Dividend
Remainder