background image

Conversion from a Binary to Octal and Vice Versa 

Binary to octal 

To convert from binary to octal, we start from the LSB and then group three digits at 
a time and replace them by the decimal equivalent as follow: 

Ex) Convert (101101010)

2

 

into an equivalent octal number. 

 

Ex) Convert (1011110)

2

 into an equivalent octal number. 

 

 

 

 

 

 

 

Ex) Convert (1101.0111)

2

 into an equivalent octal number. 

 

In this case, we complete the real part by adding two 0s (left padding) and adding two 
0s on the right side (right padding). 

Ex) Convert (11010111.0101)

2

 into an equivalent octal number. 

 

 

 

 

 

 

 


background image

Octal to binary 

To convert from octal to binary,  each octal digit is converted into a 3-bit-equivalent 
binary number. 

Ex) Convert (235)

8

 

into an equivalent binary number. 

 

 

 

Ex) Convert (47.321)

8

 

into an equivalent binary number. 

 

 

Conversion from a Binary to Hexadecimal and Vice Versa 

Binary to hexadecimal 

To convert from binary to hexadecimal, we start from the LSB and then group four 
digits at a time and replace them by the decimal equivalent as follow: 

Ex) Convert (110011110)

2

 

into an equivalent hexadecimal number. 

 

Ex) Convert (111011.011)

2

 into an equivalent hexadecimal number. 

 

Ex) Convert (1010101011.011010)

2

 into an equivalent hexadecimal number. 

 

 

 


background image

Hexadecimal to binary 

To convert from hexadecimal to binary, each hexadecimal digit is converted into a 4-
bit equivalent binary number. 

Ex) Convert (29C)

16 

into an equivalent binary number. 

 

Ex) Convert (9E.AF2)

16

 

into an equivalent binary number. 

 

 

 

 

 

 

 

 

Conversion from Octal to Hexadecimal and Vice Versa 

Octal to hexadecimal 

To convert from octal to hexadecimal, the following steps are followed: 

(i) First convert the octal number to its binary equivalent. 

(ii) Then form groups of 4 bits, starting from the LSB. 

(iii) Then write the equivalent hexadecimal number for each group of 4 bits. 

 

Ex) Convert (247)

into an equivalent hexadecimal number. 

 

 

 


background image

Ex) Convert (36.532)

8

 

into an equivalent hexadecimal number. 

 

 

 

 

 

Ex) Convert (735.461)

into an equivalent hexadecimal number. 

 

 

 

 

 

Hexadecimal to octal 

Similarly, to convert from hexadecimal number into an octal number:  

(i) First convert the hexadecimal number to its binary equivalent. 

(ii) Then form groups of 3 bits, starting from the LSB. 

(iii) Then write the equivalent octal number for each group of 3 bits. 

Ex) Convert the following hexadecimal numbers into equivalent octal numbers. 

(a) A72E            (b) 4.BF85 

 

     (b) 

 




رفعت المحاضرة من قبل: Mohammed Aldhanuna
المشاهدات: لقد قام 5 أعضاء و 198 زائراً بقراءة هذه المحاضرة








تسجيل دخول

أو
عبر الحساب الاعتيادي
الرجاء كتابة البريد الالكتروني بشكل صحيح
الرجاء كتابة كلمة المرور
لست عضواً في موقع محاضراتي؟
اضغط هنا للتسجيل