Octal number is one of the number systems which has value of base is 8, that means there only 8 symbols: 0, 1, 2, 3, 4, 5, 6, and 7. Whereas Binary number is most familiar number system to the digital systems, networking, and computer professionals. It is base 2 which has only 2 symbols: 0 and 1, these digits can be represented by off and on respectively.
Conversion from Octal to Binary number system
There are various direct or indirect methods to convert a octal number into binary number. In an indirect method, you need to convert an octal number into other number system (e.g., decimal or hexadecimal), then you can convert into binary number by converting each digit into binary number from hexadecimal system and using conversion system from decimal to binary number.
Example − Convert octal number 205 into binary number.
First convert it into decimal or hexadecimal number, = (205)8 = (2x82+0x81+5x80)8 or (010 000 101)2 Because base of octal and hexadecimal are 8 and 16 respectively. = (133)10 or (0 1000 0101)2 = (133)10 or (85)16 Then convert it into binary number by converting each digit. = (1x27+0x26+0x25+0x24+0x23+1x22+0x21+1x20)2 or (1000 0101)2 = (10000101)2
However, there is a simple direct method to convert an octal number to binary number. Since there are only 8 symbols (i.e., 0, 1, 2, 3, 4, 5, 6, and 7) in octal representation system and its base (i.e., 8) is equivalent of 23=8. So, you can represent each digit of octal in group of 3 bits in binary number.
Octal Symbol | Binary equivalent |
---|---|
0 | 000 |
1 | 001 |
2 | 010 |
3 | 011 |
4 | 100 |
5 | 101 |
6 | 110 |
7 | 111 |
This method is simple and also works as reverse of Binary to Octal Conversion. The algorithm is explained as following below.
- Take Octal number as input
- Convert each digit of octal into binary.
- That will be output as binary number.
Example-1 Convert octal number 540 into binary number.
According to above algorithm, equivalent binary number will be,
= (540)8 = (101 100 000)2 = (101100000)2
This is very simple conversion, you can use for mixed (integer with fractional) octal number as well.
Example-2 − Convert octal number 352.563 into binary number.
According to above algorithm, equivalent binary number will be,
= (352.563)8 = (011 101 010 . 101 110 011)2 = (011101010.101110011)2
No comments:
Post a Comment