# Binary to Octal and Octal to Binary Conversion

We know that binary and octal are two different kinds of number systems whose bases are 2 and 8 respectively, i.e. they use 2 and 8 digits respectively to represent their numbers and these numbers are 0, 1 (for binary) and 0, 1, 2, 3, 4, 5, 6, 7 (for octal). Now we can transform any numbers of these number system to other type of number system directly without going through the decimal numbers. What is being tried to said here that to transform a binary number into octal number we can first convert it into decimal number and then convert that number into octal number or we can convert the binary number directly into octal number, certainly the second method is more adaptable. This is also true for the reverse function, i.e. to transform an octal number into binary number. The two methods are described in the following articles.

Closely Related Articles
Binary Number System | Binary to Decimal and Decimal to Binary ConversionBinary to Decimal and Decimal to Binary ConversionBCD or Binary Coded Decimal | BCD Conversion Addition SubtractionOctal to Decimal and Decimal to Octal ConversionBinary to Hexadecimal and Hex to Binary ConversionHexadecimal to Decimal and Decimal to Hexadecimal ConversionGray Code | Binary to Gray Code and that to Binary ConversionOctal Number SystemDigital Logic Gates2′s Complement1′s ComplementASCII CodeHamming Code2s Complement ArithmeticError Detection and Correction Codes9s complement and 10s complement | SubtractionSome Common Applications of Logic GatesKeyboard EncoderAlphanumeric codes | ASCII code | EBCDIC code | UNICODEMore Related Articles
Digital ElectronicsBoolean Algebra Theorems and Laws of Boolean AlgebraDe Morgan Theorem and Demorgans LawsTruth Tables for Digital LogicBinary Arithmetic Binary AdditionBinary SubtractionSimplifying Boolean Expression using K MapBinary DivisionExcess 3 Code Addition and SubtractionK Map or Karnaugh MapSwitching Algebra or Boolean AlgebraBinary MultiplicationParallel SubtractorBinary Adder Half and Full AdderBinary SubstractorSeven Segment DisplayBinary to Gray Code Converter and Grey to Binary Code ConverterBinary to BCD Code ConverterAnalog to Digital ConverterDigital Encoder or Binary EncoderBinary DecoderBasic Digital CounterDigital ComparatorBCD to Seven Segment DecoderParallel AdderParallel Adder or SubtractorMultiplexerDemultiplexer555 Timer and 555 Timer WorkingLook Ahead Carry AdderOR Operation | Logical OR OperationAND Operation | Logical AND OperationLogical OR GateLogical AND GateNOT GateUniversal Gate | NAND and NOR Gate as Universal GateNAND GateDiode and Transistor NAND Gate or DTL NAND Gate and NAND Gate ICsX OR Gate and X NOR GateTransistor Transistor Logic or TTLNOR GateFan out of Logic GatesINHIBIT GateNMOS Logic and PMOS LogicSchmitt GatesLogic Families Significance and Types of Logic FamiliesLatches and Flip FlopsS R Flip Flop S R LatchActive Low S R Latch and Flip FlopGated S R Latches or Clocked S R Flip FlopsD Flip Flop or D LatchJ K Flip FlopMaster Slave Flip FlopRead Only Memory | ROMProgrammable Logic DevicesProgrammable Array LogicApplication of Flip FlopsShift RegistersBuffer Register and Controlled Buffer RegisterData Transfer in Shift RegistersSerial In Serial Out (SISO) Shift RegisterSerial in Parallel Out (SIPO) Shift RegisterParallel in Serial Out (PISO) Shift RegisterParallel in Parallel Out (PIPO) Shift RegisterUniversal Shift RegistersBidirectional Shift RegisterDynamic Shift RegisterApplications of Shift RegistersUninterruptible Power Supply | UPSConversion of Flip FlopsNew Articles
Resistance Variation with TemperatureLook Ahead Carry AdderGround Clearance of Different Transmission LinesWater Meter## Binary to Octal Conversion

As the binary numbers are comprised of only 0 and 1 we have to first divide the binary number into group of 3 digits starting from the right most side, and balancing the number of digits by putting appropriate number of zeroes. Now we have certain numbers of group of binary numbers, then we have to convert those groups into decimal numbers and write in the same order in which they used to be. Now this is the octal equivalent of that binary number. If we consider an example, this will be very easy to understand. Let us take a binary number say 101101001_{2}Now dividing it into group of three digits we will find the following pattern 101|101|001 Now writing the equivalent decimal number of each group we get 5 | 5 | 1 So the equivalent octal number is 551_{8}## Octal to Binary Conversion

Now if we just imagine the reverse of the above explained operation we will be able to find out the method for converting octal number into binary number ourselves. In this case each of the digits of the octal number is converted into its equivalent binary number and they are merged into the same order they were when they were as octal numbers, the leftmost zeroes are omitted from the number and we get the equivalent binary number. An example is given hereby to explain the method easily. Let us take a number 34_{8}Now the binary equivalent of 3 is 011 and that of 4 is 100. So, the desired binary equivalent of the octal number is 111002.