## Binary numbers to hexadecimal numbers

Convert binary numbers to hexadecimal numbers
1. 11111
2. 1101110
3. 1110101010

Completion:
1. 11111 (2) = ? (16)
* First, convert binary numbers to decimal numbers. Then, convert decimal numbers to hexadecimal numbers.

binary to decimal
11111 = 1x20 + 1x21 + 1x22 + 1x23 + 1x24
11111 = 1 + 2 + 4 + 8 + 16
11111 (2) = 31 (10)

31 / 16 = 1, remains 15 or F
1 / 16 = 0, remains 1
31 (10) = 1F (16)

11111 binary number equal to 1F hexadecimal number
11111 (2) = 1F (16)

2. 1101110 (2) = ? (16)
binary to decimal
1101110 = 0x20 + 1x21 + 1x22 + 1x23 + 0x24 + 1x25 + 1x26
1101110 = 0 + 2 + 4 + 8 + 0 + 32 + 64
1101110 (2) = 110 (10)

110 / 16 = 6, remains 14 or E
6 / 16 = 0, remains 6
79 (10) = 6E (16)

1101110 binary number equal to 6E hexadecimal number
1101110 (2) = 6E (16)

3. 1110101010 (2) = ? (16)
binary to decimal
1110101010 = 0x20 + 1x21 + 0x22 + 1x23 + 0x24 + 1x25 + 0x26 + 1x27 + 1x28 + 1x29
1110101010 = 0 + 2 + 0 + 8 + 0 + 32 + 0 + 128 + 256 + 512
1110101010 (2) = 938 (10)

938 / 16 = 58, remains 10 or A
58 / 16 = 3, remains 10 or A
3 / 16 = 0, remains 3
938 (10) = 3AA (16)

1110101010 binary number equal to 3AA hexadecimal number
1110101010 (2) = 3AA (16)

## Binary numbers to octal numbers

Convert binary numbers to octal numbers
1. 11101
2. 1001111
3. 1010101010

Completion:
1. 11101 (2) = ? (8)
* First, convert binary numbers to decimal numbers. Then, convert decimal numbers to octal numbers.

binary to decimal
11101 = 1x20 + 0x21 + 1x22 + 1x23 + 1x24
11101 = 1 + 0 + 4 + 8 + 16
11101 (2) = 29 (10)

decimal to octal
29 / 8 = 3, remains 5
3 / 8 = 0, remains 3
29 (10) = 35 (8)

11101 binary number equal to 35 octal number
11101 (2) = 35 (8)

2. 1001111 (2) = ? (8)
binary to decimal
1001111 = 1x20 + 1x21 + 1x22 + 1x23 + 0x24 + 0x25 + 1x26
1001111 = 1 + 2 + 4 + 8 + 0 + 0 + 64
1001111 (2) = 79 (10)

decimal to octal
79 / 8 = 9, remains 7
9 / 8 = 1, remains 1
1 / 8 = 0, remains 1
79 (10) = 117 (8)

1001111 binary number equal to 117 octal number
1001111 (2) = 117 (8)

3. 1010101010 (2) = ? (8)
binary to decimal
1010101010 = 0x20 + 1x21 + 0x22 + 1x23 + 0x24 + 1x25 + 0x26 + 1x27 + 0x28 + 1x29
1010101010 = 0 + 2 + 0 + 8 + 0 + 32 + 0 + 128 + 0 + 512
1010101010 (2) = 682 (10)

decimal to octal
682 / 8 = 85, remains 2
85 / 8 = 10, remains 5
10 / 8 = 1, remains 2
1 / 8 = 0, remains 1
682 (10) = 1252 (8)

1010101010 binary number equal to 1252 octal number
1010101010 (2) = 1252 (8)

## Decimal numbers to hexadecimal numbers

Convert decimal numbers to hexadecimal numbers
1. 128
2. 2015
3. 300000

Completion:
1. 128 (10) = ? (16)
→ 128 / 16 = 8, remains 0
→ 8 / 16 = 0, remains 8
* Finish when meet zero (0) and then write remains numbers, from bottom to top.
128 decimal number equal to 80 hexadecimal number
128 (10) = 80 (16)

2. 2015 (10) = ? (16)
2015 / 16 = 125, remains 15 or F
125 / 16 = 7, remains 13 or D
7 / 16 = 0, remains 7
2015 decimal number equal to 7DF hexadecimal number
2015 (10) = 7DF (16)

3. 300000 (10) = ? (16)
300000 / 16 = 18750, remains 0
18750 / 16 = 1171, remains 14 or E
1171 / 16 = 73, remains 3
73 / 16 = 4, remains 9
4 / 16 = 0, remains 4
300000 decimal number equal to 493E0 hexadecimal number
300000 (10) = 493E0 (16)

## Decimal numbers to octal numbers

Convert decimal numbers to octal numbers
1. 60
2. 133
3. 512

Completion:
1. 60 (10) = ? (8)
→ 60 / 8 = 7, remains 4
→ 7 / 8 = 0, remains 7
* Finish when meet zero (0) and then write remains numbers, from bottom to top
60 decimal number equal to 74 octal number
60 (10) = 74 (8)

2. 133 (10) = ? (8)
133 / 8 = 16, remains 5
16 / 8 = 2, remains 0
2 / 8 = 0, remains 2
133 decimal number equal to 205 octal number
133 (10) = 205 (8)

3. 512 (10) = ? (8)
512 / 8 = 64, remains 0
64 / 8 = 8, remains 0
8 / 8 = 1, remains 0
1 / 8 = 0, remains 1
512 decimal number equal to 1000 octal number
512 (10) = 1000 (8)

## Decimal numbers to binary numbers

Convert decimal numbers to binary numbers
1. 10
2. 31
3. 42

Completion:
1. 10 (10) = ? (2)
→ 10 / 2 = 5, remains 0
→ 5 / 2 = 2, remains 1
→ 2 / 2 = 1, remains 0
→ 1 / 2 = 0, remains 1
* Finish when meet zero (0) and then write remains numbers, from bottom to top
10 decimal number equal to 1010 binary number
10 (10) = 1010 (2)

2. 31 (10) = ? (2)
31 / 2 = 15, remains 1
15 / 2 = 7, remains 1
7 / 2 = 3, remains 1
3 / 2 = 1, remains 1
1 / 2 = 0, remains 1
31 decimal number equal to 11111 binary number
31 (10) = 11111 (2)

3. 42 (10) = ? (2)
42 / 2 = 21, remains 0
21 / 2 = 10, remains 1
10 / 2 = 5, remains 0
5 / 2 = 2, remains 1
2 / 2 = 1, remains 0
1 / 2 = 0, remains 1
42 decimal number equal to 101010 binary number
42 (10) = 101010 (2)