88.3k views
4 votes
Convert each of the following 8-bit numbers to hexadecimal and then to octal a) 10011101 b) 00010101 c) 11100110 d) 01101001

User Shreyans
by
4.5k points

1 Answer

1 vote

Answer:

a) 10011101₂ = 9D₁₆ or 235₈

b) 00010101₂ = 15₁₆ or 025₈

c) 11100110₂ = E6₁₆ or 346₈

d) 01101001₂ = 69₁₆ or 151₈

Step-by-step explanation:

An hexadecimal is a group of 4bits while an octal is a group of 3 bits. They are represented in the table below;

Table for conversion;

Octal => binary

0 => 000

1 => 001

2 => 010

3 => 011

4 => 100

5 => 101

6 => 110

7 => 111

Hexadecimal => binary

0 => 0000

1 => 0001

2 => 0010

3 => 0011

4 => 0100

5 => 0101

6 => 0110

7 => 0111

8 => 1000

9 => 1001

A => 1010

B => 1011

C => 1100

D => 1101

E => 1110

F => 1111

(a)

(i) Convert 10011101 to hexadecimal

Step 1: Starting from the right, split the number into groups of 4s as follows;

1001 1101

Step 2: Convert each of the groups into its equivalent hexadecimal using the table above;

1001 = 9

1101 = D

Step 3: Put them together;

1001 1101₂ = 9D₁₆

(ii) Convert 10011101 to octal

Step 1: Starting from the right, split the number into groups of 3s as follows;

10 011 101

Step 2: The last group (10) in the result of step 1 above has only 2 bits. Therefore, add zero to its left to make it 3 bits as follows;

010 011 101

Step 3: Convert each of the groups into its equivalent octal using the table above;

010 = 2

011 = 3

101 = 5

Step 4: Put them together;

10 011 101₂ = 235₈

(b)

(i) Convert 00010101 to hexadecimal

Step 1: Starting from the right, split the number into groups of 4s as follows;

0001 0101

Step 2: Convert each of the groups into its equivalent hexadecimal using the table above;

0001 = 1

0101 = 5

Step 3: Put them together;

0001 0101₂ = 15₁₆

(ii) Convert 00010101 to octal

Step 1: Starting from the right, split the number into groups of 3s as follows;

00 010 101

Step 2: The last group (00) in the result of step 1 above has only 2 bits. Therefore, add zero to its left to make it 3 bits as follows;

000 010 101

Step 3: Convert each of the groups into its equivalent octal using the table above;

000 = 0

010 = 2

101 = 5

Step 4: Put them together;

00 010 101₂ = 025₈

(c)

(i) Convert 11100110 to hexadecimal

Step 1: Starting from the right, split the number into groups of 4s as follows;

1110 0110

Step 2: Convert each of the groups into its equivalent hexadecimal using the table above;

1110 = E

0110 = 6

Step 3: Put them together;

1110 0110₂ = E6₁₆

(ii) Convert 11100110 to octal

Step 1: Starting from the right, split the number into groups of 3s as follows;

11 100 110

Step 2: The last group (11) in the result of step 1 above has only 2 bits. Therefore, add zero to its left to make it 3 bits as follows;

011 100 110

Step 3: Convert each of the groups into its equivalent octal using the table above;

011 = 3

100 = 4

110 = 6

Step 4: Put them together;

11 100 110₂ = 346₈

(d)

(i) Convert 01101001 to hexadecimal

Step 1: Starting from the right, split the number into groups of 4s as follows;

0110 1001

Step 2: Convert each of the groups into its equivalent hexadecimal using the table above;

0110 = 6

1001 = 9

Step 3: Put them together;

0110 1001₂ = 69₁₆

(ii) Convert 01101001 to octal

Step 1: Starting from the right, split the number into groups of 3s as follows;

01 101 001

Step 2: The last group (01) in the result of step 1 above has only 2 bits. Therefore, add zero to its left to make it 3 bits as follows;

001 101 001

Step 3: Convert each of the groups into its equivalent octal using the table above;

001 = 1

101 = 5

001 = 1

Step 4: Put them together;

01 101 001₂ = 151₈

User Etsuhisa
by
5.0k points