Lesson 3.1 NUMBER SYSTEMS CONVERSION

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Binalatongan Community College

Brgy. Ilang San Carlos City, Pangasinan

Bachelor of Science in Information Technology (BSIT) &


Bachelor of Elementary Education
LEARNING MODULE

LESSON 3.1:
NUMBER SYSTEMS CONVERSION

 Binary to Decimal
To convert a base 2 number to base 10, the decimal equivalent of each power of 2. The decimal value of a power
of 2 is obtained by multiplying 2 by itself the number of times indicated by the exponent for whole numbers.
Example:
24  2  2  2  2  1610

For fractional numbers, the decimal value is equal to 1 divided by 2 multiplied by itself the number of times
indicated by the exponent. Look at this example:

Example Problems:

      
11012  1 23  1 2 2  0  21  1 20 
 8  4  0  1
 1310
Final Answer

        
1011012  1 25  0  2 4  1 23  1 2 2  0  21  1 20   
 32  0  8  4  0  1
 4510
Final Answer

        
1101.012  1 23  1 2 2  0  21  1 20  0  2 1  1 2 2  
 8  4  0  1  0  .25
 13.2510
Final Answer

        
1011.112  1 23  0  2 2  1 21  1 20  1 2 1  1 2 2  
 8  0  2  1  .5  .25
 11.7510
Final Answer

 Decimal to Binary
Conversion of a decimal number to any other base is accomplished by dividing the decimal number by the radix
of the system you are converting to.
Examples:

Page 1 of 6 Prepared by: Rimberto M. Lopez, ECE, MSME


1510  2 | 15
 2 | 7 r.1
 2 | 3 r.1
 2 | 1 r .1
 2 | 0 r .1
1510  11112
Final Answer

4510  2 | 45
 2 | 22 r.1
 2 | 11 r.0
 2| 5 r .1
 2| 2 r .1
 2|1 r .0
 2 | 0 r .1
4510  1011012
Final Answer

 Octal to Decimal
Conversion of octal numbers to decimal is best done by the positional notation method. This process is the one
we used to convert binary numbers to decimal.
Examples:

    
7438  7  82  4  81  3  80 
 448  32  3
 48310
Final Answer

      
24.368  2  81  4  80  3  81  6  82 
 16  4  .375  .09375
 20.4687510
Final Answer

 Decimal to Octal
Conversion of a decimal number to any other base is accomplished by dividing the decimal number by the radix
of the system you are converting to.
Examples:

1510  8 | 15
 8 | 1 r.7
 8 | 0 r.1
1510  178
Final Answer

Page 2 of 6 Prepared by: Rimberto M. Lopez, ECE, MSME


45010  8 | 450
 8 | 56 r.2
 8 | 7 r.0
 8| 0 r .7
45010  7028
Final Answer

 Hexadecimal to Decimal
Conversion of hexadecimal numbers to decimal is also best done by the positional notation method. This process
is the one we used to convert binary & octal numbers to decimal. It can also convert the base 16 number to binary
and then convert to base 10.
Examples:

  
2C16  2 161  12 160 
 32  12
 4410
Final Answer

    
32 B16  3 16 2  2 161  11160 
 768  32  11
 81110
Final Answer

 Decimal to Hexadecimal
Conversion of a decimal number to any other base is accomplished by dividing the decimal number by the radix
of the system you are converting to.
Examples:

37210  16 | 372
 16 | 23 r.4
 16 | 1 r.7
 16 | 0 r.1
37210  17416
Final Answer

17410  16 | 174
 16 | 10 r .E
 16 | 0 r. A
17410  AE 16
Final Answer

 Binary to Octal
Conversion of binary number to octal system is easy since 8 is equal to 2³, then one octal digit can represent three
binary digits, as shown below.

Page 3 of 6 Prepared by: Rimberto M. Lopez, ECE, MSME


The conversion of a binary number is quite simple. Write out the binary number to be converted. Starting at the
radix point and moving left, break the binary number into groups of three as shown. This grouping of binary
numbers into groups of three is called binary-coded octal (BCO). Add 0s to the left of any MSD that will fill a group
of three:

Example:
Write down the octal equivalent of each group:

101110010011012  271158
Final Answer

To convert a mixed binary number, starting at the radix point, form groups of three both right and left:

101101100.0011102  556.168
Final Answer

 Octal to Binary
Converting octal to binary is the same but in a reverse procedure. Just group each octal digit, then convert it
individually.

Convert the 5678 to binary.

Page 4 of 6 Prepared by: Rimberto M. Lopez, ECE, MSME


5678  1011101112 Final Answer

 Binary to Hexadecimal
Using the conversion chart, it is easy to convert binary numbers to hex. Starting at the radix point and moving
either right or left, break the number into groups of four. The grouping of binary into four bit groups is called
binary-coded hexadecimal (BCH).

Example:
Convert 1110100112 to hex:

1110100112  1D316
Final Answer

 Hexadecimal to Binary
Converting hex to binary is the same but in a reverse procedure. Just group each hexadecimal digits, then convert
it individually to binary.

Convert ABC16 to binary numbers:

ABC 16  1010101111002 Final Answer

 Octal to Hexadecimal
Conversion of octal to hex is a two-step procedure. First, convert the octal number to binary; then convert the
binary number to hex.

Example:
Convert 53.78 to hex.

Page 5 of 6 Prepared by: Rimberto M. Lopez, ECE, MSME


 Hexadecimal to Octal
Just like the conversion of octal to hex, conversion of hex to octal is a two-step procedure. First, convert the hex
number to binary, then convert the binary number to octal.

Example:
Convert ABC16 to octal.

ABC 16  1010101111002  52748 Final Answer

Page 6 of 6 Prepared by: Rimberto M. Lopez, ECE, MSME

You might also like